changeset 6:2ddb9a21f635 draft

Uploaded
author davidvanzessen
date Tue, 01 Nov 2016 10:48:38 -0400
parents 012a738edf5a
children ad9be244b104
files shm_csr.xml wrapper.sh
diffstat 2 files changed, 40 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/shm_csr.xml	Tue Nov 01 10:15:37 2016 -0400
+++ b/shm_csr.xml	Tue Nov 01 10:48:38 2016 -0400
@@ -1,7 +1,7 @@
 <tool id="shm_csr" name="SHM &amp; CSR pipeline" version="1.0">
 	<description></description>
 	<command interpreter="bash">
-		wrapper.sh $in_file custom $out_file $out_file.files_path ${in_file.name} "-" $functionality $unique $naive_output_ca $naive_output_cg $naive_output_cm $filter_uniques $class_filter $empty_region_filter $fast
+		wrapper.sh $in_file custom $out_file $out_file.files_path ${in_file.name} "-" $functionality $unique $naive_output_ca $naive_output_cg $naive_output_cm $naive_output_ce $filter_uniques $class_filter $empty_region_filter $fast
 	</command>
 	<inputs>
 		<param name="in_file" type="data" label="IMGT zip file to be analysed" />
@@ -66,6 +66,9 @@
 		<data format="imgt_archive" name="naive_output_cm" label = "Naive CM input data from ${in_file.name}" >
 		    <filter>naive_output_cond['naive_output'] == "yes"</filter>
 		</data>
+		<data format="imgt_archive" name="naive_output_ce" label = "Naive CE input data from ${in_file.name}" >
+		    <filter>naive_output_cond['naive_output'] == "yes"</filter>
+		</data>
 	</outputs>
 	<citations>
 		<citation type="doi">10.1093/nar/gks457</citation>
--- a/wrapper.sh	Tue Nov 01 10:15:37 2016 -0400
+++ b/wrapper.sh	Tue Nov 01 10:48:38 2016 -0400
@@ -13,10 +13,11 @@
 naive_output_ca=$9
 naive_output_cg=${10}
 naive_output_cm=${11}
-filter_unique=${12}
-class_filter=${13}
-empty_region_filter=${14}
-fast=${15}
+naive_output_ce=${12}
+filter_unique=${13}
+class_filter=${14}
+empty_region_filter=${15}
+fast=${16}
 mkdir $outdir
 
 tar -xzf $dir/style.tar.gz -C $outdir
@@ -371,12 +372,14 @@
 	echo "<img src='aa_histogram_IGA.png'/><br />" >> $output
 	echo "<img src='aa_histogram_IGG.png'/><br />" >> $output
 	echo "<img src='aa_histogram_IGM.png'/><br />" >> $output
+	echo "<img src='aa_histogram_IGE.png'/><br />" >> $output
 fi
 
 echo "<embed src='baseline.pdf' width='700px' height='1000px'>" >> $output
 echo "<embed src='baseline_IGA.pdf' width='700px' height='1000px'>" >> $output
 echo "<embed src='baseline_IGG.pdf' width='700px' height='1000px'>" >> $output
 echo "<embed src='baseline_IGM.pdf' width='700px' height='1000px'>" >> $output
+echo "<embed src='baseline_IGE.pdf' width='700px' height='1000px'>" >> $output
 
 echo "</div>" >> $output #antigen selection tab end
 
@@ -434,6 +437,14 @@
 		echo "No IGM sequences" > "$outdir/change_o/change-o-defined_clones-summary-IGM.txt"
 	fi
 
+	if [[ $(wc -l < $outdir/new_IMGT_IGE/1_Summary.txt) -gt "1" ]]; then
+		bash $dir/change_o/makedb.sh $outdir/new_IMGT_IGE.txz false false false $outdir/change_o/change-o-db-IGE.txt
+		bash $dir/change_o/define_clones.sh bygroup $outdir/change_o/change-o-db-IGE.txt gene first ham none min complete 3.0 $outdir/change_o/change-o-db-defined_clones-IGE.txt $outdir/change_o/change-o-defined_clones-summary-IGE.txt
+	else
+		echo "No IGE sequences" > "$outdir/change_o/change-o-db-defined_clones-IGE.txt"
+		echo "No IGE sequences" > "$outdir/change_o/change-o-defined_clones-summary-IGE.txt"
+	fi
+
 	PWD="$tmp"
 
 echo "<div class='tabbertab' title='Clonality'>" >> $output #clonality tab
@@ -464,15 +475,19 @@
 clonality_table $outdir/change_o/change-o-defined_clones-summary.txt $output
 echo "</div>" >> $output
 
-echo "<div class='tabbertab' title='Ca'>" >> $output
+echo "<div class='tabbertab' title='IGA'>" >> $output
 clonality_table $outdir/change_o/change-o-defined_clones-summary-IGA.txt $output
 echo "</div>" >> $output
 
-echo "<div class='tabbertab' title='Cg'>" >> $output
+echo "<div class='tabbertab' title='IGG'>" >> $output
 clonality_table $outdir/change_o/change-o-defined_clones-summary-IGG.txt $output
 echo "</div>" >> $output
 
-echo "<div class='tabbertab' title='Cm'>" >> $output
+echo "<div class='tabbertab' title='IGM'>" >> $output
+clonality_table $outdir/change_o/change-o-defined_clones-summary-IGM.txt $output
+echo "</div>" >> $output
+
+echo "<div class='tabbertab' title='IGE'>" >> $output
 clonality_table $outdir/change_o/change-o-defined_clones-summary-IGM.txt $output
 echo "</div>" >> $output
 
