Skip to content

Commit c106e89

Browse files
committed
Update conda and docker tests
1 parent 84229cf commit c106e89

File tree

2 files changed

+55
-31
lines changed

2 files changed

+55
-31
lines changed

crisprme_auto_test_conda.sh

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ do
4040
while true; do # retry download if caught timeout
4141
wget -T 15 -c ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/data_collections/1000_genomes_project/release/20190312_biallelic_SNV_and_INDEL/ALL.chr${i}.shapeit2_integrated_snvindels_v2a_27022019.GRCh38.phased.vcf.gz && break
4242
done
43+
sleep 2 # allow disk sync for md5sum check
4344
local_md5sum="$(md5sum ALL.chr${i}.shapeit2_integrated_snvindels_v2a_27022019.GRCh38.phased.vcf.gz | cut -d ' ' -f 1)"
4445
if [ "$original_md5sum" != "$local_md5sum" ]; then # check download consistency
4546
echo "ERROR: unexpected failure while downloading ALL.chr${i}.shapeit2_integrated_snvindels_v2a_27022019.GRCh38.phased.vcf.gz"
@@ -59,7 +60,16 @@ cd $SAMPLESIDS
5960
# download 1000G samples IDs
6061
echo "Downloading samples ids for 1000G dataset"
6162
SAMPLES1000G="hg38_1000G.samplesID.txt"
62-
wget https://raw.githubusercontent.com/pinellolab/CRISPRme/refs/heads/gnomad-4.1-converter/download_data/${SAMPLES1000G}
63+
original_md5sum="$(curl -sL https://raw.githubusercontent.com/pinellolab/CRISPRme/refs/heads/gnomad-4.1-converter/download_data/${SAMPLES1000G} | md5sum | cut -d ' ' -f 1)" # compute original md5sum
64+
while true; do # retry download if caught timeout
65+
wget -T 15 -c https://raw.githubusercontent.com/pinellolab/CRISPRme/refs/heads/gnomad-4.1-converter/download_data/${SAMPLES1000G} && break
66+
done
67+
sleep 2 # allow disk sync for md5sum check
68+
local_md5sum="$(md5sum $SAMPLES1000G | cut -d ' ' -f 1)"
69+
if [ "$original_md5sum" != "$local_md5sum" ]; then
70+
echo "ERROR: unexpected failure while downloading ${SAMPLES1000G}"
71+
exit 1
72+
fi
6373
cd ..
6474

6575
# initialize samples config file
@@ -72,31 +82,33 @@ mkdir -p $ANNOTATIONDIR # create annotation folder
7282
cd $ANNOTATIONDIR
7383
echo "Downloading ENCODE+GENCODE annotation data..."
7484
original_md5sum="$(curl -sL https://raw.githubusercontent.com/pinellolab/CRISPRme/gnomad-4.1-converter/download_data/dhs+encode+gencode.hg38.bed.tar.gz | md5sum | cut -d ' ' -f 1)"
75-
encodegencode="dhs+encode+gencode.hg38.bed.zip"
85+
DHSENCODE="dhs+encode+gencode.hg38.bed.zip"
7686
while true; do # retry download if caught timeout
77-
wget -T 15 -c -O $encodegencode https://raw.githubusercontent.com/pinellolab/CRISPRme/gnomad-4.1-converter/download_data/dhs+encode+gencode.hg38.bed.tar.gz && break
87+
wget -T 15 -c -O $DHSENCODE https://raw.githubusercontent.com/pinellolab/CRISPRme/gnomad-4.1-converter/download_data/dhs+encode+gencode.hg38.bed.tar.gz && break
7888
done
79-
local_md5sum="$(md5sum $encodegencode | cut -d ' ' -f 1)"
89+
sleep 2 # allow disk sync for md5sum check
90+
local_md5sum="$(md5sum $DHSENCODE | cut -d ' ' -f 1)"
8091
if [ "$original_md5sum" != "$local_md5sum" ]; then
81-
echo "ERROR: unexpected failure while downloading ${encodegencode}"
92+
echo "ERROR: unexpected failure while downloading ${DHSENCODE}"
8293
exit 1
8394
fi
84-
echo "Extracting ${encodegencode}..."
85-
tar -xvf $encodegencode
95+
echo "Extracting ${DHSENCODE}..."
96+
tar -xvf $DHSENCODE
8697

