# HG changeset patch # User davidvanzessen # Date 1456825986 18000 # Node ID 0d5add1a9800f95d7d1a11aa5617dbf088fd1b2c # Parent d8daf8ed39e1ecd5a2d25c46f28812e899d85a83 Uploaded diff -r d8daf8ed39e1 -r 0d5add1a9800 wrapper.sh --- a/wrapper.sh Mon Feb 29 10:55:11 2016 -0500 +++ b/wrapper.sh Tue Mar 01 04:53:06 2016 -0500 @@ -13,6 +13,10 @@ filter_unique=${10} mkdir $outdir +echo "---------------- read parameters ----------------" + +echo "unpacking IMGT file" + type="`file $input`" if [[ "$type" == *"Zip archive"* ]] ; then echo "Zip archive" @@ -39,9 +43,13 @@ echo "identification ($method)" +echo "blast or custom" + if [[ "${method}" == "custom" ]] ; then + echo "custom" python $dir/gene_identification.py --input $PWD/summary.txt --output $outdir/identified_genes.txt else + echo "blast" ID_index=$(cat $PWD/summary.txt | grep -o -P ".+Sequence ID" | grep -o -P "\t" | wc -l) ID_index=$((ID_index+1)) sequence_index=$(cat $PWD/summary.txt | grep -o -P ".+\tSequence" | grep -o -P "\t" | wc -l) @@ -55,11 +63,12 @@ ${BLASTN_DIR}/blastn -task blastn -db $dir/subclass_definition.db -query $PWD/sequences.fasta -outfmt 6 >> $outdir/identified_genes.txt fi - +echo "---------------- merge_and_filter.r ----------------" -echo "merging" Rscript $dir/merge_and_filter.r $PWD/summary.txt $PWD/sequences.txt $PWD/mutationanalysis.txt $PWD/mutationstats.txt $PWD/hotspots.txt $outdir/identified_genes.txt $outdir/merged.txt $outdir/unmatched.txt $method $functionality $unique ${filter_unique} +echo "---------------- mutation_analysis.r ----------------" + genes="ca,ca1,ca2,cg,cg1,cg2,cg3,cg4,cm" echo "R mutation analysis" Rscript $dir/mutation_analysis.r $outdir/merged.txt $genes $outdir ${include_fr1} 2>&1 @@ -67,9 +76,15 @@ #echo "." > $output #exit 0 -echo "python mutation analysis" + + +echo "---------------- mutation_analysis.py ----------------" + python $dir/mutation_analysis.py --input $outdir/merged.txt --genes $genes --includefr1 "${include_fr1}" --output $outdir/hotspot_analysis.txt echo "R AA histogram" + +echo "---------------- aa_histogram.r ----------------" + Rscript $dir/aa_histogram.r $outdir/aa_mutations.txt $outdir/aa_histogram.png 2>&1 genes=(ca ca1 ca2 cg cg1 cg2 cg3 cg4 cm) @@ -78,9 +93,12 @@ echo "