Skip to content

Commit e269303

Browse files
authored
Merge pull request #8 from CEGRcode/dev-strainid
Update StrainID for improved accuracy and seed-setting capability
2 parents d913017 + e843f47 commit e269303

4 files changed

Lines changed: 78 additions & 78423 deletions

File tree

StrainID/hg19_VCF/HEKTE.vcf

Lines changed: 0 additions & 182 deletions
This file was deleted.

StrainID/identify-Strain.sh

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ usage()
1010
exit
1111
}
1212

13-
if [ "$#" -ne 8 ]; then
13+
if [ "$#" -ne 8 && "$#" -ne 10 ]; then
1414
usage
1515
fi
1616

17-
while getopts ":i:g:v:o:" IN; do
17+
SEED=""
18+
19+
while getopts ":i:g:v:o:s:" IN; do
1820
case "${IN}" in
1921
i)
2022
INPUT=${OPTARG}
@@ -28,6 +30,9 @@ while getopts ":i:g:v:o:" IN; do
2830
o)
2931
OUTPUT=${OPTARG}
3032
;;
33+
s)
34+
SEED=${OPTARG}
35+
;;
3136
*)
3237
usage
3338
;;
@@ -43,6 +48,7 @@ echo "Input folder = ${INPUT}"
4348
echo "Genome FASTA file = ${GENOME}"
4449
echo "VCF folder = ${VCF}"
4550
echo "Output folder = ${OUTPUT}"
51+
echo "Seed value = ${SEED}"
4652

4753
LOCAL=$(pwd)
4854
cd $INPUT
@@ -51,6 +57,10 @@ do
5157

5258
SAMPLE=$(echo $BAM | awk -F"." '{print $1}')
5359
echo $SAMPLE
54-
python $LOCAL/strainScripts/detect_strain_BAM.py -b $BAM -g $GENOME -v $VCF -o $OUTPUT/$SAMPLE\_strain.tab
55-
60+
61+
if [[ $SEED -eq "" ]]; then
62+
python $LOCAL/strainScripts/detect_strain_BAM.py -b $BAM -g $GENOME -v $VCF -o $OUTPUT/$SAMPLE\_strain.tab
63+
else
64+
python $LOCAL/strainScripts/detect_strain_BAM.py -b $BAM -g $GENOME -v $VCF -o $OUTPUT/$SAMPLE\_strain.tab -s $SEED
65+
fi
5666
done

0 commit comments

Comments
 (0)