changeset 55:0d5add1a9800 draft

Uploaded
author davidvanzessen
date Tue, 01 Mar 2016 04:53:06 -0500
parents d8daf8ed39e1
children a4317b006d70
files wrapper.sh
diffstat 1 files changed, 30 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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 "<html><center><h1>$title</h1></center>" >> $output
-
+echo "---------------- main tables ----------------"
 for func in ${funcs[@]}
 do
+
+	echo "---------------- $func table ----------------"
+	
 	cat $outdir/mutations_${func}.txt $outdir/hotspot_analysis_${func}.txt > $outdir/result.txt
 
 	echo "<table border='1' width='100%'><caption><h3>${func} table</h3></caption>" >> $output
@@ -104,6 +122,8 @@
 
 done
 
+echo "---------------- download links ----------------"
+
 echo "</table>" >> $output
 echo "<a href='unmatched.txt'>unmatched</a><br />" >> $output
 echo "<a href='motif_per_seq.txt'>motif per sequence</a><br />" >> $output
@@ -112,6 +132,8 @@
 echo "<a href='aa_id_mutations.txt'>AA mutations location by id</a><br />" >> $output
 echo "<a href='absent_aa_id.txt'>Absant AA locations by id</a><br />" >> $output
 
+echo "---------------- images ----------------"
+
 echo "<img src='all.png'/><br />" >> $output
 echo "<a href='all.txt'>download data</a><br />" >> $output
 if [ -a $outdir/ca.png ] 
@@ -163,11 +185,14 @@
 
 #optional output for naive
 
+echo "---------------- aa_histogram.r ----------------"
+
 if [[ "$naive_output" != "None" ]]
 then
-	echo "naive_output: $naive_output"
+	echo "---------------- imgt_loader.r ----------------"
 	#python $dir/imgt_loader.py --summ $PWD/summary.txt --aa $PWD/aa.txt --junction $PWD/junction.txt --output $naive_output
 	Rscript --verbose $dir/imgt_loader.r $PWD/summary.txt $PWD/aa.txt $PWD/junction.txt ${naive_output} 2>&1
+	echo "---------------- naive_output.r ----------------"
 	Rscript $dir/naive_output.r $naive_output $outdir/merged.txt $naive_output 2>&1
 fi