Skip to content

Commit 31308fb

Browse files
authored
Merge pull request #31 from Oshlack/install
Install
2 parents 1fe1282 + 51d5b1f commit 31308fb

File tree

2 files changed

+52
-11
lines changed

2 files changed

+52
-11
lines changed

.testing/install-ci.sh

+25-6
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ mkdir -p tools/bin
1616
cd tools
1717

1818
#a list of which programs need to be installed
19-
commands="bpipe python goleft bedtools bwa samtools mosdepth bazam picard"
19+
commands="bpipe python goleft bedtools bwa samtools mosdepth"
20+
jarfiles="bazam picard"
2021

2122
#installation method
2223
function bpipe_install {
@@ -51,21 +52,21 @@ function samtools_install {
5152
}
5253

5354
function bazam_install {
54-
git clone git@github.com:ssadedin/bazam.git
55+
git clone https://github.com/ssadedin/bazam.git
5556
cd bazam
56-
git reset --hard 72b0e90be18bf8341a4b0368d4a7abf806c631bc
57+
git submodule update --init --recursive
5758
./gradlew clean jar
5859
cd ..
59-
ln -s $PWD/bazam/build/libs/bazam.jar $PWD/bin/bazam
60+
ln -s $PWD/bazam/build/libs/bazam.jar $PWD/bin/bazam.jar
6061
}
6162

6263
function picard_install {
6364
wget https://github.com/broadinstitute/picard/releases/download/2.18.9/picard.jar
64-
ln -s $PWD/picard.jar $PWD/bin/picard
65+
ln -s $PWD/picard.jar $PWD/bin/picard.jar
6566
}
6667

6768
function download {
68-
wget --no-check-certificate -O $refdir/reference-data.zip https://ndownloader.figshare.com/articles/5353399?private_link=be9bde235448e937e468
69+
wget --no-check-certificate -O $refdir/reference-data.zip https://ndownloader.figshare.com/articles/5353399/versions/1
6970
unzip $refdir/reference-data.zip -d $refdir
7071
rm $refdir/reference-data.zip
7172

@@ -110,6 +111,14 @@ for c in $commands ; do
110111
echo "$c=\"$c_path\"" >> $toolspec
111112
done
112113

114+
for j in $jarfiles ; do
115+
if [ ! -f $PWD/bin/$j.jar ] ; then
116+
echo "$j not found, fetching it"
117+
${j}_install
118+
fi
119+
echo "$j=\"$PWD/bin/${j}.jar\"" >> $toolspec
120+
done
121+
113122
if [ ! -f $refdir/*dedup.sorted.bed ] ; then
114123
mkdir -p $refdir
115124
echo "Downloading reference and test data"
@@ -148,6 +157,16 @@ for c in $commands ; do
148157
fi
149158
done
150159

160+
for j in $jarfiles ; do
161+
if [ ! -f $PWD/bin/$j.jar ] ; then
162+
echo -n "WARNING: $j could not be found!!!! "
163+
echo "You will need to download and install $j manually, then add its path to $toolspec"
164+
Final_message="WARNING: One or more command did not install successfully. See warning messages above. You will need to correct this before running STRetch."
165+
else
166+
echo "$j looks like it has been installed"
167+
fi
168+
done
169+
151170
echo "**********************************************************"
152171

153172
#check for reference data

install.sh

+27-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ mkdir -p tools/bin
1616
cd tools
1717

1818
#a list of which programs need to be installed
19-
commands="bpipe python goleft bedtools bwa samtools mosdepth bazam picard"
19+
commands="bpipe python goleft bedtools bwa samtools mosdepth"
20+
jarfiles="bazam picard"
2021

2122
#installation method
2223
function bpipe_install {
@@ -51,17 +52,17 @@ function samtools_install {
5152
}
5253

5354
function bazam_install {
54-
git clone git@github.com:ssadedin/bazam.git
55+
git clone https://github.com/ssadedin/bazam.git
5556
cd bazam
56-
git reset --hard 72b0e90be18bf8341a4b0368d4a7abf806c631bc
57+
git submodule update --init --recursive
5758
./gradlew clean jar
5859
cd ..
59-
ln -s $PWD/bazam/build/libs/bazam.jar $PWD/bin/bazam
60+
ln -s $PWD/bazam/build/libs/bazam.jar $PWD/bin/bazam.jar
6061
}
6162

6263
function picard_install {
6364
wget https://github.com/broadinstitute/picard/releases/download/2.18.9/picard.jar
64-
ln -s $PWD/picard.jar $PWD/bin/picard
65+
ln -s $PWD/picard.jar $PWD/bin/picard.jar
6566
}
6667

6768
function download_hg19 {
@@ -107,6 +108,15 @@ for c in $commands ; do
107108
echo "$c=\"$c_path\"" >> $toolspec
108109
done
109110

111+
for j in $jarfiles ; do
112+
if [ ! -f $PWD/bin/$j.jar ] ; then
113+
echo "$j not found, fetching it"
114+
${j}_install
115+
fi
116+
echo "$j=\"$PWD/bin/${j}.jar\"" >> $toolspec
117+
done
118+
119+
110120
if [ ! -f $refdir/hg19.PCRfreeWGS_143_STRetch_controls.tsv ] ; then
111121
mkdir -p $refdir
112122
echo "Downloading reference data"
@@ -144,6 +154,18 @@ for c in $commands ; do
144154
fi
145155
done
146156

157+
for j in $jarfiles ; do
158+
if [ ! -f $PWD/bin/$j.jar ] ; then
159+
echo -n "WARNING: $j could not be found!!!! "
160+
echo "You will need to download and install $j manually, then add its path to $toolspec"
161+
Final_message="WARNING: One or more command did not install successfully. See warning messages above. You will need to correct this before running STRetch."
162+
else
163+
echo "$j looks like it has been installed"
164+
fi
165+
done
166+
167+
168+
147169
echo "**********************************************************"
148170

149171
#check for reference data

0 commit comments

Comments
 (0)