-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinstall_dependencies.sh
executable file
·1805 lines (1623 loc) · 69.7 KB
/
install_dependencies.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
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/bin/bash
# last update: 2024.05.24
set -e -o pipefail
#########################
VARATHON_HOME=$(pwd)
BUILD="build"
mainland_china_installation="no";
#########################
timestamp () {
date +"%F %T"
}
clean () {
dir=$1
if [ -d $dir ]
then
echo "remove previously failed installation in $BUILD/$dir"
rm -rf $dir
fi
}
#download () {
# url=$1
# download_location=$2
# echo "Downloading $url to $download_location"
# wget -c --no-check-certificate $url -O $download_location
#}
download () {
url=$1
download_location=$2
echo "Downloading $url to $download_location"
if [[ -f $1 ]];then
# if the tool has been downloaded and deposited in the local, then copy that to destination and install it
echo -n "The tool exists in the local: $1"
cp $1 $2
else
wget -c --no-check-certificate --max-redirect=30 $url -O $download_location
fi
}
clone () {
url=$1
dir=$(basename $url)
echo "run clone for \"git clone $url\""
git clone $url --depth 1
cd $dir
git fetch --unshallow
}
tidy_version () {
echo "$1" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }';
}
check_installed () {
if [ -e "$1/installed" ]; then
echo "installed"
else
echo ""
fi
}
note_installed () {
touch "$1/installed"
}
echo ""
echo ""
echo "##################################################################"
echo "### ###"
echo "### Welcome to Varathon ###"
echo "### ###"
echo "##################################################################"
echo ""
echo ""
echo "[$(timestamp)] Installation starts ..."
echo ""
if [ -z "$MAKE_JOBS" ]
then
echo "Defaulting to 2 concurrent jobs when executing make. Override with MAKE_JOBS=<NUM>"
MAKE_JOBS=2
fi
if [ ! -z "$INSTALL_DEPS" ]; then
echo "Installing Varathon build dependencies for Debian/Ubuntu."
echo "sudo privileges are required and you will be prompted to enter your password"
sudo apt-get update
xargs -a debiandeps sudo apt-get install -y
fi
while getopts ":hc" opt
do
case "${opt}" in
h)
echo "Usage:"
echo "bash install_dependencies.sh"
echo "When running installation within mainland China, please run this script with the '-c' option >"
echo "bash install_dependencies.sh -c"
echo "";;
c)
echo "Detected the '-c' option >"
echo "Set the conda source to the mirror sites in mainland_china for more stable internet access"
mainland_china_installation="yes";;
esac
done
echo "";
# genome simulation
SIMUG_VERSION="1.0.1" #
SIMUG_GITHUB_COMMIT_VERSION="16e4eea" # committed on 2022.05.25
SIMUG_DOWNLOAD_URL="https://github.com/yjx1217/simuG.git"
# reads retrieving/simulation/processing
SRA_VERSION="3.0.2" # released on 2022.12.12
SRA_DOWNLOAD_URL="https://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/${SRA_VERSION}/sratoolkit.${SRA_VERSION}-centos_linux64.tar.gz"
NANOPLOT_VERSION="1.41.0" # released on 2022.12.31
ART_VERSION="mountrainier2016.06.05" # released on 2016.06.05
ART_DOWNLOAD_URL="https://www.niehs.nih.gov/research/resources/assets/docs/artbin${ART_VERSION}linux64.tgz"
PBSIM3_VERSION="f3e5f1c" # committed on 2022.08.01
PBSIM3_DOWNLOAD_URL="https://github.com/yukiteruono/pbsim3.git"
TRIMMOMATIC_VERSION="0.39" # released on
TRIMMOMATIC_DOWNLOAD_URL="http://www.usadellab.org/cms/uploads/supplementary/Trimmomatic/Trimmomatic-${TRIMMOMATIC_VERSION}.zip"
PORECHOP_VERSION="0.2.4" #
PORECHOP_GITHUB_COMMIT_VERSION="109e437" # committed on 2018.10.19
PORECHOP_DOWNLOAD_URL="https://github.com/rrwick/Porechop.git"
FILTLONG_VERSION="0.2.1" #
FILTLONG_GITHUB_COMMIT_VERSION="c56f02b" # committed on 2021.07.30
FILTLONG_DOWNLOAD_URL="https://github.com/rrwick/Filtlong.git"
# alignment building/processing
BWA_VERSION="0.7.17" # released on 2017.10.23
BWA_GITHUB_COMMIT_VERSION="139f68f" # committed on 2021.07.30
BWA_DOWNLOAD_URL="https://github.com/lh3/bwa.git"
#BWA_DOWNLOAD_URL="https://github.com/lh3/bwa/releases/download/v${BWA_VERSION}/bwa-${BWA_VERSION}.tar.bz2"
BWAMEM2_VERSION="2.2.1" # released on 2021.03.17
BWAMEM2_DOWNLOAD_URL="https://github.com/bwa-mem2/bwa-mem2/releases/download/v${BWAMEM2_VERSION}/bwa-mem2-${BWAMEM2_VERSION}_x64-linux.tar.bz2"
LAST_VERSION="1452" # released on 2023.01.30
LAST_DOWNLOAD_URL="https://gitlab.com/mcfrith/last/-/archive/${LAST_VERSION}/last-${LAST_VERSION}.zip"
NGMLR_VERSION="0.2.7" # released on 2018.06.25
NGMLR_DOWNLOAD_URL="https://github.com/philres/ngmlr/releases/download/v${NGMLR_VERSION}/ngmlr-${NGMLR_VERSION}-linux-x86_64.tar.gz"
MINIMAP2_VERSION="2.24" # released on 2021.12.27
MINIMAP2_GITHUB_COMMIT_VERSION="1d3c3ee" # committed on 2023.02.14
MINIMAP2_DOWNLOAD_URL="https://github.com/lh3/minimap2/releases/download/v${MINIMAP2_VERSION}/minimap2-${MINIMAP2_VERSION}_x64-linux.tar.bz2"
WINNOWMAP_VERSION="2.03" # released on 2021.12.26
WINNOWMAP_GITHUB_COMMIT_VERSION="45078cf" # committed on 2022.04.05
WINNOWMAP_DOWNLOAD_URL="https://github.com/marbl/Winnowmap/archive/refs/tags/v${WINNOWMAP_VERSION}.tar.gz"
LRA_VERSION="1.3.4" # released on 2022.12.14
LRA_DOWNLOAD_URL="https://github.com/ChaissonLab/LRA/archive/refs/tags/${LRA_VERSION}.tar.gz"
PBMM2_VERSION="1.10.0" # released on 2023.01.10
# distributed via conda
GRAPHMAP_VERSION="0.5.2"
GRAPHMAP_GITHUB_COMMIT_VERSION="eb8c75d"
GRAPHMAP_DOWNLOAD_URL="https://github.com/isovic/graphmap"
#GRAPHMAP2_VERSION="0.6.4"
#GRAPHMAP2_DOWNLOAD_URL="https://github.com/lbcb-sci/graphmap2/releases/download/v0.6.4/prebuild.zip"
SAMTOOLS_VERSION="1.17" # released on 2023.02.21
SAMTOOLS_DOWNLOAD_URL="https://github.com/samtools/samtools/releases/download/${SAMTOOLS_VERSION}/samtools-${SAMTOOLS_VERSION}.tar.bz2"
HTSLIB_VERSION="1.17" # released on 2023.02.21
HTSLIB_DOWNLOAD_URL="https://github.com/samtools/htslib/releases/download/${HTSLIB_VERSION}/htslib-${HTSLIB_VERSION}.tar.bz2"
#SAMBAMBA_VERSION="1.14" # released on 2021.10.22
#SAMBAMBA_DOWNLOAD_URL="https://github.com/samtools/samtools/releases/download/${SAMTOOLS_VERSION}/samtools-${SAMTOOLS_VERSION}.tar.bz2"
PICARD_VERSION="2.27.5" # released on 2022.10.07
PICARD_DOWNLOAD_URL="https://github.com/broadinstitute/picard/releases/download/${PICARD_VERSION}/picard.jar"
#GATK3_VERSION="3.6-6-g965413b" #
#GATK3_DOWLOAD_URL="https://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/${SRA_VERSION}/GenomeAnalysisTK.jar"
GATK3_DOWNLOAD_URL="https://github.com/yjx1217/GATK3_Archive.git"
GEMTOOLS_VERSION="1.7.1"
GEMTOOLS_DOWNLOAD_URL="http://barnaserver.com/gemtools/releases/GEMTools-static-i3-${GEMTOOLS_VERSION}.tar.gz"
# variant calling
GATK4_VERSION="4.3.0.0" # released on 2022.10.13
GATK4_DOWNLOAD_URL="https://github.com/broadinstitute/gatk/releases/download/${GATK4_VERSION}/gatk-${GATK4_VERSION}.zip"
DEEPVARIANT_VERSION="1.4.0" # released on 2023.03.01
FREEBAYES_VERSION="1.3.6" # released on 2023.03.11
#FREEBAYES_SOURCE_DOWNLOAD_URL="https://github.com/freebayes/freebayes/archive/refs/tags/v${FREEBAYES_VERSION}.tar.gz"
XATLAS_VERSION="0.3"
XATLAS_GITHUB_COMMIT_VERSION="7324754"
XATLAS_DOWNLOAD_URL="https://github.com/jfarek/xatlas/archive/refs/tags/v${XATLAS_VERSION}.tar.gz"
VCFLIB_VERSION="1.0.3" # released on 2023.04.26
CLAIR3_VERSION="1.0.1" # released on 2023.04.26
CLAIR3ILLUMINA_VERSION="1.0.1" # released on 2023.03.08
LONGSHOT_VERSION="0.4.5" # released on 2022.05.03
#WHATSHAP_VERSION="1.2.1" # released on 2021.12.08
CNVKIT_VERSION="0.9.9" # released on 2021.05.29
FREEC_VERSION="11.6" # released on 2020.05.29
#FREEC_VERSION="11.4" # released on 2020.05.29
FREEC_DOWNLOAD_URL="https://github.com/BoevaLab/FREEC/archive/v${FREEC_VERSION}.tar.gz"
MANTA_VERSION="1.6.0" # released on 2019.07.10
MANTA_DOWNLOAD_URL="https://github.com/Illumina/manta/releases/download/v${MANTA_VERSION}/manta-${MANTA_VERSION}.centos6_x86_64.tar.bz2"
SVABA_VERSION="1.1.0" # released on 2022.03.03
DELLY_VERSION="1.1.6" # released on 2022.11.08
DELLY_DOWNLOAD_URL="https://github.com/dellytools/delly/releases/download/v${DELLY_VERSION}/delly_v${DELLY_VERSION}_linux_x86_64bit"
SVIM_VERSION="2.0.0" # released on 2021.06.18
SVIM_GITHUB_COMMIT_VERSION="a9b0985" # committed on 2021.06.29
SNIFFLES_VERSION="2.0.7" # released on 2022.07.25
SNIFFLES_DOWNLOAD_URL="https://github.com/fritzsedlazeck/Sniffles/archive/refs/tags/v${SNIFFLES_VERSION}.tar.gz"
PBSV_VERSION="2.8.0" # released on 2021.06.02
PBSV_GITHUB_COMMIT_VERSION="b9c5504"
PBSV_DOWNLOAD_URL="https://github.com/PacificBiosciences/pbsv"
PICKY_VERSION="0.2.a" # released on 2018.07.17
PICKY_GITHUB_COMMIT_VERSION="34b85ac" # committed on 2018.07.17
PICKY_DOWNLOAD_URL="https://github.com/TheJacksonLaboratory/Picky"
NANOSV_VERSION="1.2.4" # released on 2019.04.09
NANOSV_GITHUB_COMMIT_VERSION="c1ae30c" # committed on 2019.04.09
NANOSV_DOWNLOAD_URL="https://github.com/mroosmalen/nanosv"
NANOVAR_VERSION="1.4.1" # released on 2022.01.17
CUTESV_VERSION="2.0.2" # released on 2022.11.02
DEBREAK_VERSION="1.3" # released on 2022.09.02
DEBREAK_GITHUB_COMMIT_VERSION="56b3f94"
DEBREAK_DOWNLOAD_URL="https://github.com/ChongLab/DeBreak"
DUPHOLD_VERSION="0.2.3"
DUPHOLD_GITHUB_COMMIT_VERSION="e14d6ba"
DUPHOLD_DOWNLOAD_URL="https://github.com/brentp/duphold/releases/download/v0.2.3/duphold"
JASMINESV_VERSION="1.1.5" # released on 2022.04.28
USABLEVCF_GITHUB_COMMIT_VERSION="07c39ae" # commited on 2020.05.16
TRUVARI_VERSION="4.0.0" # released on 2023.03.14
SANSA_VERSION="0.0.8"
SANSA_DOWNLOAD_URL="https://github.com/dellytools/sansa/releases/download/v${SANSA_VERSION}/sansa_v${SANSA_VERSION}_linux_x86_64bit"
SAMPLOT_VERSION="1.3.0" # released on 2021.10.14
# variant processing
VT_VERSION="" # we use the github commit version below
VT_GITHUB_COMMIT_VERSION="f6d2b5d" # "ab6c13c" # committed on 2021.05.04
VT_DOWNLOAD_URL="https://github.com/atks/vt"
BCFTOOLS_VERSION="1.17" # released on 2018.07.18
BCFTOOLS_DOWNLOAD_URL="https://github.com/samtools/bcftools/releases/download/${BCFTOOLS_VERSION}/bcftools-${BCFTOOLS_VERSION}.tar.bz2"
MINICONDA3_VERSION="py38_4.9.2" # released on 2020.11.24
if [[ "$mainland_china_installation" == "no" ]]
then
MINICONDA3_DOWNLOAD_URL="https://repo.anaconda.com/miniconda/Miniconda3-${MINICONDA3_VERSION}-Linux-x86_64.sh"
else
MINICONDA3_DOWNLOAD_URL="https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-${MINICONDA3_VERSION}-Linux-x86_64.sh"
fi
PYTHON3_VERSION="3.8"
BEDTOOLS_VERSION="2.30.0" # released on 2021.01.24
BEDTOOLS_DOWNLOAD_URL="https://github.com/arq5x/bedtools2/releases/download/v${BEDTOOLS_VERSION}/bedtools-${BEDTOOLS_VERSION}.tar.gz"
BLAST_VERSION="2.2.31"
BLAST_DOWNLOAD_URL="https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/${BLAST_VERSION}/ncbi-blast-${BLAST_VERSION}+-x64-linux.tar.gz"
RMBLAST_VERSION="2.2.28"
RMBLAST_DOWNLOAD_URL="https://ftp.ncbi.nlm.nih.gov/blast/executables/rmblast/${RMBLAST_VERSION}/ncbi-rmblastn-${RMBLAST_VERSION}-x64-linux.tar.gz"
VEP_VERSION="109.3"
PARALLEL_VERSION="20180722" # released on 2018.07.22
PARALLEL_DOWNLOAD_URL="http://ftp.gnu.org/gnu/parallel/parallel-${PARALLEL_VERSION}.tar.bz2"
# MUMMER4_VERSION="4.0.0beta2" # released on 2017.10.14
# MUMMER4_DOWNLOAD_URL="https://github.com/gmarcais/mummer/releases/download/v${MUMMER_VERSION}/mummer-${MUMMER_VERSION}.tar.gz"
# GNUPLOT_VERSION="4.6.6"
# GNUPLOT_DOWNLOAD_URL="https://sourceforge.net/projects/gnuplot/files/gnuplot/${GNUPLOT_VERSION}/gnuplot-${GNUPLOT_VERSION}.tar.gz"
if [ -d $BUILD ]
then
echo ""
echo "[$(timestamp)] Detected previously generated $BUILD directory."
else
echo "[$(timestamp)] Create the new $BUILD directory."
mkdir $BUILD
echo ""
fi
cd $BUILD
build_dir=$(pwd)
# Downloading all the dependencies
echo ""
echo "[$(timestamp)] Download and install all the dependencies ..."
echo ""
# ---------- set Perl & R environment variables -------------
PYTHONPATH=""
PERL5LIB="$build_dir:$PERL5LIB"
PERL5LIB="$build_dir/cpanm/perlmods/lib/perl5:$PERL5LIB"
R_LIBS="$build_dir/R_libs:$R_LIBS"
echo "[$(timestamp)] Installing Perl modules ..."
cpanm_dir="$build_dir/cpanm"
if [ -z $(check_installed $cpanm_dir) ]; then
mkdir -p $cpanm_dir
cd $cpanm_dir
# wget -c --no-check-certificate -O - https://cpanmin.us/ > cpanm
# work around for the unstable downloading issue
cp $VARATHON_HOME/misc/cpanm .
chmod +x cpanm
mkdir -p perlmods
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --skip-installed Test::[email protected]
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --skip-installed [email protected]
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --skip-installed Statistics::[email protected]
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --skip-installed Statistics::Descriptive::[email protected]
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --skip-installed Math::[email protected]
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --skip-installed Math::[email protected]
note_installed $cpanm_dir
fi
echo "[$(timestamp)] Installing R libraries ..."
rlib_dir="$build_dir/R_libs"
mkdir -p $rlib_dir
cd $rlib_dir
R_VERSION=$(R --version |head -1 |cut -d " " -f 3)
if [ -z $(check_installed "$rlib_dir/optparse") ]; then
clean "$rlib_dir/optparse"
R -e "install.packages(\"optparse\", repos=\"http://cran.rstudio.com/\", lib=\"$build_dir/R_libs/\")"
note_installed "$rlib_dir/optparse"
fi
if [ -z $(check_installed "$rlib_dir/ggplot2") ]; then
clean "$rlib_dir/ggplot2"
R -e "install.packages(\"ggplot2\", repos=\"http://cran.rstudio.com/\", lib=\"$build_dir/R_libs/\")"
note_installed "$rlib_dir/ggplot2"
fi
if [ -z $(check_installed "$rlib_dir/scales") ]; then
clean "$rlib_dir/scales"
R -e "install.packages(\"scales\", repos=\"http://cran.rstudio.com/\", lib=\"$build_dir/R_libs/\")"
note_installed "$rlib_dir/scales"
fi
if [ -z $(check_installed "$rlib_dir/viridis") ]; then
clean "$rlib_dir/viridis"
R -e "install.packages(\"viridis\", repos=\"http://cran.rstudio.com/\", lib=\"$build_dir/R_libs/\")"
note_installed "$rlib_dir/viridis"
fi
if [ -z $(check_installed "$rlib_dir/DNAcopy") ]; then
clean "$rlib_dir/DNAcopy"
if [ $(tidy_version "$R_VERSION") -ge $(tidy_version "3.6.0") ]
then
echo "R_VERSION=$R_VERSION, use the new bioconductor installation protocol"
R -e ".libPaths(\"$build_dir/R_libs/\");install.packages(\"BiocManager\", repos=\"http://cran.rstudio.com/\", lib=\"$build_dir/R_libs/\");BiocManager::install(\"DNAcopy\", lib=\"$build_dir/R_libs/\")"
else
echo "R_VERSION=$R_VERSION, use the old bioconductor installation protocol"
R -e ".libPaths(\"$build_dir/R_libs/\");source(\"https://bioconductor.org/biocLite.R\");biocLite(\"DNAcopy\", lib=\"$build_dir/R_libs/\", type = \"source\")"
fi
note_installed "$rlib_dir/DNAcopy"
fi
# install dependencies
# # ------------- Miniconda2 --------------------
# miniconda2_dir="$build_dir/miniconda2/bin"
# if [ -z $(check_installed $miniconda2_dir) ]; then
# cd $build_dir
# download $MINICONDA2_DOWNLOAD_URL "Miniconda2-${MINICONDA2_VERSION}-Linux-x86_64.sh"
# bash Miniconda2-${MINICONDA2_VERSION}-Linux-x86_64.sh -b -p $build_dir/miniconda2
# if [[ "$mainland_china_installation" == "yes" ]]
# then
# $miniconda2_dir/conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/pkgs/main
# $miniconda2_dir/conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/pkgs/free
# $miniconda2_dir/conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/pkgs/pro
# $miniconda2_dir/conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/pkgs/msys2
# $miniconda2_dir/conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
# $miniconda2_dir/conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/cloud/bioconda
# $miniconda2_dir/conda config --add channels https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/main
# $miniconda2_dir/conda config --add channels https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/free
# $miniconda2_dir/conda config --add channels https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/pro
# $miniconda2_dir/conda config --add channels https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/msys2
# $miniconda2_dir/conda config --add channels https://anaconda.mirrors.sjtug.sjtu.edu.cn/cloud/conda-forge
# $miniconda2_dir/conda config --add channels https://anaconda.mirrors.sjtug.sjtu.edu.cn/cloud/bioconda
# else
# $miniconda2_dir/conda config --add channels defaults
# $miniconda2_dir/conda config --add channels bioconda
# $miniconda2_dir/conda config --add channels conda-forge
# fi
# $miniconda2_dir/conda config --set show_channel_urls yes
# $miniconda2_dir/conda config --set channel_priority flexible
# rm Miniconda2-${MINICONDA2_VERSION}-Linux-x86_64.sh
# note_installed $miniconda2_dir
# else
# if [[ "$mainland_china_installation" == "yes" ]]
# then
# $miniconda2_dir/conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/pkgs/main
# $miniconda2_dir/conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/pkgs/free
# $miniconda2_dir/conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/pkgs/pro
# $miniconda2_dir/conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/pkgs/msys2
# $miniconda2_dir/conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
# $miniconda2_dir/conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/cloud/bioconda
# $miniconda2_dir/conda config --add channels https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/main
# $miniconda2_dir/conda config --add channels https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/free
# $miniconda2_dir/conda config --add channels https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/pro
# $miniconda2_dir/conda config --add channels https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/msys2
# $miniconda2_dir/conda config --add channels https://anaconda.mirrors.sjtug.sjtu.edu.cn/cloud/conda-forge
# $miniconda2_dir/conda config --add channels https://anaconda.mirrors.sjtug.sjtu.edu.cn/cloud/bioconda
# else
# $miniconda2_dir/conda config --add channels defaults
# $miniconda2_dir/conda config --add channels bioconda
# $miniconda2_dir/conda config --add channels conda-forge
# fi
# $miniconda2_dir/conda config --set show_channel_urls yes
# $miniconda2_dir/conda config --set channel_priority flexible
# fi
# ------------- Miniconda3 --------------------
echo "[$(timestamp)] Installing miniconda3 ..."
miniconda3_dir="$build_dir/miniconda3/bin"
if [ -z $(check_installed $miniconda3_dir) ]; then
cd $build_dir
clean "$build_dir/miniconda3"
download $MINICONDA3_DOWNLOAD_URL "Miniconda3-${MINICONDA3_VERSION}-Linux-x86_64.sh"
bash Miniconda3-${MINICONDA3_VERSION}-Linux-x86_64.sh -b -p $build_dir/miniconda3
if [[ "$mainland_china_installation" == "yes" ]]
then
$miniconda3_dir/conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/pkgs/main
$miniconda3_dir/conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/pkgs/free
$miniconda3_dir/conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/pkgs/pro
$miniconda3_dir/conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/pkgs/msys2
$miniconda3_dir/conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/cloud/bioconda
$miniconda3_dir/conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
$miniconda3_dir/conda config --add channels https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/main
$miniconda3_dir/conda config --add channels https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/free
$miniconda3_dir/conda config --add channels https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/pro
$miniconda3_dir/conda config --add channels https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/msys2
$miniconda3_dir/conda config --add channels https://anaconda.mirrors.sjtug.sjtu.edu.cn/cloud/bioconda
$miniconda3_dir/conda config --add channels https://anaconda.mirrors.sjtug.sjtu.edu.cn/cloud/conda-forge
else
$miniconda3_dir/conda config --add channels defaults
$miniconda3_dir/conda config --add channels bioconda
$miniconda3_dir/conda config --add channels conda-forge
fi
$miniconda3_dir/conda config --set ssl_verify false
$miniconda3_dir/conda config --set show_channel_urls yes
$miniconda3_dir/conda config --set channel_priority flexible
$miniconda3_dir/conda config --set report_errors false
$miniconda3_dir/conda clean -i
# $miniconda3_dir/conda install pip numpy scipy cython pysam
cd $build_dir
rm Miniconda3-${MINICONDA3_VERSION}-Linux-x86_64.sh
note_installed $miniconda3_dir
else
if [[ "$mainland_china_installation" == "yes" ]]
then
$miniconda3_dir/conda clean -i
$miniconda3_dir/conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/pkgs/main
$miniconda3_dir/conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/pkgs/free
$miniconda3_dir/conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/pkgs/pro
$miniconda3_dir/conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/pkgs/msys2
$miniconda3_dir/conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/cloud/bioconda
$miniconda3_dir/conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
$miniconda3_dir/conda config --add channels https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/main
$miniconda3_dir/conda config --add channels https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/free
$miniconda3_dir/conda config --add channels https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/pro
$miniconda3_dir/conda config --add channels https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/msys2
$miniconda3_dir/conda config --add channels https://anaconda.mirrors.sjtug.sjtu.edu.cn/cloud/bioconda
$miniconda3_dir/conda config --add channels https://anaconda.mirrors.sjtug.sjtu.edu.cn/cloud/conda-forge
else
$miniconda3_dir/conda config --add channels defaults
$miniconda3_dir/conda config --add channels bioconda
$miniconda3_dir/conda config --add channels conda-forge
fi
$miniconda3_dir/conda config --set ssl_verify false
$miniconda3_dir/conda config --set show_channel_urls yes
$miniconda3_dir/conda config --set channel_priority flexible
$miniconda3_dir/conda config --set report_errors false
$miniconda3_dir/conda clean -i
fi
# ------------- simuG -------------------
echo ""
echo "[$(timestamp)] Installing simuG ..."
simuG_dir="$build_dir/simuG"
if [ -z $(check_installed $simuG_dir) ]; then
cd $build_dir
clean "$build_dir/simuG"
echo "Download simuG-v${SIMUG_VERSION}"
git clone $SIMUG_DOWNLOAD_URL
cd simuG
git checkout -f -q $SIMUG_GITHUB_COMMIT_VERSION
note_installed $simuG_dir
fi
# ------------- SRA Toolkit -------------------
echo ""
echo "[$(timestamp)] Installing SRA toolkit ..."
sra_dir="$build_dir/sratoolkit.${SRA_VERSION}-centos_linux64/bin"
if [ -z $(check_installed $sra_dir) ]; then
cd $build_dir
clean "$build_dir/sratoolkit.${SRA_VERSION}-centos_linux64"
echo "Download SRAtoolkit-v${SRA_VERSION}"
download $SRA_DOWNLOAD_URL sratoolkit.${SRA_VERSION}-centos_linux64.tar.gz
tar -xzf sratoolkit.${SRA_VERSION}-centos_linux64.tar.gz
rm sratoolkit.${SRA_VERSION}-centos_linux64.tar.gz
note_installed $sra_dir
fi
# --------------- Nanoplot --------------------
echo ""
echo "[$(timestamp)] Installing nanoplot ..."
nanoplot_dir="$build_dir/nanoplot_conda_env/bin"
if [ -z $(check_installed $nanoplot_dir) ]; then
cd $build_dir
clean "$build_dir/nanoplot_conda_env"
$miniconda3_dir/conda create -y -p $build_dir/nanoplot_conda_env python=${PYTHON3_VERSION}
source $miniconda3_dir/activate $build_dir/nanoplot_conda_env
# if [[ "$mainland_china_installation" == "yes" ]]; then
# $miniconda3_dir/conda install -y nanoplot=${NANOPLOT_VERSION}
# else
# $miniconda3_dir/conda install -y -c bioconda nanoplot=${NANOPLOT_VERSION}
# fi
$miniconda3_dir/pip3 install NanoPlot==${NANOPLOT_VERSION}
source $miniconda3_dir/deactivate
note_installed $nanoplot_dir
fi
# ------------- ART -------------------
echo ""
echo "[$(timestamp)] Installing ART ..."
art_dir="$build_dir/art_bin_MountRainier"
if [ -z $(check_installed $art_dir) ]; then
cd $build_dir
clean "$build_dir/art_bin_MountRainier"
echo "Download ART-v${ART_VERSION}"
download $ART_DOWNLOAD_URL artbin${ART_VERSION}linux64.tgz
tar -zxf artbin${ART_VERSION}linux64.tgz
rm artbin${ART_VERSION}linux64.tgz
note_installed $art_dir
fi
# ------------- PBSIM3 -------------------
echo ""
echo "[$(timestamp)] Installing pbsim3 ..."
pbsim3_dir="$build_dir/pbsim3/build"
if [ -z $(check_installed $pbsim3_dir) ]; then
cd $build_dir
clean "$build_dir/pbsim3"
echo "Download pbsim3-v${PBSIM3_VERSION}"
git clone $PBSIM3_DOWNLOAD_URL
cd $build_dir/pbsim3
git checkout -f -q $PBSIM3_GITHUB_COMMIT_VERSION
mkdir build
./configure --prefix="$(pwd)/build"
make
make install
note_installed $pbsim3_dir
fi
# # # -------------- SimLoRD ----------------
# echo ""
# echo "[$(timestamp)] Installing SimLoRd ..."
# simlord_dir="$build_dir/simlord_conda_env/bin"
# if [ -z $(check_installed $simlord_dir) ]; then
# cd $build_dir
# clean "$build_dir/simlord_conda_env"
# echo "Download simlord-v${SIMLORD_VERSION}"
# $miniconda3_dir/conda create -y -p $build_dir/simlord_conda_env python=${PYTHON3_VERSION} pip
# source $miniconda3_dir/activate $build_dir/simlord_conda_env
# # if [[ "$mainland_china_installation" == "yes" ]]; then
# # $miniconda3_dir/conda install -y simlord=${SIMLORD_VERSION}
# # else
# # $miniconda3_dir/conda install -y -c bioconda simlord=${SIMLORD_VERSION}
# # fi
# $miniconda3_dir/pip3 install numpy==1.21.4
# $miniconda3_dir/pip3 install cython==0.29.24
# $miniconda3_dir/pip3 install scipy==1.7.2
# $miniconda3_dir/pip3 install pysam==0.17.0
# $miniconda3_dir/pip3 install dinopy==2.2.0
# $miniconda3_dir/pip3 install "simlord==${SIMLORD_VERSION}"
# source $miniconda3_dir/deactivate
# note_installed $simlord_dir
# fi
# # -------------- NanoSim ----------------
# echo ""
# echo "[$(timestamp)] Installing NanoSim ..."
# nanosim_dir="$build_dir/nanosim_conda_env/bin"
# if [ -z $(check_installed $nanosim_dir) ]; then
# cd $build_dir
# clean "$build_dir/nanosim_conda_env"
# echo "Download NanoSim-v${NANOSIM_VERSION}"
# $miniconda3_dir/conda create -y -p $build_dir/nanosim_conda_env python=${PYTHON3_VERSION} # pip numpy scipy cython
# source $miniconda3_dir/activate $build_dir/nanosim_conda_env
# if [[ "$mainland_china_installation" == "yes" ]]; then
# $miniconda3_dir/conda install -y nanosim=${NANOSIM_VERSION}
# else
# $miniconda3_dir/conda install -y -c bioconda nanosim=${NANOSIM_VERSION}
# fi
# source $miniconda3_dir/deactivate
# note_installed $nanosim_dir
# fi
# # -------------- DeepSimulator ----------------
# deepsimulator_dir="$build_dir/DeepSimulator"
# if [ -z $(check_installed $deepsimulator_dir) ]; then
# cd $build_dir
# clean $deepsimulator_dir
# echo "Download DeepSimulator-v${DEEPSIMULATOR_GITHUB_COMMIT_VERSION}"
# # git clone $DEEPSIMULATOR_DOWNLOAD_URL
# clone $DEEPSIMULATOR_DOWNLOAD_URL
# cd $deepsimulator_dir
# git checkout -f -q $DEEPSIMULATOR_GITHUB_COMMIT_VERSION
# $miniconda2_dir/conda remove --name tensorflow_cdpm --all -y
# $miniconda2_dir/conda create --name tensorflow_cdpm python=2.7 -y
# source $miniconda2_dir/activate tensorflow_cdpm
# $miniconda2_dir/conda install -y -c anaconda scikit-learn=0.20.3
# $miniconda2_dir/pip install numpy==1.13.1
# if [[ "$mainland_china_installation" == "yes" ]]
# then
# $miniconda2_dir/pip install tensorflow==1.2.1 -i https://pypi.tuna.tsinghua.edu.cn/simple/
# else
# $miniconda2_dir/pip install tensorflow==1.2.1
# fi
# $miniconda2_dir/pip install tflearn==0.3.2
# $miniconda2_dir/pip install tqdm==4.19.4
# $miniconda2_dir/pip install scipy==0.18.1
# $miniconda2_dir/pip install h5py==2.7.1
# $miniconda2_dir/pip install biopython==1.74
# source $miniconda2_dir/deactivate
# $miniconda2_dir/conda remove --name basecall --all -y
# $miniconda2_dir/conda create --name basecall python=${PYTHON3_VERSION} -y
# source $miniconda2_dir/activate basecall
# #-> 2. install basecaller
# #--| 2.1 install albacore_2.3.1
# cd base_caller/albacore_2.3.1/
# wget -q https://mirror.oxfordnanoportal.com/software/analysis/ont_albacore-2.3.1-cp36-cp36m-manylinux1_x86_64.whl
# pip install ont_albacore-2.3.1-cp36-cp36m-manylinux1_x86_64.whl
# rm -f ont_albacore-2.3.1-cp36-cp36m-manylinux1_x86_64.whl
# cd ../../
# #--| 2.2 install guppy_3.1.5
# cd base_caller/guppy_3.1.5/
# wget -q https://mirror.oxfordnanoportal.com/software/analysis/ont-guppy-cpu_3.1.5_linux64.tar.gz
# tar xzf ont-guppy-cpu_3.1.5_linux64.tar.gz
# rm -f ont-guppy-cpu_3.1.5_linux64.tar.gz
# cd ../../
# source $miniconda2_dir/deactivate
# cd $deepsimulator_dir
# note_installed $deepsimulator_dir
# fi
# --------------- Trimmomatic -----------------
echo ""
echo "[$(timestamp)] Installing trimmomatic ..."
trimmomatic_dir="$build_dir/Trimmomatic-${TRIMMOMATIC_VERSION}"
if [ -z $(check_installed $trimmomatic_dir) ]; then
cd $build_dir
clean "$build_dir/Trimmomatic-${TRIMMOMATIC_VERSION}"
echo "Download Trimmomatic-v${TRIMMOMATIC_VERSION}"
download $TRIMMOMATIC_DOWNLOAD_URL "Trimmomatic-${TRIMMOMATIC_VERSION}.zip"
unzip Trimmomatic-${TRIMMOMATIC_VERSION}.zip
cd $trimmomatic_dir
chmod 755 trimmomatic-${TRIMMOMATIC_VERSION}.jar
ln -s trimmomatic-${TRIMMOMATIC_VERSION}.jar trimmomatic.jar
cat $trimmomatic_dir/adapters/*.fa |sed 's/>/\n>/' > adapters.fa
cd $build_dir
rm Trimmomatic-${TRIMMOMATIC_VERSION}.zip
note_installed $trimmomatic_dir
fi
# --------------- Porechop ------------------
echo ""
echo "[$(timestamp)] Installing Porechop ..."
porechop_dir="$build_dir/porechop_conda_env/bin"
if [ -z $(check_installed $porechop_dir) ]; then
cd $build_dir
clean "$build_dir/porechop_conda_env"
echo "Download Porechop-v${PORECHOP_VERSION}"
$miniconda3_dir/conda create -y -p $build_dir/porechop_conda_env python=${PYTHON3_VERSION}
source $miniconda3_dir/activate $build_dir/porechop_conda_env
if [[ "$mainland_china_installation" == "yes" ]]; then
$miniconda3_dir/conda install -y porechop=${PORECHOP_VERSION}
else
$miniconda3_dir/conda install -y -c bioconda porechop=${PORECHOP_VERSION}
fi
source $miniconda3_dir/deactivate
note_installed $porechop_dir
fi
# --------------- Filtlong ------------------
echo ""
echo "[$(timestamp)] Installing Filtlong ..."
filtlong_dir="$build_dir/Filtlong/bin"
if [ -z $(check_installed $filtlong_dir) ]; then
cd $build_dir
clean "$build_dir/Filtlong"
echo "Download Filtlong-v${FILTLONG_VERSION}"
git clone $FILTLONG_DOWNLOAD_URL
cd Filtlong
git checkout -f -q $FILTLONG_GITHUB_COMMIT_VERSION
make -j $MAKE_JOBS
note_installed $filtlong_dir
fi
# ------------- BWA -------------------
echo ""
echo "[$(timestamp)] Installing bwa ..."
bwa_dir="$build_dir/bwa"
if [ -z $(check_installed $bwa_dir) ]; then
cd $build_dir
clean "$build_dir/bwa"
echo "Download BWA-v${BWA_VERSION}"
#download $BWA_DOWNLOAD_URL "bwa-${BWA_VERSION}.tar.bz2"
#tar -xjf bwa-${BWA_VERSION}.tar.bz2
git clone $BWA_DOWNLOAD_URL
cd $bwa_dir
git checkout -f -q $BWA_GITHUB_COMMIT_VERSION
make -j $MAKE_JOBS
cd $build_dir
#rm bwa-${BWA_VERSION}.tar.bz2
note_installed $bwa_dir
fi
# ------------- BWA-MEM2 -------------------
echo ""
echo "[$(timestamp)] Installing bwa-mem2 ..."
bwamem2_dir="$build_dir/bwa-mem2-${BWAMEM2_VERSION}_x64-linux"
if [ -z $(check_installed $bwamem2_dir) ]; then
cd $build_dir
clean "$build_dir/bwa-mem2-${BWAMEM2_VERSION}_x64-linux"
echo "Download BWAMEM2-v${BWAMEM2_VERSION}"
download $BWAMEM2_DOWNLOAD_URL "bwa-mem2-${BWAMEM2_VERSION}.tar.bz2"
tar -xjf bwa-mem2-${BWAMEM2_VERSION}.tar.bz2
cd $build_dir
rm bwa-mem2-${BWAMEM2_VERSION}.tar.bz2
note_installed $bwamem2_dir
fi
# ------------- LAST -------------------
echo ""
echo "[$(timestamp)] Installing LAST ..."
last_dir="$build_dir/last-${LAST_VERSION}/bin"
if [ -z $(check_installed $last_dir) ]; then
cd $build_dir
if [ -f last-${LAST_VERSION}.zip ]; then
rm last-${LAST_VERSION}.zip
fi
clean "$build_dir/last-${LAST_VERSION}"
echo "Download LAST-v${LAST_VERSION}"
download $LAST_DOWNLOAD_URL "last-${LAST_VERSION}.zip"
unzip "last-${LAST_VERSION}.zip"
cd "$build_dir/last-${LAST_VERSION}/src"
make -j $MAKE_JOBS
cd ..
cd $build_dir
rm last-${LAST_VERSION}.zip
note_installed $last_dir
fi
# ------------- NGMLR -------------------
echo ""
echo "[$(timestamp)] Installing NGMLR ..."
ngmlr_dir="$build_dir/ngmlr-${NGMLR_VERSION}"
if [ -z $(check_installed $ngmlr_dir) ]; then
cd $build_dir
clean "$build_dir/ngmlr-${NGMLR_VERSION}"
echo "Download NGMLR-v${NGMLR_VERSION}"
download $NGMLR_DOWNLOAD_URL "ngmlr-${NGMLR_VERSION}.tar.gz"
tar xvzf "ngmlr-${NGMLR_VERSION}.tar.gz"
rm ngmlr-${NGMLR_VERSION}.tar.gz
note_installed $ngmlr_dir
fi
# --------------- minimap2 ------------------
echo ""
echo "[$(timestamp)] Installing minimap2 ..."
minimap2_dir="$build_dir/minimap2-${MINIMAP2_VERSION}_x64-linux"
if [ -z $(check_installed $minimap2_dir) ]; then
cd $build_dir
clean "$build_dir/minimap2-${MINIMAP2_VERSION}_x64-linux"
echo "Download minimap2-v${MINIMAP2_VERSION}"
download $MINIMAP2_DOWNLOAD_URL "minimap2-${MINIMAP2_VERSION}.tar.bz2"
tar xvjf minimap2-${MINIMAP2_VERSION}.tar.bz2
rm minimap2-${MINIMAP2_VERSION}.tar.bz2
note_installed $minimap2_dir
fi
# --------------- winnowmap ------------------
echo ""
echo "[$(timestamp)] Installing winnowmap ..."
winnowmap_dir="$build_dir/Winnowmap-${WINNOWMAP_VERSION}/bin"
if [ -z $(check_installed $winnowmap_dir) ]; then
cd $build_dir
clean "$build_dir/Winnowmap-${WINNOWMAP_VERSION}"
echo "Download winnowmap-v${WINNOWMAP_VERSION}"
download $WINNOWMAP_DOWNLOAD_URL "winnowmap-${WINNOWMAP_VERSION}.tar.gz"
tar xvzf winnowmap-${WINNOWMAP_VERSION}.tar.gz
cd $build_dir/Winnowmap-${WINNOWMAP_VERSION}
make -j $MAKE_JOBS
cd $build_dir
rm winnowmap-${WINNOWMAP_VERSION}.tar.gz
note_installed $winnowmap_dir
fi
# --------------- LRA -----------------
echo ""
echo "[$(timestamp)] Installing lra ..."
lra_dir="$build_dir/lra_conda_env/bin"
if [ -z $(check_installed $lra_dir) ]; then
cd $build_dir
clean "$build_dir/lra_conda_env"
echo "Download lra-v${LRA_VERSION}"
$miniconda3_dir/conda create -y -p $build_dir/lra_conda_env python=${PYTHON3_VERSION}
source $miniconda3_dir/activate $build_dir/lra_conda_env
if [[ "$mainland_china_installation" == "yes" ]]; then
$miniconda3_dir/conda install -y lra=${LRA_VERSION}
else
$miniconda3_dir/conda install -y -c bioconda lra=${LRA_VERSION}
fi
source $miniconda3_dir/deactivate
note_installed $lra_dir
fi
# --------------- pbmm2 -----------------
echo ""
echo "[$(timestamp)] Installing pbmm2 ..."
pbmm2_dir="$build_dir/pbmm2_conda_env/bin"
if [ -z $(check_installed $pbmm2_dir) ]; then
cd $build_dir
clean "$build_dir/pbmm2_conda_env"
echo "Download pbmm2-v${PBMM2_VERSION}"
$miniconda3_dir/conda create -y -p $build_dir/pbmm2_conda_env python=${PYTHON3_VERSION}
source $miniconda3_dir/activate $build_dir/pbmm2_conda_env
if [[ "$mainland_china_installation" == "yes" ]]; then
$miniconda3_dir/conda install -y pbmm2=${PBMM2_VERSION}
else
$miniconda3_dir/conda install -y -c bioconda pbmm2=${PBMM2_VERSION}
fi
source $miniconda3_dir/deactivate
note_installed $pbmm2_dir
fi
# --------------- GraphMap ------------------
echo ""
echo "[$(timestamp)] Installing GraphMap ..."
graphmap_dir="$build_dir/graphmap/bin/Linux-x64"
if [ -z $(check_installed $graphmap_dir) ]; then
cd $build_dir
clean "$build_dir/graphmap"
echo "Download graphmap-v${GRAPHMAP_VERSION}"
git clone $GRAPHMAP_DOWNLOAD_URL
cd graphmap
git checkout -f -q $GRAPHMAP_GITHUB_COMMIT_VERSION
cd codebase
git clone https://github.com/isovic/seqlib.git
git clone https://github.com/isovic/argumentparser.git
git clone https://github.com/isovic/gindex
# make modules
cd ..
make -j $MAKE_JOBS
note_installed $graphmap_dir
fi
# # --------------- GraphMap2 ------------------
# echo ""
# echo "[$(timestamp)] Installing GraphMap2 ..."
# graphmap2_dir="$build_dir/graphmap2-${GRAPHMAP2_VERSION}"
# if [ -z $(check_installed $graphmap2_dir) ]; then
# cd $build_dir
# clean $graphmap2_dir
# echo "Download graphmap2-v${GRAPHMAP2_VERSION}"
# download $GRAPHMAP2_DOWNLOAD_URL "graphmap2-${GRAPHMAP2_VERSION}.zip"
# unzip graphmap2-${GRAPHMAP2_VERSION}.zip
# mv prebuild graphmap2-${GRAPHMAP2_VERSION}
# cd graphmap2-${GRAPHMAP2_VERSION}
# ln -s graphmap-linux graphmap
# rm graphmap2-${GRAPHMAP2_VERSION}.zip
# note_installed $graphmap2_dir
# fi
# --------------- samtools -----------------
echo ""
echo "[$(timestamp)] Installing samtools,htslib,tabix ..."
samtools_dir="$build_dir/samtools-${SAMTOOLS_VERSION}"
htslib_dir="$samtools_dir/htslib-${HTSLIB_VERSION}"
tabix_dir="$samtools_dir/htslib-${HTSLIB_VERSION}"
if [ -z $(check_installed $samtools_dir) ]; then
cd $build_dir
clean "$build_dir/samtools-${SAMTOOLS_VERSION}"
echo "Download samtools-v${SAMTOOLS_VERSION}"
download $SAMTOOLS_DOWNLOAD_URL "samtools-${SAMTOOLS_VERSION}.tar.bz2"
tar xvjf samtools-${SAMTOOLS_VERSION}.tar.bz2
cd $samtools_dir
C_INCLUDE_PATH=""
./configure --without-curses;
make -j $MAKE_JOBS
cd htslib-${HTSLIB_VERSION}
./configure
make -j $MAKE_JOBS
cd $build_dir
rm samtools-${SAMTOOLS_VERSION}.tar.bz2
note_installed $samtools_dir
fi
PATH="$samtools_dir:$htslib_dir:$tabix_dir:${PATH}"
# --------------- Picard -----------------
echo ""
echo "[$(timestamp)] Installing Picard ..."
picard_dir="$build_dir/Picard-v${PICARD_VERSION}"
if [ -z $(check_installed $picard_dir) ]; then
cd $build_dir
clean "$build_dir/Picard-v${PICARD_VERSION}"
echo "Download Picard-v${PICARD_VERSION}"
download $PICARD_DOWNLOAD_URL "picard.jar"
mkdir Picard-v${PICARD_VERSION}
mv picard.jar $picard_dir
cd $picard_dir
chmod 755 picard.jar
note_installed $picard_dir
fi
# --------------- GATK3 ------------------
echo ""
echo "[$(timestamp)] Installing GATK3 ..."
gatk3_dir="$build_dir/GATK3"
if [ -z $(check_installed $gatk3_dir) ]; then
cd $build_dir
clean "$build_dir/GATK3"
echo "Create GATK3 folder for users' manual installation"
mkdir GATK3
cd GATK3
# download "https://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/${SRA_VERSION}/GenomeAnalysisTK.jar" GenomeAnalysisTK.jar
git clone $GATK3_DOWNLOAD_URL
mv ./GATK3_Archive/gatk3.jar.gz .
gunzip gatk3.jar.gz
mv gatk3.jar GenomeAnalysisTK.jar
chmod 755 GenomeAnalysisTK.jar
ln -s GenomeAnalysisTK.jar gatk3.jar
note_installed $gatk3_dir
fi
# --------------- GEM-Tools -----------------
echo ""
echo "[$(timestamp)] Installing GEM-Tools ..."
gemtools_dir="$build_dir/gemtools-${GEMTOOLS_VERSION}-i3/bin"
if [ -z $(check_installed $gemtools_dir) ]; then
cd $build_dir
clean "$build_dir/gemtools-${GEMTOOLS_VERSION}-i3"
echo "Download GEMTOOLS-v${GEMTOOLS_VERSION}"
download $GEMTOOLS_DOWNLOAD_URL "gemtools-${GEMTOOLS_VERSION}.tar.gz"
tar xvzf "gemtools-${GEMTOOLS_VERSION}.tar.gz"