diff wrapper.sh @ 56:ee807645b224 draft

Uploaded
author davidvanzessen
date Mon, 17 Jul 2017 10:44:40 -0400
parents 6cd12c71c3d3
children cb779a45537b
line wrap: on
line diff
--- a/wrapper.sh	Wed Jun 14 11:14:00 2017 -0400
+++ b/wrapper.sh	Mon Jul 17 10:44:40 2017 -0400
@@ -41,6 +41,10 @@
 	echo "tar -xJf $input -C $PWD/files/"
 	mkdir -p "$PWD/files/$title"
 	tar -xJf $input -C "$PWD/files/$title"
+else
+	echo "Unrecognized format $type"
+	echo "Unrecognized format $type" > $log
+	exit 1
 fi
 
 cat "`find $PWD/files/ -name "1_*"`" > $PWD/summary.txt
@@ -52,6 +56,10 @@
 cat "`find $PWD/files/ -name "8_*"`" > $PWD/mutationstats.txt
 cat "`find $PWD/files/ -name "10_*"`" > $PWD/hotspots.txt
 
+echo "---------------- unique id check ----------------"
+
+Rscript $dir/check_unique_id.r $PWD/summary.txt $PWD/sequences.txt $PWD/gapped_aa.txt $PWD/aa.txt $PWD/junction.txt $PWD/mutationanalysis.txt $PWD/mutationstats.txt $PWD/hotspots.txt
+
 if [[ ${#BLASTN_DIR} -ge 5 ]] ; then
 	echo "On server, using BLASTN_DIR env: ${BLASTN_DIR}"
 else
@@ -69,7 +77,7 @@
 
 Rscript $dir/merge_and_filter.r $PWD/summary.txt $PWD/sequences.txt $PWD/mutationanalysis.txt $PWD/mutationstats.txt $PWD/hotspots.txt "$PWD/gapped_aa.txt" $outdir/identified_genes.txt $outdir/merged.txt $outdir/before_unique_filter.txt $outdir/unmatched.txt $method $functionality $unique ${filter_unique} ${filter_unique_count} ${class_filter} ${empty_region_filter} 2>&1
 
-if [[ "$fast" == "no" ]] ; then
+if [[ "${naive_output}" == "yes" ]] ; then
 
 	echo "---------------- creating new IMGT zips ----------------"
 	echo "---------------- creating new IMGT zips ----------------<br />" >> $log