8798
echo "Downloading GENCODE encoding sequences..."
88-
original_md5sum="$(curl -sL https://raw.githubusercontent.com/pinellolab/CRISPRme/gnomad-4.1-converter/download_data/dhs+encode+gencode.hg38.bed.tar.gz | md5sum | cut -d ' ' -f 1)"
89-
gencode="gencode.protein_coding.bed.zip"
99+
original_md5sum="$(curl -sL https://raw.githubusercontent.com/pinellolab/CRISPRme/gnomad-4.1-converter/download_data/gencode.protein_coding.bed.tar.gz | md5sum | cut -d ' ' -f 1)"
100+
GENCODE="gencode.protein_coding.bed.zip"
90101
while true; do # retry download if caught timeout
91-
wget -T 15 -c -O $gencode https://raw.githubusercontent.com/pinellolab/CRISPRme/gnomad-4.1-converter/download_data/gencode.protein_coding.bed.tar.gz && break
102+
wget -T 15 -c -O $GENCODE https://raw.githubusercontent.com/pinellolab/CRISPRme/gnomad-4.1-converter/download_data/gencode.protein_coding.bed.tar.gz && break
92103
done
93-
local_md5sum="$(md5sum $gencode | cut -d ' ' -f 1)"
104+
sleep 2 # allow disk sync for md5sum check
105+
local_md5sum="$(md5sum $GENCODE | cut -d ' ' -f 1)"
94106
if [ "$original_md5sum" != "$local_md5sum" ]; then
95-
echo "ERROR: unexpected failure while downloading ${gencode}"
107+
echo "ERROR: unexpected failure while downloading ${GENCODE}"
96108
exit 1
97109
fi
98-
echo "Extracting ${gencode}..."
99-
tar -xvf $gencode
110+
echo "Extracting ${GENCODE}..."
111+
tar -xvf $GENCODE
100112
cd ..
101113

102114
# create Dictionaries folder
@@ -115,4 +127,4 @@ printf "NNNNNNNNNNNNNNNNNNNNNGG 3\n" > $NGGPAM
115127
cd ..
116128

117129
echo "Start CRISPRme test..."
118-
crisprme.py complete-search --genome Genomes/hg38/ --vcf $VCFCONFIG --guide $GUIDEFILE --pam PAMs/$NGGPAM --annotation Annotations/$encodegencode --samplesID $SAMPLESCONFIG --gene_annotation Annotations/$gencode --mm 6 --bDNA 2 --bRNA 2 --merge 3 --output sg1617.6.2.2 --thread 4
130+
crisprme.py complete-search --genome Genomes/$HG38 --vcf $VCFCONFIG --guide $GUIDEFILE --pam PAMs/$NGGPAM --annotation Annotations/$DHSENCODE --samplesID $SAMPLESCONFIG --gene_annotation Annotations/$GENCODE --sorting-criteria-scoring mm+bulges --sorting-criteria mm,bulges --mm 6 --bDNA 2 --bRNA 2 --merge 3 --output sg1617.6.2.2 --thread 4

crisprme_auto_test_docker.sh

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# ------------------------------------------------------------------------------
2-
# TEST CRISPRme conda package
2+
# TEST CRISPRme Docker
33

44
echo "Download and extract fundamental data..."
55

@@ -40,6 +40,7 @@ do
4040
while true; do # retry download if caught timeout
4141
wget -T 15 -c ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/data_collections/1000_genomes_project/release/20190312_biallelic_SNV_and_INDEL/ALL.chr${i}.shapeit2_integrated_snvindels_v2a_27022019.GRCh38.phased.vcf.gz && break
4242
done
43+
sleep 2 # allow disk sync for md5sum check
4344
local_md5sum="$(md5sum ALL.chr${i}.shapeit2_integrated_snvindels_v2a_27022019.GRCh38.phased.vcf.gz | cut -d ' ' -f 1)"
4445
if [ "$original_md5sum" != "$local_md5sum" ]; then # check download consistency
4546
echo "ERROR: unexpected failure while downloading ALL.chr${i}.shapeit2_integrated_snvindels_v2a_27022019.GRCh38.phased.vcf.gz"
@@ -59,7 +60,16 @@ cd $SAMPLESIDS
5960
# download 1000G samples IDs
6061
echo "Downloading samples ids for 1000G dataset"
6162
SAMPLES1000G="hg38_1000G.samplesID.txt"
62-
wget https://raw.githubusercontent.com/pinellolab/CRISPRme/refs/heads/gnomad-4.1-converter/download_data/${SAMPLES1000G}
63+
original_md5sum="$(curl -sL https://raw.githubusercontent.com/pinellolab/CRISPRme/refs/heads/gnomad-4.1-converter/download_data/${SAMPLES1000G} | md5sum | cut -d ' ' -f 1)" # compute original md5sum
64+
while true; do # retry download if caught timeout
65+
wget -T 15 -c https://raw.githubusercontent.com/pinellolab/CRISPRme/refs/heads/gnomad-4.1-converter/download_data/${SAMPLES1000G} && break
66+
done
67+
sleep 2 # allow disk sync for md5sum check
68+
local_md5sum="$(md5sum $SAMPLES1000G | cut -d ' ' -f 1)"
69+
if [ "$original_md5sum" != "$local_md5sum" ]; then
70+
echo "ERROR: unexpected failure while downloading ${SAMPLES1000G}"
71+
exit 1
72+
fi
6373
cd ..
6474

