-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathINSTALL.sh
executable file
·730 lines (652 loc) · 24.9 KB
/
INSTALL.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
#!/usr/bin/env bash
set -e # Exit as soon as any line in the bash script fails
ROOTDIR=$( cd $(dirname $0) ; pwd -P ) # path to main PiReT directory
echo
exec &> >(tee -a install.log)
exec 2>&1 # copies stderr onto stdout
# create a directory where all dependencies will be installed
cd $ROOTDIR
mkdir -p thirdParty
cd thirdParty
# create a directory to add short cuts to dependencies
mkdir -p $ROOTDIR/bin
# export "PATH=$PATH:$ROOTDIR/bin/"
export "PATH=$ROOTDIR/thirdParty/miniconda/bin/:$ROOTDIR/bin/:$PATH"
if [[ "$OSTYPE" == "darwin"* ]]
then
{
export PERL5LIB="$ROOTDIR/ext/lib/perl5:$ROOTDIR/ext/lib/perl5/darwin-thread-multi-2level:$PERL5LIB"
}
else
{
export PERL5LIB="$ROOTDIR/ext/lib/perl5:$ROOTDIR/lib/perl5/auto/:$PERL5LIB"
}
fi
# Add pythonpath
# export PYTHONPATH="$ROOTDIR/thirdParty/miniconda/lib/python2.7/site-packages/:$PYTHONPATH"
#Add R path
export R_LIBS="$ROOTDIR/ext/lib/R:$R_LIBS:$R_LIBS_USER"
# Minimum Required versions of dependencies
miniconda_VER=4.4.11
samtools_VER=1.3.1
bamtools_VER=2.4.0
R_VER=3.4.2
hisat2_VER=2.0.5
htseq_VER=0.6.1
stringtie_VER=1.3.3
subread_VER=1.5.0
# minimum required version of Scripting languages
python3_VER=3.5.2
#minimum required version of R modules
R_edgeR_VER=3.14.0
R_DESeq2_VER=1.12.4
#minimum required version of python modules
python_pandas_VER=0.19.2
python_Bio_VER=1.68
python_luigi_VER=2.7.3
python_plumbum_VER=1.6.3
################################################################################
# Installation recipes
################################################################################
install_python()
{
echo "--------------------------------------------------------------------------
installing python v$python3_VER
--------------------------------------------------------------------------------
"
conda install --yes -n piret python=$python3_VER
ln -sf $ROOTDIR/thirdParty/miniconda/bin/python $ROOTDIR/bin/python
echo "
------------------------------------------------------------------------------
python v$python3_VER installed
------------------------------------------------------------------------------
"
}
install_python_pandas()
{
echo "--------------------------------------------------------------------------
installing Python module pandas $python_pandas_VER
--------------------------------------------------------------------------------
"
conda install --yes -n piret -c anaconda pandas=$python_pandas_VER
echo "
--------------------------------------------------------------------------------
pandas installed
--------------------------------------------------------------------------------
"
}
install_python_Bio()
{
echo "--------------------------------------------------------------------------
installing Python module Bio $python_Bio_VER
--------------------------------------------------------------------------------
"
conda install --yes -n piret -c anaconda biopython=$python_Bio_VER
echo "
--------------------------------------------------------------------------------
Biopython installed
--------------------------------------------------------------------------------
"
}
install_python_luigi()
{
echo "--------------------------------------------------------------------------
installing Python module luigi
--------------------------------------------------------------------------------
"
conda install --yes -n piret -c anaconda luigi=$python_luigi_VER
# pip install luigi
echo "
--------------------------------------------------------------------------------
luigi installed
--------------------------------------------------------------------------------
"
}
install_python_plumbum()
{
echo "--------------------------------------------------------------------------
installing Python module plumbum
--------------------------------------------------------------------------------
"
conda install --yes -n piret -c conda-forge plumbum=1.6.3
echo "
--------------------------------------------------------------------------------
plumbum installed
--------------------------------------------------------------------------------
"
}
install_hisat2()
{
echo "--------------------------------------------------------------------------
installing hisat2 v$hisat2_VER
--------------------------------------------------------------------------------
"
conda install --yes -n piret -c bioconda hisat2=$hisat2_VER
ln -sf $ROOTDIR/thirdParty/miniconda/bin/hisat2 $ROOTDIR/bin/hisat2
ln -sf $ROOTDIR/thirdParty/miniconda/bin/hisat2-build $ROOTDIR/bin/hisat2-build
echo "
------------------------------------------------------------------------------
hisat2 v$hisat2_VER installed
------------------------------------------------------------------------------
"
}
install_stringtie()
{
echo "--------------------------------------------------------------------------
installing stringtie v$stringtie_VER
--------------------------------------------------------------------------------
"
conda install --yes -n piret -c bioconda stringtie=$stringtie_VER
ln -sf $ROOTDIR/thirdParty/miniconda/bin/stringtie $ROOTDIR/bin/stringtie
echo "
------------------------------------------------------------------------------
stringtie v$stringtie_VER installed
------------------------------------------------------------------------------
"
}
install_featureCounts()
{
echo "--------------------------------------------------------------------------
installing subread v$subread_VER
--------------------------------------------------------------------------------
"
conda install --yes -n piret -c bioconda subread=$subread_VER
ln -sf $ROOTDIR/thirdParty/miniconda/bin/featureCounts $ROOTDIR/bin/featureCounts
echo "
------------------------------------------------------------------------------
featureCounts v$subread_VER installed
------------------------------------------------------------------------------
"
}
install_samtools()
{
echo "--------------------------------------------------------------------------
Downloading samtools v $samtools_VER
--------------------------------------------------------------------------------
"
conda install --yes -n piret -c bioconda samtools=$samtools_VER
ln -sf $ROOTDIR/thirdParty/miniconda/bin/samtools $ROOTDIR/bin/samtools
echo "
--------------------------------------------------------------------------------
samtools v $samtools_VER installed
--------------------------------------------------------------------------------
"
}
install_bamtools()
{
echo "--------------------------------------------------------------------------
Downloading bamtools v $bamtools_VER
--------------------------------------------------------------------------------
"
conda install --yes -n piret -c bioconda bamtools=$bamtools_VER
ln -sf $ROOTDIR/thirdParty/miniconda/bin/bamtools $ROOTDIR/bin/bamtools
echo "
--------------------------------------------------------------------------------
bamtools v $bamtools_VER installed
--------------------------------------------------------------------------------
"
}
install_R()
{
echo "--------------------------------------------------------------------------
Installing R v $R_VER
--------------------------------------------------------------------------------
"
conda install --yes -n piret -c r r-base=$R_VER
ln -sf $ROOTDIR/thirdParty/miniconda/bin/R $ROOTDIR/bin/R
ln -sf $ROOTDIR/thirdParty/miniconda/bin/Rscript $ROOTDIR/bin/Rscript
echo "
--------------------------------------------------------------------------------
R v $R_VER installed
--------------------------------------------------------------------------------
"
}
install_miniconda()
{
echo "--------------------------------------------------------------------------
downloading miniconda
--------------------------------------------------------------------------------
"
if [[ "$OSTYPE" == "darwin"* ]]
then
{
curl -o miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
chmod +x miniconda.sh
./miniconda.sh -b -p $ROOTDIR/thirdParty/miniconda -f
conda update --yes -n base conda
# export PATH=$ROOTDIR/thirdParty/miniconda/bin:$PATH
ln -sf $ROOTDIR/thirdParty/miniconda/bin/conda $ROOTDIR/bin/conda
ln -sf $ROOTDIR/thirdParty/miniconda/bin/pip $ROOTDIR/bin/pip
}
else
{
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
chmod +x miniconda.sh
./miniconda.sh -b -p $ROOTDIR/thirdParty/miniconda -f
conda update --yes -n base conda
# export PATH=$ROOTDIR/thirdParty/miniconda/bin:$PATH
ln -sf $ROOTDIR/thirdParty/miniconda/bin/conda $ROOTDIR/bin/conda
ln -sf $ROOTDIR/thirdParty/miniconda/bin/pip $ROOTDIR/bin/pip
}
fi
echo "--------------------------------------------------------------------------
miniconda installed and and bin added to PATH
--------------------------------------------------------------------------------
"
}
install_FaQCs()
{
echo "------------------------------------------------------------------------------
Installing FaQC
------------------------------------------------------------------------------
"
conda install --yes -n piret -c anaconda zlib=1.2.11
export CPLUS_INCLUDE_PATH=$ROOTDIR/thirdParty/miniconda/include/:$CPLUS_INCLUDE_PATH
cd $ROOTDIR/thirdParty
tar xvzf FaQCs-2.06.tar.gz
cd FaQCs
make
ln -sf $ROOTDIR/thirdParty/FaQCs/FaQCs $ROOTDIR/bin/FaQCs
cd $ROOTDIR
echo "
------------------------------------------------------------------------------
FaQC-2.01 Installed
------------------------------------------------------------------------------
"
}
install_gffread()
{
echo "--------------------------------------------------------------------------
installing gffread
--------------------------------------------------------------------------------
"
conda install --yes -c bioconda gffread -n piret
echo "
--------------------------------------------------------------------------------
gffread installed
--------------------------------------------------------------------------------
"
}
# install_jbrowse()
# {
# echo "--------------------------------------------------------------------------
# installing Jbrowse
# --------------------------------------------------------------------------------
# "
# cd $ROOTDIR/thirdParty
# tar xvzf JBrowse-1.11.6.tar.gz
# cd JBrowse-1.11.6
# ./setup.sh
# mkdir -p -m 775 data
# cd $ROOTDIR/thirdParty
# ln -sf $ROOTDIR/thirdParty/JBrowse-1.11.6 $ROOTDIR/bin/JBrowse
# echo "
# --------------------------------------------------------------------------------
# Jbrowse installed
# --------------------------------------------------------------------------------
# "
# }
install_R_edgeR()
{
echo "--------------------------------------------------------------------------
installing latest R package edgeR $R_edgeR_VER
--------------------------------------------------------------------------------
"
mkdir -p $ROOTDIR/ext/lib/R
echo "source('https://bioconductor.org/biocLite.R')
biocLite('edgeR', lib='$ROOTDIR/ext/lib/R')" | Rscript -
echo "
--------------------------------------------------------------------------------
latest version of edgeR installed
--------------------------------------------------------------------------------
"
}
install_R_DESeq2()
{
echo "--------------------------------------------------------------------------
installing latest R package DESeq2 $R_DESeq2_VER
--------------------------------------------------------------------------------
"
mkdir -p $ROOTDIR/ext/lib/R
echo "source('https://bioconductor.org/biocLite.R')
biocLite('DESeq2', lib='$ROOTDIR/ext/lib/R')" | Rscript -
echo "
--------------------------------------------------------------------------------
DESeq2 installed
--------------------------------------------------------------------------------
"
}
checkSystemInstallation()
{
IFS=:
for d in $PATH; do
if test -x "$d/$1"; then return 0; fi
done
return 1
}
checkLocalInstallation()
{
IFS=:
for d in $ROOTDIR/bin; do
if test -x "$d/$1"; then return 0; fi
done
return 1
}
checkRpackages()
{
echo "if(\"$1\" %in% rownames(installed.packages()) == FALSE) {0} else {1}"| Rscript -
}
checkPythonModule()
{
python -c "import $1" 2>&1
return $?
}
containsElement () {
local e
for e in "${@:2}"; do [[ "$e" == "$1" ]] && return 0; done
return 1
}
print_usage()
{
cat << EOF
usage: $0 options
If no options, it will check existing installation and run tools installation for those uninstalled.
options:
<help | help| -h> show this help
list show available tools for updates
tools_name install/update individual tool
force force to install all list tools locally
ex: To update bowtie2 only
$0 bowtie2
ex: To update bowtie2 and bwa
$0 bowtie2 bwa
EOF
}
### Main ####
mkdir -p $ROOTDIR/thirdParty/miniconda/bin
if [ "$#" -ge 1 ]
then
for f in $@
do
case $f in
-h|help|-help)
print_usage
exit 0;;
list)
print_tools_list
exit 0;;
Alignment)
for tool in "${alignments_tools[@]}"
do
install_$tool
done
echo -e "Alignment tools installed.\n"
exit 0;;
Utility)
for tool in "${utility_tools[@]}"
do
install_$tool
done
echo -e "Utility tools installed.\n"
exit 0;;
force)
for tool in "${all_tools[@]}"
do
install_$tool
done
;;
*)
if ( containsElement "$f" "${alignments_tools[@]}" || containsElement "$f" "${utility_tools[@]}" )
then
install_$f
else
echo "$f: no this tool in the list"
print_tools_list
fi
exit 0;;
esac
done
fi
###############################################################################
if ( checkSystemInstallation conda )
then
conda_installed_VER=`conda --version 2>&1 | perl -nle 'print $& if m{conda \d+\.\d+\.\d+}'`;
if ( echo $conda_installed_VER $miniconda_VER | awk '{if($2>=$3) exit 0; else exit 1}' )
then
echo " - found conda $conda_installed_VER"
if [ -d "$ROOTDIR/thirdParty/miniconda" ]; then
echo "conda is pointed to right environment"
echo "creating piret environment"
conda create --name piret --yes
source activate piret
else
echo "Creating a separate conda enviroment ..."
conda create --name piret --yes
source activate piret
fi
else
echo "Required version of conda ($miniconda_VER) was not found"
install_miniconda
conda create --name piret --yes
source activate piret
fi
else
echo "conda was not found"
install_miniconda
conda create --name piret --yes
source activate piret
fi
###############################################################################
if ( checkSystemInstallation python )
then
python_installed_VER=`python -V 2>&1 | perl -nle 'print $& if m{Python \d+\.\d+\.\d+}'`;
if ( echo $python_installed_VER $python3_VER | awk '{if($2>=$3) exit 0; else exit 1}' )
then
echo " - found python $python_installed_VER"
else
echo "Required version of python ($python3_VER) was not found"
install_python
fi
else
echo "Python was not found"
install_python
fi
###############################################################################
if ( checkSystemInstallation R )
then
R_installed_VER=`R --version 2>&1 | grep "version"| perl -nle 'print $& if m{version \d+\.\d+\.\d+}'`;
if ( echo $R_installed_VER $R_VER | awk '{if($2>=$3) exit 0; else exit 1}' )
then
echo " - found R $R_installed_VER"
else
echo "Required version of R version $R_VER was not found"
install_R
fi
else
echo "R was not found"
install_R
fi
################################################################################
if ( checkSystemInstallation hisat2 )
then
hisat2_installed_VER=`hisat2 --version 2>&1 | grep 'hisat2-align-s version' | perl -nle 'print $& if m{version \d+\.\d+\.\d+}'`;
if ( echo $hisat2_installed_VER $hisat2_VER | awk '{if($2>=$3) exit 0; else exit 1}' )
then
echo " - found hisat2 $hisat2_installed_VER"
else
echo "Required version of hisat2 was not found"
install_hisat2
fi
else
echo "hisat2 was not found"
install_hisat2
fi
################################################################################
if ( checkSystemInstallation stringtie )
then
stringtie_installed_VER=`stringtie --version 2>&1 | perl -nle 'print $& if m{\d\.\d\.\d}'`;
if ( echo $stringtie_installed_VER $stringtie_VER | awk '{if($2>=$3) exit 0; else exit 1}' )
then
echo " - found stringtie $stringtie_installed_VER"
else
echo "Required version of stringtie was not found"
install_stringtie
fi
else
echo "stringtie was not found"
install_stringtie
fi
################################################################################
# check if required bioconductor R packages are installed
################################################################################
# this is required for edgeR dependency installations (Rcpp)
conda install --yes gxx_linux-64 -n piret
conda install --yes gfortran_linux-64 -n piret
# install optparse
Rscript --no-init-file -e "if('optparse' %in% rownames(installed.packages()) == TRUE){packageVersion('optparse');}" | awk '{print " - found optparse "$2}'
Rscript --no-init-file -e "if('optparse' %in% rownames(installed.packages()) == FALSE){install.packages('optparse',repos='https://cran.r-project.org')}";
# install tidyverse
Rscript --no-init-file -e "if('tidyverse' %in% rownames(installed.packages()) == TRUE){packageVersion('tidyverse');}" | awk '{print " - found tidyverse "$2}'
Rscript --no-init-file -e "if('tidyverse' %in% rownames(installed.packages()) == FALSE){install.packages('tidyverse',repos='https://cran.r-project.org')}";
# install tidyverse
Rscript --no-init-file -e "if('devtools' %in% rownames(installed.packages()) == TRUE){packageVersion('devtools');}" | awk '{print " - found devtools "$2}'
Rscript --no-init-file -e "if('devtools' %in% rownames(installed.packages()) == FALSE){install.packages('devtools',repos='https://cran.r-project.org')}";
# install R reshape2 packages
Rscript --no-init-file -e "if('reshape2' %in% rownames(installed.packages()) == TRUE){packageVersion('reshape2');}" | awk '{print " - found reshape2 "$2}'
Rscript --no-init-file -e "if('reshape2' %in% rownames(installed.packages()) == FALSE){install.packages('reshape2',repos='https://cran.r-project.org')}";
# install R pheatmap packages
Rscript --no-init-file -e "if('pheatmap' %in% rownames(installed.packages()) == TRUE){packageVersion('pheatmap');}" | awk '{print " - found pheatmap "$2}'
Rscript --no-init-file -e "if('pheatmap' %in% rownames(installed.packages()) == FALSE){install.packages('pheatmap',repos='https://cran.r-project.org')}";
# install R edgeR packages
Rscript --no-init-file -e "if('edgeR' %in% rownames(installed.packages()) == TRUE){packageVersion('edgeR');}" | awk '{print " - found edgeR "$2}'
Rscript --no-init-file -e "if('edgeR' %in% rownames(installed.packages()) == FALSE){source('https://bioconductor.org/biocLite.R');biocLite('edgeR')}";
# install R deseq2 packages
Rscript --no-init-file -e "if('DESeq2' %in% rownames(installed.packages()) == TRUE){packageVersion('DESeq2');}" | awk '{print " - found DESeq2 "$2}'
Rscript --no-init-file -e "if('DESeq2' %in% rownames(installed.packages()) == FALSE){source('https://bioconductor.org/biocLite.R');biocLite('DESeq2')}";
# install R pathview package
Rscript --no-init-file -e "if('pathview' %in% rownames(installed.packages()) == TRUE){packageVersion('pathview');}" | awk '{print " - found pathview "$2}'
Rscript --no-init-file -e "if('pathview' %in% rownames(installed.packages()) == FALSE){source('https://bioconductor.org/biocLite.R');biocLite('pathview')}";
# install R gage package
Rscript --no-init-file -e "if('gage' %in% rownames(installed.packages()) == TRUE){packageVersion('gage');}" | awk '{print " - found gage "$2}'
Rscript --no-init-file -e "if('gage' %in% rownames(installed.packages()) == FALSE){source('https://bioconductor.org/biocLite.R');biocLite('gage')}";
# install R ballgown package
Rscript --no-init-file -e "if('ballgown' %in% rownames(installed.packages()) == TRUE){packageVersion('ballgown');}" | awk '{print " - found ballgown "$2}'
Rscript --no-init-file -e "if('ballgown' %in% rownames(installed.packages()) == FALSE){source('https://bioconductor.org/biocLite.R');biocLite('ballgown')}";
# install RPiReT
Rscript --no-init-file -e "if('RPiReT' %in% rownames(installed.packages()) == FALSE){library('devtools');install_github('mshakya/RPiReT')}";
################################################################################
if ( checkSystemInstallation featureCounts )
then
echo " - found featureCounts"
else
echo "featureCounts was not found"
install_featureCounts
fi
################################################################################
if ( checkSystemInstallation samtools )
then
samtools_installed_VER=`samtools 2>&1| grep 'Version'|perl -nle 'print $& if m{\d+\.\d+.\d+}'`;
if ( echo $samtools_installed_VER $samtools_VER| awk '{if($2>=$3) exit 0; else exit 1}' )
then
echo " - found samtools $samtools_installed_VER"
else
echo "Required version of samtools $samtools_VER was not found"
install_samtools
fi
else
echo "samtools was not found"
install_samtools
fi
################################################################################
if ( checkSystemInstallation bamtools )
then
bamtools_installed_VER=`bamtools -v 2>&1| grep 'bamtools'|perl -nle 'print $& if m{\d+\.\d+.\d+}'`;
if ( echo $bamtools_installed_VER $bamtools_VER| awk '{if($2>=$3) exit 0; else exit 1}' )
then
echo " - found bamtools $bamtools_installed_VER"
else
echo "Required version of bamtools $bamtools_VER was not found"
install_bamtools
fi
else
echo "bamtools was not found"
install_bamtools
fi
################################################################################
if ( checkSystemInstallation gffread )
then
echo "gffread is found"
else
echo "gffread is not found"
install_gffread
fi
################################################################################
if ( checkSystemInstallation FaQCs )
then
echo "FaQCs is found"
else
echo "FaQCs is not found"
install_FaQCs
fi
################################################################################
# Python Modules
################################################################################
if ( checkPythonModule pandas)
then
python_pandas_installed_VER=`python -c "import pandas; print pandas.__version__" | perl -nle 'print $& if m{\d+\.\d+\.\d+}'`
if (echo $python_pandas_installed_VER $python_pandas_VER | awk '{if($1>=$2) exit 0; else exit 1}' )
then
echo " - found Python module pandas $python_pandas_installed_VER"
else
echo "Required version of pandas $python_pandas_VER was not found"
install_python_pandas
fi
else
echo "pandas was not found"
install_python_pandas
fi
################################################################################
if ( checkPythonModule luigi)
then
echo " - found Python module luigi"
else
install_python_luigi
fi
################################################################################
if ( checkPythonModule plumbum)
then
echo " - found Python module plumbum"
else
echo "plumbum was not found"
install_python_plumbum
fi
################################################################################
if ( checkPythonModule Bio)
then
python_Bio_installed_VER=`python -c "import Bio; print Bio.__version__" | perl -nle 'print $& if m{\d\.\d+}'`
if (echo $python_Bio_installed_VER $python_Bio_VER | awk '{if($1>=$2) exit 0; else exit 1}' )
then
echo " - found Python module Bio $python_Bio_installed_VER"
else
echo "Required version of Bio $python_Bio_VER was not found"
install_python_Bio
fi
else
echo "Bio was not found"
install_python_Bio
fi
#installing some lightweight developer tools
echo "Installing some developer tools codecov, coverage, pytest-cov"
conda install --yes -c conda-forge codecov -n piret
conda install --yes -c conda-forge coverage -n piret
conda install --yes -c conda-forge pytest-cov -n piret
echo "
All done! Please Restart the Terminal Session.
Run
runPiReT -h
for usage.
Read the README for more information!
To run a test data set
sh tests/test_pipeline_linux.sh
Thanks!
"