@@ -520,6 +535,7 @@
 echo "<tr><td>The data for the 'IGG3' transition plot</td><td><a href='transition_IGG3_sum.txt' download='transition_IGG3_sum.txt' >Download</a></td></tr>" >> $output
 echo "<tr><td>The data for the 'IGG4' transition plot</td><td><a href='transition_IGG4_sum.txt' download='transition_IGG4_sum.txt' >Download</a></td></tr>" >> $output
 echo "<tr><td>The data for the 'IGM' transition plot</td><td><a href='transition_IGM_sum.txt' download='transition_IGM_sum.txt' >Download</a></td></tr>" >> $output
+echo "<tr><td>The data for the 'IGE' transition plot</td><td><a href='transition_IGE_sum.txt' download='transition_IGE_sum.txt' >Download</a></td></tr>" >> $output
 
 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>Antigen Selection</td></tr>" >> $output
 echo "<tr><td>AA mutation data per sequence ID</td><td><a href='aa_id_mutations.txt' download='aa_id_mutations.txt' >Download</a></td></tr>" >> $output
@@ -533,6 +549,7 @@
 echo "<tr><td>Baseline IGG data</td><td><a href='baseline_IGG.txt' download='baseline_IGG.txt' >Download</a></td></tr>" >> $output
 echo "<tr><td>Baseline IGM PDF</td><td><a href='baseline_IGM.pdf' download='baseline_IGM.pdf' >Download</a></td></tr>" >> $output
 echo "<tr><td>Baseline IGM data</td><td><a href='baseline_IGM.txt' download='baseline_IGM.txt' >Download</a></td></tr>" >> $output
+echo "<tr><td>Baseline IGE data</td><td><a href='baseline_IGE.txt' download='baseline_IGE.txt' >Download</a></td></tr>" >> $output
 
 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>CSR</td></tr>" >> $output
 echo "<tr><td>The data for the CSR IGA pie plot</td><td><a href='IGA_pie.txt' download='IGA_pie.txt' >Download</a></td></tr>" >> $output
@@ -548,6 +565,8 @@
 echo "<tr><td>The Change-O DB defined clones summary file of IGG</td><td><a href='change_o/change-o-defined_clones-summary-IGG.txt' download='change_o/change-o-defined_clones-summary-IGG.txt' >Download</a></td></tr>" >> $output
 echo "<tr><td>The Change-O DB file with defined clones of IGM</td><td><a href='change_o/change-o-db-defined_clones-IGM.txt' download='change_o/change-o-db-defined_clones-IGM.txt' >Download</a></td></tr>" >> $output
 echo "<tr><td>The Change-O DB defined clones summary file of IGM</td><td><a href='change_o/change-o-defined_clones-summary-IGM.txt' download='change_o/change-o-defined_clones-summary-IGM.txt' >Download</a></td></tr>" >> $output
+echo "<tr><td>The Change-O DB file with defined clones of IGE</td><td><a href='change_o/change-o-db-defined_clones-IGE.txt' download='change_o/change-o-db-defined_clones-IGE.txt' >Download</a></td></tr>" >> $output
+echo "<tr><td>The Change-O DB defined clones summary file of IGE</td><td><a href='change_o/change-o-defined_clones-summary-IGE.txt' download='change_o/change-o-defined_clones-summary-IGE.txt' >Download</a></td></tr>" >> $output
 
 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>Filtered IMGT output files</td></tr>" >> $output
 echo "<tr><td>An IMGT archive with just the matched and filtered sequences</td><td><a href='new_IMGT.txz' download='new_IMGT.txz' >Download</a></td></tr>" >> $output
@@ -560,6 +579,7 @@
 echo "<tr><td>An IMGT archive with just the matched and filtered IGG3 sequences</td><td><a href='new_IMGT_IGG3.txz' download='new_IMGT_IGG3.txz' >Download</a></td></tr>" >> $output
 echo "<tr><td>An IMGT archive with just the matched and filtered IGG4 sequences</td><td><a href='new_IMGT_IGG4.txz' download='new_IMGT_IGG4.txz' >Download</a></td></tr>" >> $output
 echo "<tr><td>An IMGT archive with just the matched and filtered IGM sequences</td><td><a href='new_IMGT_IGM.txz' download='new_IMGT_IGM.txz' >Download</a></td></tr>" >> $output
+echo "<tr><td>An IMGT archive with just the matched and filtered IGE sequences</td><td><a href='new_IMGT_IGE.txz' download='new_IMGT_IGM.txz' >Download</a></td></tr>" >> $output
 
 echo "</table>" >> $output
 
@@ -611,6 +631,14 @@
 		echo "No IGM sequences" > "$outdir/baseline_IGM.txt"
 	fi
 
+	mkdir $outdir/baseline/IGE
+	if [[ $(wc -l < $outdir/new_IMGT_IGE/1_Summary.txt) -gt "1" ]]; then
+		cd $outdir/baseline/IGE
+		bash $dir/baseline/wrapper.sh 1 1 1 1 0 0 "25:26:38:55:65:104:-" $outdir/new_IMGT_IGE.txz "IGE" "$dir/baseline/IMGT-reference-seqs-IGHV-2015-11-05.fa" "$outdir/baseline_IGE.pdf" "Sequence.ID" "$outdir/baseline_IGE.txt"
+	else
+		echo "No IGE sequences" > "$outdir/baseline_IGE.txt"
+	fi
+
 	cd $tmp
 
 	echo "Cleaning up *.RData files"
@@ -626,6 +654,7 @@
 	cp $outdir/new_IMGT_IGA.txz ${naive_output_ca}
 	cp $outdir/new_IMGT_IGG.txz ${naive_output_cg}
 	cp $outdir/new_IMGT_IGM.txz ${naive_output_cm}
+	cp $outdir/new_IMGT_IGE.txz ${naive_output_ce}
 fi
 
 echo "</table>" >> $outdir/base_overview.html