6575
# initialize samples config file
@@ -72,31 +82,33 @@ mkdir -p $ANNOTATIONDIR # create annotation folder
7282
cd $ANNOTATIONDIR
7383
echo "Downloading ENCODE+GENCODE annotation data..."
7484
original_md5sum="$(curl -sL https://raw.githubusercontent.com/pinellolab/CRISPRme/gnomad-4.1-converter/download_data/dhs+encode+gencode.hg38.bed.tar.gz | md5sum | cut -d ' ' -f 1)"
75-
encodegencode="dhs+encode+gencode.hg38.bed.zip"
85+
DHSENCODE="dhs+encode+gencode.hg38.bed.zip"
7686
while true; do # retry download if caught timeout
77-
wget -T 15 -c -O $encodegencode https://raw.githubusercontent.com/pinellolab/CRISPRme/gnomad-4.1-converter/download_data/dhs+encode+gencode.hg38.bed.tar.gz && break
87+
wget -T 15 -c -O $DHSENCODE https://raw.githubusercontent.com/pinellolab/CRISPRme/gnomad-4.1-converter/download_data/dhs+encode+gencode.hg38.bed.tar.gz && break
7888
done
79-
local_md5sum="$(md5sum $encodegencode | cut -d ' ' -f 1)"
89+
sleep 2 # allow disk sync for md5sum check
90+
local_md5sum="$(md5sum $DHSENCODE | cut -d ' ' -f 1)"
8091
if [ "$original_md5sum" != "$local_md5sum" ]; then
81-
echo "ERROR: unexpected failure while downloading ${encodegencode}"
92+
echo "ERROR: unexpected failure while downloading ${DHSENCODE}"
8293
exit 1
8394
fi
84-
echo "Extracting ${encodegencode}..."
85-
tar -xvf $encodegencode
95+
echo "Extracting ${DHSENCODE}..."
96+
tar -xvf $DHSENCODE
8697

8798
echo "Downloading GENCODE encoding sequences..."
88-
original_md5sum="$(curl -sL https://raw.githubusercontent.com/pinellolab/CRISPRme/gnomad-4.1-converter/download_data/dhs+encode+gencode.hg38.bed.tar.gz | md5sum | cut -d ' ' -f 1)"
89-
gencode="gencode.protein_coding.bed.zip"
99+
original_md5sum="$(curl -sL https://raw.githubusercontent.com/pinellolab/CRISPRme/gnomad-4.1-converter/download_data/gencode.protein_coding.bed.tar.gz | md5sum | cut -d ' ' -f 1)"
100+
GENCODE="gencode.protein_coding.bed.zip"
90101
while true; do # retry download if caught timeout
91-
wget -T 15 -c -O $gencode https://raw.githubusercontent.com/pinellolab/CRISPRme/gnomad-4.1-converter/download_data/gencode.protein_coding.bed.tar.gz && break
102+
wget -T 15 -c -O $GENCODE https://raw.githubusercontent.com/pinellolab/CRISPRme/gnomad-4.1-converter/download_data/gencode.protein_coding.bed.tar.gz && break
92103
done
93-
local_md5sum="$(md5sum $gencode | cut -d ' ' -f 1)"
104+
sleep 2 # allow disk sync for md5sum check
105+
local_md5sum="$(md5sum $GENCODE | cut -d ' ' -f 1)"
94106
if [ "$original_md5sum" != "$local_md5sum" ]; then
95-
echo "ERROR: unexpected failure while downloading ${gencode}"
107+
echo "ERROR: unexpected failure while downloading ${GENCODE}"
96108
exit 1
97109
fi
98-
echo "Extracting ${gencode}..."
99-
tar -xvf $gencode
110+
echo "Extracting ${GENCODE}..."
111+
tar -xvf $GENCODE
100112
cd ..
101113

102114
# create Dictionaries folder
@@ -115,4 +127,4 @@ printf "NNNNNNNNNNNNNNNNNNNNNGG 3\n" > $NGGPAM
115127
cd ..
116128

117129
echo "Start CRISPRme test..."
118-
docker run -v ${PWD}:/DATA -w /DATA -i pinellolab/crisprme crisprme.py complete-search --genome Genomes/hg38/ --vcf $VCFCONFIG --guide $GUIDEFILE --pam PAMs/$NGGPAM --annotation Annotations/$encodegencode --samplesID $SAMPLESCONFIG --gene_annotation Annotations/$gencode --mm 6 --bDNA 2 --bRNA 2 --merge 3 --output sg1617.6.2.2 --thread 4
130+
docker run -v ${PWD}:/DATA -w /DATA -i pinellolab/crisprme crisprme.py complete-search --genome Genomes/$HG38 --vcf $VCFCONFIG --guide $GUIDEFILE --pam PAMs/$NGGPAM --annotation Annotations/$DHSENCODE --samplesID $SAMPLESCONFIG --gene_annotation Annotations/$GENCODE --sorting-criteria-scoring mm+bulges --sorting-criteria mm,bulges --mm 6 --bDNA 2 --bRNA 2 --merge 3 --output sg1617.6.2.2 --thread 4

0 commit comments

Comments
 (0)