-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathinstall_dependencies.sh
executable file
·2070 lines (1853 loc) · 78.4 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: 2022/12/21
set -e -o pipefail
LRSDAY_HOME=$(pwd)
BUILD="build"
lite_installation="no";
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
}
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 LRSDAY ###"
echo "### ###"
echo "##################################################################"
echo ""
echo ""
echo "[$(timestamp)] Installation starts ..."
echo ""
while getopts ":hlc" opt
do
case "${opt}" in
h)
echo "Usage:"
echo "bash install_dependencies.sh"
echo "When installing within mainland China, please run this script with the '-c' option >"
echo "bash install_dependencies.sh -c";;
l)
echo "Detected the '-l' option >"
echo "Set installation mode as 'lite' by skipping the installation of a few non-essential dependencies"
lite_installation="yes";;
c)
echo "Detected the '-c' option >"
echo "Set installation location as 'mainland_china'"
mainland_china_installation="yes";;
esac
done
echo "";
# echo "mainland_china_installation=$mainland_china_installation"
if [ -z "$MAKE_JOBS" ]
then
echo "[$(timestamp)] Defaulting to 2 concurrent jobs when executing make. Override with MAKE_JOBS=<NUM>"
MAKE_JOBS=2
fi
if [ ! -z "$INSTALL_DEPS" ]; then
echo "Installing LRSDAY 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
MINICONDA2_VERSION="py27_4.8.3" # released on 2020.06.06
if [[ "$mainland_china_installation" == "no" ]]
then
MINICONDA2_DOWNLOAD_URL="https://repo.anaconda.com/miniconda/Miniconda2-${MINICONDA2_VERSION}-Linux-x86_64.sh"
else
MINICONDA2_DOWNLOAD_URL="https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda2-${MINICONDA2_VERSION}-Linux-x86_64.sh"
fi
MINICONDA3_VERSION="py37_4.9.2" # released on 2020.11.23
if [[ "$mainland_china_installation" == "yes" ]]
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
# for reads preparation and preprocessing
GUPPY_VERSION="6.2.1" # released on 2022.06.07
GUPPY_GPU_DOWNLOAD_URL="https://mirror.oxfordnanoportal.com/software/analysis/ont-guppy_${GUPPY_VERSION}_linux64.tar.gz"
GUPPY_CPU_DOWNLOAD_URL="https://mirror.oxfordnanoportal.com/software/analysis/ont-guppy-cpu_${GUPPY_VERSION}_linux64.tar.gz"
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.01
FILTLONG_DOWNLOAD_URL="https://github.com/rrwick/Filtlong.git"
NANOPLOT_VERSION="1.40.0" # released on 2022.04.08
# for genome assembly
MINIMAP2_VERSION="2.22" # released on 2021.08.07
MINIMAP2_DOWNLOAD_URL="https://github.com/lh3/minimap2/releases/download/v${MINIMAP2_VERSION}/minimap2-${MINIMAP2_VERSION}_x64-linux.tar.bz2"
CANU_VERSION="2.2" # released on 2021.08.27
CANU_DOWNLOAD_URL="https://github.com/marbl/canu/releases/download/v${CANU_VERSION}/canu-${CANU_VERSION}.Linux-amd64.tar.xz"
# WHATSHAP_VERSION="1.1"
FLYE_VERSION="2.9.1" # released on 2021.08.22
FLYE_DOWNLOAD_URL="https://github.com/fenderglass/Flye/archive/${FLYE_VERSION}.tar.gz"
WTDBG2_VERSION="2.5" #
WTDBG2_GITHUB_COMMIT_VERSION="b77c565" # committed on 2020.12.11
WTDBG2_DOWNLOAD_URL="https://github.com/ruanjue/wtdbg2.git"
SMARTDENOVO_VERSION="" #
SMARTDENOVO_GITHUB_COMMIT_VERSION="8488de9" # committed on 2021.02.24
SMARTDENOVO_DOWNLOAD_URL="https://github.com/ruanjue/smartdenovo"
RAVEN_VERSION="1.8.1" # released on 2022.08.04
RAVEN_GITHUB_COMMIT_VERSION="0ea10b3"
#RAVEN_DOWNLOAD_URL="https://github.com/lbcb-sci/raven/releases/download/${RAVEN_VERSION}/raven-v${RAVEN_VERSION}.tar.gz"
SHASTA_VERSION="0.11.1" #
SHASTA_GITHUB_COMMIT_VERSION="b739b1e"
SHASTA_DOWNLOAD_URL="https://github.com/paoloshasta/shasta/releases/download/${SHASTA_VERSION}/shasta-Linux-${SHASTA_VERSION}"
# for assembly polishing
PB_ASSEMBLY_VERSION="0.0.8" #
BAX2BAM_VERSION="0.0.9" #
PBMM2_VERSION="1.9.0" #
NANOPOLISH_VERSION="0.14.0" # released on 2021.04.06
PARALLEL_VERSION="20180722" # released on 2018.07.22
PARALLEL_DOWNLOAD_URL="http://ftp.gnu.org/gnu/parallel/parallel-${PARALLEL_VERSION}.tar.bz2"
RACON_VERSION="1.5.0" # released on 2021.03.26
#RACON_GITHUB_COMMIT_VERSION="9119181"
#RACON_DOWNLOAD_URL="https://github.com/lbcb-sci/racon/releases/download/${RACON_VERSION}/racon-v${RACON_VERSION}.tar.gz"
#RACON_DOWNLOAD_URL="https://github.com/lbcb-sci/racon.git"
MEDAKA_VERSION="1.7.2" # released on 2022.09.21
MEDAKA_DOWNLOAD_URL="https://github.com/nanoporetech/medaka/archive/v${MEDAKA_VERSION}.tar.gz"
# MARGINPOLISH_VERSION="1.3.0" # released on 2020.03.04
# MARGINPOLISH_GITHUB_COMMIT_VERSION="5492204" # commited on 2020.03.25
# # MARGINPOLISH_DOWNLOAD_URL="https://github.com/UCSC-nanopore-cgl/marginPolish.git"
# MARGINPOLISH_DOWNLOAD_URL="https://github.com/UCSC-nanopore-cgl/MarginPolish/archive/refs/tags/v${MARGINPOLISH_VERSION}.tar.gz"
# HELEN_VERSION="0.0.1" # released on 2020.12.10
# HELEN_GITHUB_COMMIT_VERSION="a075e9f" # commited on 2020.10.28
# HELEN_DOWNLOAD_URL="https://github.com/kishwarshafin/helen.git"
# HOMOPOLISH_VERSION="0.2.1" # released on 2020.12.10
# HOMOPOLISH_DOWNLOAD_URL="https://github.com/ythuang0522/homopolish"
# MARGIN_VERSION="2.3.1" # released on 2022.03.25
# MARGIN_DOWNLOAD_URL="https://github.com/UCSC-nanopore-cgl/margin"
# MARGIN_GITHUB_COMMIT_VERSION="9bf845f" # commited on 2022.03.25
# PEPPER_VERSION="0.4" # released on 2020.12.10
# PEPPER_GITHUB_COMMIT_VERSION="734d226" # commited on 2021.03.08
# PEPPER_DOWNLOAD_URL="https://github.com/kishwarshafin/pepper.git"
# for assembly scaffolding
RAGOUT_VERSION="2.3" # released on 2020.03.18
RAGOUT_GITHUB_COMMIT_VERSION="7b92fe7" # commited on 2020.12.09"
RAGOUT_DOWNLOAD_URL="https://github.com/fenderglass/Ragout.git"
RAGTAG_VERSION="2.1.0" # released on 2021.11.01
# QUAST_VERSION="5.0.2" # one of its dependency needs "csh" to be pre-installed
HDF_VERSION="1.10.6" #
HDF_VERSION_prefix=${HDF_VERSION%.*}
HDF_DOWNLOAD_URL="https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${HDF_VERSION_prefix}/hdf5-${HDF_VERSION}/src/hdf5-${HDF_VERSION}.tar.gz"
# SONLIB_VERSION="" #
# SONLIB_GITHUB_COMMIT_VERSION="1afbd97" # committed on 2017.08.09
# SONLIB_DOWNLOAD_URL="https://github.com/benedictpaten/sonLib.git"
# HAL_VERSION="" # not available, so we use the github comit hash below for version control
# HAL_GITHUB_COMMIT_VERSION="a2ad656" # committed on 2017.09.09
# HAL_DOWNLOAD_URL="https://github.com/glennhickey/hal.git"
MUMMER4_VERSION="4.0.0rc1" # released on 2020.10.03
MUMMER4_DOWNLOAD_URL="https://github.com/gmarcais/mummer/releases/download/v${MUMMER4_VERSION}/mummer-${MUMMER4_VERSION}.tar.gz"
GNUPLOT_VERSION="4.6.6" # released on 2015.02.18
GNUPLOT_DOWNLOAD_URL="https://sourceforge.net/projects/gnuplot/files/gnuplot/${GNUPLOT_VERSION}/gnuplot-${GNUPLOT_VERSION}.tar.gz"
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"
SPADES_VERSION="3.14.1" # released on 2020.05.02
SPADES_DOWNLOAD_URL="https://github.com/ablab/spades/releases/download/v${SPADES_VERSION}/SPAdes-${SPADES_VERSION}-Linux.tar.gz"
PRODIGAL_VERSION="2.6.3" # released on 2016.02.12
PRODIGAL_DOWNLOAD_URL="https://github.com/hyattpd/Prodigal/archive/v${PRODIGAL_VERSION}.tar.gz"
CAP3_VERSION="" # see http://seq.cs.iastate.edu/cap3.html
CAP3_DOWNLOAD_URL="https://github.com/yjx1217/CAP3.git" # "http://seq.cs.iastate.edu/CAP3/cap3.linux.x86_64.tar"
BWA_VERSION="0.7.17" # released on 2017.10.23
BWA_DOWNLOAD_URL="http://downloads.sourceforge.net/project/bio-bwa/bwa-${BWA_VERSION}.tar.bz2"
SAMTOOLS_VERSION="1.16.1" # released on 2022.09.02
HTSLIB_VERSION="1.16" # released on 2022.09.02
SAMTOOLS_DOWNLOAD_URL="https://github.com/samtools/samtools/releases/download/${SAMTOOLS_VERSION}/samtools-${SAMTOOLS_VERSION}.tar.bz2"
CIRCLATOR_VERSION="1.5.5" # released on 2020.10.29
CIRCLATOR_DOWNLOAD_URL="https://github.com/sanger-pathogens/circlator/archive/v${CIRCLATOR_VERSION}.tar.gz"
TRIMMOMATIC_VERSION="0.38" #
TRIMMOMATIC_DOWNLOAD_URL="http://www.usadellab.org/cms/uploads/supplementary/Trimmomatic/Trimmomatic-${TRIMMOMATIC_VERSION}.zip"
GATK3_VERSION="3.6-6" #
GATK3_DOWNLOAD_URL="https://github.com/yjx1217/GATK3_Archive/raw/main/gatk3.jar.gz"
PICARD_VERSION="2.23.4" # released on 2020.09.03
PICARD_DOWNLOAD_URL="https://github.com/broadinstitute/picard/releases/download/${PICARD_VERSION}/picard.jar"
# HAPOG_VERSION="1.2" # released on 2021.10.01
PILON_VERSION="1.24" # released on 2021.01.29
PILON_DOWNLOAD_URL="https://github.com/broadinstitute/pilon/releases/download/v${PILON_VERSION}/pilon-${PILON_VERSION}.jar"
EXONERATE_VERSION="2.2.0" #
EXONERATE_DOWNLOAD_URL="http://ftp.ebi.ac.uk/pub/software/vertebrategenomics/exonerate/exonerate-${EXONERATE_VERSION}-x86_64.tar.gz"
BLAST_VERSION="2.2.31" #
RMBLAST_VERSION="2.2.28" #
BLAST_DOWNLOAD_URL="http://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/${BLAST_VERSION}/ncbi-blast-${BLAST_VERSION}+-x64-linux.tar.gz"
RMBLAST_DOWNLOAD_URL="http://ftp.ncbi.nlm.nih.gov/blast/executables/rmblast/${RMBLAST_VERSION}/ncbi-rmblastn-${RMBLAST_VERSION}-x64-linux.tar.gz"
SNAP_VERSION="" #
SNAP_GITHUB_COMMIT_VERSION="a89d68e" # committed on 2017.05.18
# SNAP_GITHUB_COMMIT_VERSION="bbf2050" # commited on 2022.04.12
SNAP_DOWNLOAD_URL="https://github.com/KorfLab/SNAP.git"
RAPSEARCH_VERSION="2.24" #
RAPSEARCH_DOWNLOAD_URL="https://sourceforge.net/projects/rapsearch2/files/RAPSearch${RAPSEARCH_VERSION}_64bits.tar.gz"
TRNASCAN_VERSION="1.3.1" #
TRNASCAN_DOWNLOAD_URL="http://eddylab.org/software/tRNAscan-SE/tRNAscan-SE.tar.gz"
SNOSCAN_VERSION="0.9.1" #
SNOSCAN_DOWNLOAD_URL="http://eddylab.org/software/snoscan/snoscan.tar.gz"
REPEATMASKER_VERSION="open-4-0-7" #
# REPEATMASKER_VERSION="4.1.0" #
REPEATMASKER_DOWNLOAD_URL="https://www.repeatmasker.org/RepeatMasker/RepeatMasker-${REPEATMASKER_VERSION}.tar.gz"
#REPBASE_VERSION="20181026"
REPBASE_VERSION="20170127"
REPBASE_DOWNLOAD_URL="https://github.com/yjx1217/RMRB.git"
TRF_VERSION="409" #
TRF_DOWNLOAD_URL="https://github.com/Benson-Genomics-Lab/TRF/releases/download/v4.09.1/trf409.linux64"
REANNOTATE_VERSION="17.03.2015-LongQueryName"
REANNOTATE_GITHUB_COMMIT_VERSION="7fdb339"
REANNOTATE_DOWNLOAD_URL="https://github.com/yjx1217/REannotate_LongQueryName"
CLUSTALW_VERSION="2.1" #
CLUSTALW_DOWNLOAD_URL="http://www.clustal.org/download/${CLUSTALW_VERSION}/clustalw-${CLUSTALW_VERSION}.tar.gz"
MUSCLE_VERSION="3.8.31" #
MUSCLE_DOWNLOAD_URL="http://www.drive5.com/muscle/downloads${MUSCLE_VERSION}/muscle${MUSCLE_VERSION}_i86linux64.tar.gz"
HMMER_VERSION="3.2.1" # released on 2018.06.13
HMMER_DOWNLOAD_URL="http://eddylab.org/software/hmmer/hmmer-${HMMER_VERSION}.tar.gz"
BAMTOOLS_VERSION="2.4.2" # released on 2017.11.02
BAMTOOLS_DOWNLOAD_URL="https://github.com/pezmaster31/bamtools/archive/v${BAMTOOLS_VERSION}.tar.gz"
AUGUSTUS_VERSION="3.2.3" #
#AUGUSTUS_GITHUB_COMMIT_VERSION="79960c5"
AUGUSTUS_DOWNLOAD_URL="http://bioinf.uni-greifswald.de/augustus/binaries/old/augustus-${AUGUSTUS_VERSION}.tar.gz"
#AUGUSTUS_DOWNLOAD_URL="https://github.com/Gaius-Augustus/Augustus.git"
EVM_VERSION="1.1.1" # released on 2015.07.03
EVM_DOWNLOAD_URL="https://github.com/EVidenceModeler/EVidenceModeler/archive/v${EVM_VERSION}.tar.gz"
PROTEINORTHO_VERSION="6.0.35" # released on 2022.09.15
DIAMOND_VERSION="2.0.6"
#MAKER_VERSION="3.01.03" #
MAKER_VERSION="3.00.0-beta" #
MAKER_DOWNLOAD_URL="https://github.com/yjx1217/Maker3beta_archive.git"
# for MFannot
EMBOSS_VERSION="6.5.7" # released on 2012.07.25
EMBOSS_VERSION_prefix="${EMBOSS_VERSION:0:3}"
EMBOSS_DOWNLOAD_URL="ftp://emboss.open-bio.org/pub/EMBOSS/old/${EMBOSS_VERSION_prefix}.0/EMBOSS-${EMBOSS_VERSION}.tar.gz"
ERPIN_VERSION="5.5.4" #
ERPIN_DOWNLOAD_URL="http://rna.igmors.u-psud.fr/download/Erpin/erpin${ERPIN_VERSION}.serv.tar.gz"
TBL2ASN_VERSION="25.7" #
TBL2ASN_DOWNLOAD_URL="https://anaconda.org/bioconda/tbl2asn/${TBL2ASN_VERSION}/download/linux-64/tbl2asn-${TBL2ASN_VERSION}-0.tar.bz2"
PIROBJECT_VERSION="1.19" #
PIROBJECT_DOWNLOAD_URL="https://github.com/prioux/PirObject/archive/v${PIROBJECT_VERSION}.tar.gz"
PIRMODELS_GITHUB_COMMIT_VERSION="6b223ec" # committed on 2016.08.30
PIRMODELS_DOWNLOAD_URL="https://github.com/BFL-lab/PirModels.git"
FLIP_GITHUB_COMMIT_VERSION="00a57cb" # committed on 2016.04.07
FLIP_DOWNLOAD_URL="https://github.com/BFL-lab/Flip.git"
UMAC_GITHUB_COMMIT_VERSION="cae618e" # committed on 2016.08.30
UMAC_DOWNLOAD_URL="https://github.com/BFL-lab/Umac.git"
HMMSEARCHWC_GITHUB_COMMIT_VERSION="9e3b461" # committed on 2016.11.05
HMMSEARCHWC_DOWNLOAD_URL="https://github.com/BFL-lab/HMMsearchWC.git"
RNAFINDER_GITHUB_COMMIT_VERSION="ee5b7de" # committed on 2019.11.26
RNAFINDER_DOWNLOAD_URL="https://github.com/BFL-lab/RNAfinder.git"
MF2SQN_GITHUB_COMMIT_VERSION="6faf9f4" # committed on 2016.12.07
MF2SQN_DOWNLOAD_URL="https://github.com/BFL-lab/Mf2sqn.git"
GRAB_FASTA_GITHUB_COMMIT_VERSION="accd32d" # committed on 2017.02.14
GRAB_FASTA_DOWNLOAD_URL="https://github.com/BFL-lab/grab-fasta.git"
# for MFannot
MFANNOT_DATA_GITHUB_COMMIT_VERSION="b039ac5" # committed on 2016.12.07
MFANNOT_VERSION="1.35" #
MFANNOT_GITHUB_COMMIT_VERSION="6472b97" # committed on 2018.10.31 # "104e1c5" # committed on 2021.02.10
MFANNOT_DATA_DOWNLOAD_URL="https://github.com/BFL-lab/MFannot_data.git"
MFANNOT_DOWNLOAD_URL="https://github.com/BFL-lab/MFannot.git"
# # GFF3
# GFF3TOOLKIT_VERSION="2.1.0" # released on 2021.12.09
# GFF3TOOLKIT_DOWNLOAD_URL="https://github.com/NAL-i5K/GFF3toolkit"
# UCSC Utilities
BLAT_DOWNLOAD_URL="http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/blat/blat"
FASPLIT_DOWNLOAD_URL="http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/faSplit"
PSLSORT_DOWNLOAD_URL="http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/pslSort"
PSLSCORE_DOWNLOAD_URL="http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/pslScore"
PSLCDNAFILTER_DOWNLOAD_URL="http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/pslCDnaFilter"
# Create the $BUILD directory for dependency installation
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)
echo ""
echo "[$(timestamp)] Download and install all the dependencies"
echo ""
# Downloading all the dependencies
# ---------- set Perl & Python environment variables -------------
PYTHONPATH="$build_dir"
PERL5LIB="$build_dir:$PERL5LIB"
PERL5LIB="$build_dir/cpanm/perlmods/lib/perl5:$PERL5LIB"
echo ""
echo "[$(timestamp)] Installing Perl modules ..."
cpanm_dir=$build_dir/cpanm
if [ -z $(check_installed $cpanm_dir) ]; then
clean "$build_dir/cpanm"
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 $LRSDAY_HOME/misc/cpanm .
chmod +x cpanm
mkdir -p perlmods
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --notest --skip-installed Test::[email protected]
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --notest --skip-installed Text::[email protected]
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --notest --skip-installed [email protected]
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --notest --skip-installed File::[email protected]
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --notest --skip-installed Term::[email protected]
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --notest --skip-installed [email protected]
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --notest --skip-installed Perl::Unsafe::[email protected]
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --notest --skip-installed Carp::[email protected]
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --notest --skip-installed Bit::[email protected]
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --notest --skip-installed [email protected]
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --notest --skip-installed Inline::[email protected]
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --notest --skip-installed List::[email protected]
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --notest --skip-installed Acme::[email protected]
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --notest --skip-installed Sys::[email protected]
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --notest --skip-installed [email protected]
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --notest --skip-installed forks::[email protected]
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --notest --skip-installed [email protected]
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --notest --skip-installed IO::[email protected]
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --notest --skip-installed IO::[email protected]
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --notest --skip-installed [email protected]
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --notest --skip-installed Proc::[email protected]
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --notest --skip-installed [email protected]
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --notest --skip-installed PerlIO::[email protected]
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --notest --skip-installed ExtUtils::[email protected]
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --notest --skip-installed LWP::[email protected]
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --notest --skip-installed LWP::UserAgent
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --notest --skip-installed Bio::[email protected]
if [ ! -z "$USE_POSTGRES" ]; then
# need $POSTGRES_HOME pre-defined
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --notest --skip-installed DBD::Pg
else
$cpanm_dir/cpanm -l $cpanm_dir/perlmods --notest --skip-installed DBD::[email protected]
fi
note_installed $cpanm_dir
fi
# ------------- Miniconda2 --------------------
if [[ $lite_installation == "no" ]]
then
echo ""
echo "[$(timestamp)] Installing miniconda2 ..."
miniconda2_dir="$build_dir/miniconda2/bin"
if [ -z $(check_installed $miniconda2_dir) ]; then
cd $build_dir
clean "$build_dir/miniconda2"
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/bioconda
$miniconda2_dir/conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
$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/bioconda
$miniconda2_dir/conda config --add channels https://anaconda.mirrors.sjtug.sjtu.edu.cn/cloud/conda-forge
# $miniconda2_dir/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
# $miniconda2_dir/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
# $miniconda2_dir/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
# $miniconda2_dir/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
# $miniconda2_dir/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
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 ssl_verify no
$miniconda2_dir/conda config --set channel_priority flexible
$miniconda2_dir/pip install --timeout 1000 cython==0.29.14 numpy==1.13.1
rm Miniconda2-${MINICONDA2_VERSION}-Linux-x86_64.sh
note_installed $miniconda2_dir
fi
fi
# ------------- Miniconda3 --------------------
echo ""
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
# $miniconda3_dir/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
# $miniconda3_dir/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
# $miniconda3_dir/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
# $miniconda3_dir/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
# $miniconda3_dir/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/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 show_channel_urls yes
$miniconda3_dir/conda config --set ssl_verify no
$miniconda3_dir/conda config --set channel_priority flexible
cd $build_dir
rm Miniconda3-${MINICONDA3_VERSION}-Linux-x86_64.sh
note_installed $miniconda3_dir
fi
# ----------------- PB-ASSEMBLY ----------------------
if [[ $lite_installation == "no" ]]
then
echo ""
echo "[$(timestamp)] Installing pb-assembly ..."
pbassembly_dir=$build_dir/pbassembly_conda_env/bin
if [ -z $(check_installed $pbassembly_dir) ]; then
cd $build_dir
clean "$build_dir/pbassembly_conda_env"
$miniconda3_dir/conda create -y -p $build_dir/pbassembly_conda_env
source $miniconda3_dir/activate $build_dir/pbassembly_conda_env
$miniconda3_dir/conda install -y -c bioconda pb-assembly=${PB_ASSEMBLY_VERSION}
source $miniconda3_dir/deactivate
note_installed $pbassembly_dir
fi
fi
# ----------------- BAX2BAM ----------------------
if [[ $lite_installation == "no" ]]
then
echo ""
echo "[$(timestamp)] Installing bax2bam ..."
bax2bam_dir="$build_dir/bax2bam_conda_env/bin"
if [ -z $(check_installed $bax2bam_dir) ]; then
cd $build_dir
clean "$build_dir/bax2bam_conda_env"
$miniconda2_dir/conda create -y -p $build_dir/bax2bam_conda_env
source $miniconda2_dir/activate $build_dir/bax2bam_conda_env
#$miniconda2_dir/conda install -y -c bioconda bax2bam=${BAX2BAM_VERSION}
$miniconda2_dir/conda install -y -c "bioconda/label/cf201901" bax2bam
source $miniconda2_dir/deactivate
note_installed $bax2bam_dir
fi
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=3.7
source $miniconda3_dir/activate $build_dir/porechop_conda_env
$miniconda3_dir/conda install -y -c bioconda porechop=${PORECHOP_VERSION}
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
# --------------- 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
PATH=$minimap2_dir:${PATH}
# --------------- samtools -----------------
echo ""
echo "[$(timestamp)] Installing samtools ..."
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_dir
./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}"
# ------------- Canu -------------------
echo ""
echo "[$(timestamp)] Installing canu ..."
canu_dir="$build_dir/canu-${CANU_VERSION}/bin"
if [ -z $(check_installed $canu_dir) ]; then
cd $build_dir
clean "$build_dir/canu-${CANU_VERSION}"
echo "Download Canu-v${CANU_VERSION}"
download $CANU_DOWNLOAD_URL "canu-${CANU_VERSION}.tar.xz"
tar xvf canu-${CANU_VERSION}.tar.xz
cd $canu_dir
ln -s $minimap2_dir/minimap2 .
cd $build_dir
rm canu-${CANU_VERSION}.tar.xz
note_installed $canu_dir
fi
# # --------------- WhatsHap -----------------
# echo ""
# echo "[$(timestamp)] Installing WhatsHap ..."
# whatshap_dir="$build_dir/whatshap_conda_env/bin"
# if [ -z $(check_installed $whatshap_dir) ]; then
# cd $build_dir
# # clean "$build_dir/whatshap_conda_env"
# echo "Download whatshap-v${WHATSHAP_VERSION}"
# # $miniconda3_dir/conda create -y -p $build_dir/whatshap_conda_env python=3.9
# source $miniconda3_dir/activate $build_dir/whatshap_conda_env
# $miniconda3_dir/conda install -y -c bioconda whatshap=${WHATSHAP_VERSION} nomkl
# source $miniconda3_dir/deactivate
# note_installed $whatshap_dir
# fi
# ------------- Flye -------------------
echo ""
echo "[$(timestamp)] Installing flye ..."
flye_dir="$build_dir/flye_conda_env/bin"
if [ -z $(check_installed $flye_dir) ]; then
cd $build_dir
clean "$build_dir/flye_conda_env"
$miniconda3_dir/conda create -y -p $build_dir/flye_conda_env python=3.7
source $miniconda3_dir/activate $build_dir/flye_conda_env
$miniconda3_dir/conda install -y -c bioconda flye=${FLYE_VERSION}
source $miniconda3_dir/deactivate
note_installed $flye_dir
fi
# --------------- wtdbg2 ------------------
echo ""
echo "[$(timestamp)] Installing wtdbg2 ..."
wtdbg2_dir="$build_dir/wtdbg2"
if [ -z $(check_installed $wtdbg2_dir) ]; then
cd $build_dir
clean "$build_dir/wtdbg2"
echo "Download wtdbg2-v${WTDBG2_VERSION}"
git clone $WTDBG2_DOWNLOAD_URL
cd wtdbg2
git checkout -f -q $WTDBG2_GITHUB_COMMIT_VERSION
C_INCLUDE_PATH=""
make -j $MAKE_JOBS
note_installed $wtdbg2_dir
fi
# --------------- smartdenovo ------------------
echo ""
echo "[$(timestamp)] Installing smartdenovo ..."
smartdenovo_dir="$build_dir/smartdenovo"
if [ -z $(check_installed $smartdenovo_dir) ]; then
cd $build_dir
clean "$build_dir/smartdenovo"
echo "Download smartdenovo-v${SMARTDENOVO_VERSION}"
git clone $SMARTDENOVO_DOWNLOAD_URL
cd smartdenovo
git checkout -f -q $SMARTDENOVO_GITHUB_COMMIT_VERSION
cp wtlay.h wtlay.h.bk
cat wtlay.h.bk |sed s/inline//g > wtlay.h
C_INCLUDE_PATH=""
make -j $MAKE_JOBS
cp $LRSDAY_HOME/misc/smartdenovo_customized.pl .
note_installed $smartdenovo_dir
fi
# # --------------- Raven ------------------
# echo ""
# echo "[$(timestamp)] Installing raven ..."
# raven_dir="$build_dir/raven/build/bin"
# if [ -z $(check_installed $raven_dir) ]; then
# cd $build_dir
# clean "$build_dir/raven"
# echo "Download Raven-v${RAVEN_VERSION}"
# git clone --recursive https://github.com/lbcb-sci/raven.git raven
# cd raven
# git checkout -f -q $RAVEN_GITHUB_COMMIT_VERSION
# mkdir build
# cd build
# cmake -DCMAKE_BUILD_TYPE=Release .. #requires cmake >=3.11
# make -j $MAKE_JOBS
# note_installed $raven_dir
# fi
# --------------- Shasta ------------------
echo ""
echo "[$(timestamp)] Installing shasta ..."
shasta_dir="$build_dir/shasta-${SHASTA_VERSION}"
if [ -z $(check_installed $shasta_dir) ]; then
cd $build_dir
clean "$build_dir/shasta-${SHASTA_VERSION}"
echo "Download Shasta-v${SHASTA_VERSION}"
mkdir shasta-${SHASTA_VERSION}
cd shasta-${SHASTA_VERSION}
wget $SHASTA_DOWNLOAD_URL
chmod ugo+x shasta-Linux-${SHASTA_VERSION}
ln -s shasta-Linux-${SHASTA_VERSION} shasta
note_installed $shasta_dir
fi
# --------------- Ragout ------------------
echo ""
echo "[$(timestamp)] Installing ragout ..."
ragout_dir="$build_dir/ragout_conda_env/bin"
#ragout_dir="$build_dir/ragout_conda_env/Ragout/bin"
if [ -z $(check_installed $ragout_dir) ]; then
cd $build_dir
clean "$build_dir/ragout_conda_env"
$miniconda3_dir/conda create -y -p $build_dir/ragout_conda_env python=3.8
source $miniconda3_dir/activate $build_dir/ragout_conda_env
$miniconda3_dir/conda install -y -c bioconda ragout=${RAGOUT_VERSION}
# cd $build_dir/ragout_conda_env
# git clone $RAGOUT_DOWNLOAD_URL
# cd Ragout
# git checkout -f -q $RAGOUT_GITHUB_COMMIT_VERSION
# python setup.py build
# pip install -r requirements.txt
# python scripts/install-sibelia.py
source $miniconda3_dir/deactivate
note_installed $ragout_dir
fi
# --------------- Ragtag ------------------
echo ""
echo "[$(timestamp)] Installing ragtag ..."
ragtag_dir="$build_dir/ragtag_conda_env/bin"
if [ -z $(check_installed $ragtag_dir) ]; then
cd $build_dir
clean "$build_dir/ragout_ragtag_env"
$miniconda3_dir/conda create -y -p $build_dir/ragtag_conda_env python=3.7 pip
source $miniconda3_dir/activate $build_dir/ragtag_conda_env
#$miniconda3_dir/conda install -y -c bioconda ragtag=${RAGTAG_VERSION}
$ragtag_dir/pip3 install --timeout 1000 ragtag==${RAGTAG_VERSION}
cd $ragtag_dir
ln -s $minimap2_dir/minimap2 .
source $miniconda3_dir/deactivate
note_installed $ragtag_dir
fi
# --------------- gnuplot ------------------
echo ""
echo "[$(timestamp)] Installing gnuplot ..."
gnuplot_dir="$build_dir/gnuplot-${GNUPLOT_VERSION}/bin"
if [ -z $(check_installed $gnuplot_dir) ]; then
cd $build_dir
clean "$build_dir/gnuplot-${GNUPLOT_VERSION}"
echo "Download gnuplot-v${GNUPLOT_VERSION}"
download $GNUPLOT_DOWNLOAD_URL "gnuplot-${GNUPLOT_VERSION}.tar.gz"
tar xvzf gnuplot-${GNUPLOT_VERSION}.tar.gz
cd "$build_dir/gnuplot-${GNUPLOT_VERSION}"
./configure --prefix="$build_dir/gnuplot-${GNUPLOT_VERSION}" --exec-prefix="$build_dir/gnuplot-${GNUPLOT_VERSION}" --disable-plugins --disable-wxwidgets --with-gd=no --without-latex --with-x=no
make -j $MAKE_JOBS
make install
cd $build_dir
rm gnuplot-${GNUPLOT_VERSION}.tar.gz
note_installed $gnuplot_dir
fi
PATH="$gnuplot_dir:${PATH}"
# --------------- Guppy-GPU --------------------
echo ""
echo "[$(timestamp)] Installing guppy-GPU ..."
guppy_gpu_dir="$build_dir/ont-guppy-gpu/bin"
if [ -z $(check_installed $guppy_gpu_dir) ]; then
cd $build_dir
clean "$build_dir/ont-guppy-gpu"
echo "Download Guppy-v${GUPPY_VERSION}"
download $GUPPY_GPU_DOWNLOAD_URL "ont-guppy_${GUPPY_VERSION}_linux64.tar.gz"
tar xvzf ont-guppy_${GUPPY_VERSION}_linux64.tar.gz
mv ont-guppy ont-guppy-gpu
rm ont-guppy_${GUPPY_VERSION}_linux64.tar.gz
note_installed $guppy_gpu_dir
fi
# --------------- Guppy-CPU --------------------
echo ""
echo "[$(timestamp)] Installing guppy-CPU ..."
guppy_cpu_dir="$build_dir/ont-guppy-cpu/bin"
if [ -z $(check_installed $guppy_cpu_dir) ]; then
cd $build_dir
clean "$build_dir/ont-guppy-cpu"
echo "Download Guppy-v${GUPPY_VERSION}"
download $GUPPY_CPU_DOWNLOAD_URL "ont-guppy_${GUPPY_VERSION}_linux64.tar.gz"
tar xvzf ont-guppy_${GUPPY_VERSION}_linux64.tar.gz
rm ont-guppy_${GUPPY_VERSION}_linux64.tar.gz
note_installed $guppy_cpu_dir
fi
# # --------------- Nanofilt --------------------
# echo ""
# echo "[$(timestamp)] Installing NanoFilt ..."
# nanofilt_dir="$build_dir/nanofilt_conda_env/bin"
# if [ -z $(check_installed $nanofilt_dir) ]; then
# cd $build_dir
# $miniconda3_dir/conda create -y -p $build_dir/nanofilt_conda_env
# source $miniconda3_dir/activate $build_dir/nanofilt_conda_env
# $miniconda3_dir/conda install -y -c bioconda nanofilt=${NANOFILT_VERSION}
# source $miniconda3_dir/deactivate
# note_installed $nanofilt_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
$miniconda3_dir/conda create -y -p $build_dir/nanoplot_conda_env python=3.9
source $miniconda3_dir/activate $build_dir/nanoplot_conda_env
$miniconda3_dir/conda install -y -c bioconda nanoplot=${NANOPLOT_VERSION}
source $miniconda3_dir/deactivate
note_installed $nanoplot_dir
fi
# --------------- Nanopolish --------------------
echo ""
echo "[$(timestamp)] Installing nanopolish ..."
nanopolish_dir="$build_dir/nanopolish_conda_env/bin"
if [ -z $(check_installed $nanopolish_dir) ]; then
cd $build_dir
clean "$build_dir/nanopolish_conda_env"
$miniconda3_dir/conda create -y -p $build_dir/nanopolish_conda_env python=3.9
source $miniconda3_dir/activate $build_dir/nanopolish_conda_env
$miniconda3_dir/conda install -y -c bioconda nanopolish=${NANOPOLISH_VERSION}
source $miniconda3_dir/deactivate
note_installed $nanopolish_dir
fi
# --------------- Parallel ------------------
echo ""
echo "[$(timestamp)] Installing parallele ..."
parallel_dir="$build_dir/parallel-${PARALLEL_VERSION}/bin"
if [ -z $(check_installed $parallel_dir) ]; then
cd $build_dir
echo "Download parallel"
clean "$build_dir/parallele-${PARALLEL_VERSION}"
download $PARALLEL_DOWNLOAD_URL "parallel_v${PARALLEL_VERSION}.tar.bz2"
tar xvjf parallel_v${PARALLEL_VERSION}.tar.bz2
cd parallel-${PARALLEL_VERSION}
./configure --prefix="$build_dir/parallel-${PARALLEL_VERSION}"
make -j $MAKE_JOBS
make install
cd $build_dir
rm parallel_v${PARALLEL_VERSION}.tar.bz2
note_installed $parallel_dir
fi
# --------------- Racon -----------------
echo ""
echo "[$(timestamp)] Installing racon ..."
racon_dir="$build_dir/racon_conda_env/bin"
if [ -z $(check_installed $racon_dir) ]; then
cd $build_dir
clean "$build_dir/racon_conda_env"
$miniconda3_dir/conda create -y -p $build_dir/racon_conda_env python=3.7
source $miniconda3_dir/activate $build_dir/racon_conda_env
$miniconda3_dir/conda install -y -c bioconda racon=${RACON_VERSION}
source $miniconda3_dir/deactivate
note_installed $racon_dir
fi
# --------------- Medaka -----------------
echo ""
echo "[$(timestamp)] Installing medaka ..."
medaka_dir="$build_dir/medaka_conda_env/bin"
if [ -z $(check_installed $medaka_dir) ]; then
cd $build_dir
clean "$build_dir/medaka_conda_env"
$miniconda3_dir/conda create -y -p $build_dir/medaka_conda_env
source $miniconda3_dir/activate $build_dir/medaka_conda_env
$miniconda3_dir/conda install -y -c conda-forge -c bioconda medaka=${MEDAKA_VERSION}
#$miniconda3_dir/pip3 install medaka==${MEDAKA_VERSION}
source $miniconda3_dir/deactivate
note_installed $medaka_dir
fi
# # --------------- MarginPolish -----------------
# echo ""
# echo "[$(timestamp)] Installing marginpolish ..."
# marginpolish_dir="$build_dir/marginPolish/build"
# if [ -z $(check_installed $marginpolish_dir) ]; then
# cd $build_dir
# echo "Download MarginPolish-v${MARGINPOLISH_VERSION}"
# clean "$build_dir/marginPolish"
# download $MARGINPOLISH_DOWNLOAD_URL "marginPolish.tar.gz"
# tar xzf marginPolish.tar.gz
# cd MarginPolish-${MARGINPOLISH_VERSION}/externalTools
# git clone --recursive https://github.com/samtools/htslib.git
# cd htslib
# git checkout -f -q 1832d3a
# cd ..
# cd git clone --resursive https://github.com/benedictpaten/sonLib.git
# git checkout -f -q 8e403f6
# cd ..
# cd ..
# # git clone --recursive $MARGINPOLISH_DOWNLOAD_URL
# # cd marginPolish
# # git checkout -f -q $MARGINPOLISH_GITHUB_COMMIT_VERSION
# # # git submodule update --init
# mkdir build
# cd build
# cmake ..
# make -j $MAKE_JOBS
# note_installed $marginpolish_dir
# fi
# # --------------- Helen -----------------
# echo ""
# echo "[$(timestamp)] Installing helen ..."
# helen_dir="$build_dir/helen/build"
# if [ -z $(check_installed $helen_dir) ]; then
# cd $build_dir
# echo "Download Helen-v${HELEN_VERSION}"
# clean "$build_dir/helen"
# git clone $HELEN_DOWNLOAD_URL
# cd helen
# git checkout -f -q $HELEN_GITHUB_COMMIT_VERSION
# make install
# . ./venv/bin/activate
# cd build
# note_installed $helen_dir
# fi
# # --------------- PEPPER -----------------
# pepper_dir="$build_dir/pepper_conda_env/bin"
# if [ -z $(check_installed $pepper_dir) ]; then
# cd $build_dir
# $miniconda3_dir/conda create -y -p $build_dir/pepper_conda_env python=3.7