changeset 8:8cbc1a8d27ae draft

Uploaded
author davidvanzessen
date Mon, 19 Dec 2016 08:50:31 -0500
parents 54f6756bacb1
children efa1f5a17b6e
files experimental_design.xml igblast/igblast.sh igblastn.xml igparse.xml imgt_loader.xml report_clonality/RScript.r report_clonality/r_wrapper.sh report_clonality_igg.xml
diffstat 8 files changed, 65 insertions(+), 446 deletions(-) [+]
line wrap: on
line diff
--- a/experimental_design.xml	Fri Dec 16 09:01:40 2016 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-<tool id="experimentaldesign_igg" name="ExperimentalDesign" version="1.0">
-	<description> </description>
-	<command interpreter="bash">
-		experimental_design/experimental_design.sh 
-		#for $i, $f in enumerate($patients)
-            "$f.id"
-            #for $j, $g in enumerate($f.samples)
-            	${g.sample}
-            #end for
-		#end for
-		$out_file
-	</command>
-	<inputs>
-		<repeat name="patients" title="Patient" min="1" default="1">
-            <repeat name="samples" title="Sample" min="1" default="1">
-                <param name="sample" format="tabular" type="data" label="Sample to Process" />
-            </repeat>
-			<param name="id" type="text" label="ID" />
-		</repeat>
-	</inputs>
-	<outputs>
-		<data format="tabular" name="out_file"/>
-	</outputs>
-	<help>
-Takes the ARGalaxy proprietary format and merges several samples and/or patients together.
-	</help>
- <citations>
-    <!-- Example of annotating a citation using a DOI. -->
-    <citation type="doi">10.1093/bioinformatics/btq281</citation>
-
-    <!-- Example of annotating a citation using a BibTex entry. -->
-    <citation type="bibtex">@ARTICLE{Kim07aninterior-point,
-    author = {Seung-jean Kim and Kwangmoo Koh and Michael Lustig and Stephen Boyd and Dimitry Gorinevsky},
-    title = {An interior-point method for large-scale l1-regularized logistic regression},
-    journal = {Journal of Machine Learning Research},
-    year = {2007},
-    volume = {8},
-    pages = {1519-1555}
-    }</citation>
-  </citations>
-  <tests>
-    <test>
-      <param name="input" value="1.bed"/>
-      <param name="column" value="1"/>
-      <param name="order" value="ASC"/>
-      <param name="style" value="num"/>
-      <output name="out_file1" file="sort1_num.bed"/>
-    </test>
-    <test>
-      <param name="input" value="7.bed"/>
-      <param name="column" value="1"/>
-      <param name="order" value="ASC"/>
-      <param name="style" value="alpha"/>
-      <output name="out_file1" file="sort1_alpha.bed"/>
-    </test>
-  </tests>
-</tool>
--- a/igblast/igblast.sh	Fri Dec 16 09:01:40 2016 -0500
+++ b/igblast/igblast.sh	Mon Dec 19 08:50:31 2016 -0500
@@ -15,9 +15,15 @@
 
 species="${speciesdict[$species]}"
 
+if [ "$species" == "" ]
+then
+	>&2 echo "Species not possible with igBLASTn, use IMGT"
+	exit 1
+fi
+
 echo "$input $species $locus $output"
 
-java -Xmx64G -jar $IGBLASTWRP/igblastwrp.jar -p 4 -S $species -R $locus ${input} $PWD/blasted_output 2>&1
+java -Xmx16G -jar $IGBLASTWRP/igblastwrp.jar -p 4 -S $species -R $locus ${input} $PWD/blasted_output 2>&1
 #java -Xmx64G -jar $dir/igblastwrp.jar -p 4 -S $species -R $locus ${input} $PWD/blasted_output 2>&1
 #java -Xmx64G -jar $dir/migmap-1.0.1.jar -p 4 -S "$species" -R $locus ${input} $PWD/blasted_output 2>&1
 
--- a/igblastn.xml	Fri Dec 16 09:01:40 2016 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-<tool id="igblastn" name="igBLASTn" version="0.1.0">
-    <description> </description>
-    <command interpreter="bash">
-		igblast/igblast.sh $input $species $locus $output
-	</command>
-	<inputs>
-		<param name="input" type="data" format="fasta" label="Fasta file"/>
-		<param name="species" type="select" label="Species">
-			<option value="human">Homo sapiens</option>
-			<option value="mouse">Mus musculus</option>
-			<option value="rat">Rattus norvegicus</option>
-			<option value="rabbit">Oryctolagus cuniculus</option>
-			<option value="rhesus_monkey">Macaca mulatta</option>
-			<option value="BosTaurus">BosTaurus</option>
-			<option value="CamelusDromedarius">CamelusDromedarius</option>
-			<option value="CanisLupusFamiliaris">CanisLupusFamiliaris</option>
-			<option value="DanioRerio">DanioRerio</option>
-			<option value="MusSpretus">MusSpretus</option>
-			<option value="OncorhynchusMykiss">OncorhynchusMykiss</option>
-			<option value="SusScrofa">SusScrofa</option>
-			<option value="GallusGallus">GallusGallus</option>
-			<option value="AnasPlatyrhynchos">AnasPlatyrhynchos</option>
-				</param>
-		<param name="locus" type="select" label="Locus">
-			<option value="TRA">TRA</option>
-			<option value="TRB">TRB</option>
-			<option value="TRG">TRG</option>
-			<option value="TRD">TRD</option>
-			<option value="IGH">IGH</option>
-			<option value="IGK">IGK</option>
-			<option value="IGL">IGL</option>
-		</param>
-	</inputs>
-	<outputs>
-		<data name="output" format="tabular" type="data" label="${input.name}-igBLASTn aligned"/>
-	<!--<data name="log" format="text" label="log"/>-->
-	</outputs>
-	<requirements>
-		<requirement type="package" version="0.6">igblastwrp</requirement>
-	</requirements>
-	<help>
-============
-iReport
-============
-
-This tool uses the online igBLAST website hosted by NCBI to blast a FASTA file, it retrieves the result and generates a convenient tabular format for further processing.
-
-**NOTE**
-
-.. class:: warningmark
-
-- Everything goes through the servers of NCBI, so if you have sensitive data that that isn't allowed to leave your local network, this isn't the tool the use.
-
-**USAGE**
-
-.. class:: infomark
-
-- This tool uses a free service provided by NCBI, and although there doesn't seem to be any restrictions on usage, avoid unnecessary usage to lighten the load on NCBI's servers.
-
-
-**INPUT**
-
-This tool accepts FASTA files as input:
-
-::
-
-		>lcl|FLN1FA002RWEZA.1| 
-		ggctggagtgggtttcatacattagtagtaatagtggtgccatatactacgcagactctgtgaagggccgattcaccatc
-		tccagaaacaatgccaaggactcactgtatctgcaaatgaacagcctgagagccgaggacacggctgtgtattactgtgc
-		gagagcgatcccccggtattactatgatactagtggcccaaacgactactggggccagggaaccctggtcaccgtctcct
-		cag
-		>lcl|FLN1FA001BLION.1| 
-		aggcttgagtggatgggatggatcaacgctggcaatggtaacacaaaatattcacagaagttccagggcagagtcaccat
-		taccagggacacatccgcgagcacagcctacatggagctgagcagcctgagatctgaagacacggctgtgtattactgtg
-		cgagagtgggcagcagctggtctgatgcttttgattatctggggccaagggacaatggtcaccgtctcctcag
-
-**OUTPUT**
-
-The following data is used for ARGalaxy
-
-+-----------------+----------------------------------------------+
-| Column name     | Column contents                              |
-+-----------------+----------------------------------------------+
-| ID              | The Sequence ID provided by the sequencer.   |
-+-----------------+----------------------------------------------+
-| VDJ Frame       | In-frame/Out-frame                           |
-+-----------------+----------------------------------------------+
-| Top V Gene      | The best matching V gene found.              |
-+-----------------+----------------------------------------------+
-| Top D Gene      | The best matching D gene found.              |
-+-----------------+----------------------------------------------+
-| Top J Gene      | The best matching J gene found.              |
-+-----------------+----------------------------------------------+
-| CDR3 Seq        | The CDR3 region.                             |
-+-----------------+----------------------------------------------+
-| CDR3 Length     | The length of the CDR3 region.               |
-+-----------------+----------------------------------------------+
-| CDR3 Seq DNA    | The CDR3 sequence region.                    |
-+-----------------+----------------------------------------------+
-| CDR3 Length DNA | The length of the CDR3 sequence region.      |
-+-----------------+----------------------------------------------+
-| Functionality   | If sequence is productive/unproductive       |
-+-----------------+----------------------------------------------+
-
-
-    </help>
-</tool>
--- a/igparse.xml	Fri Dec 16 09:01:40 2016 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-<tool id="igblastparser_igg" name="igBLASTparser" version="0.2.0">
-	<description> </description>
-	<command interpreter="perl">
-		igblastparser/igparse.pl $input 0 2>/dev/null | grep -v "D:" | cut -f2- > $output
-	</command>
-	<inputs>
-		<param name="input" type="data" format="text" label="igBLASTn report"/>
-	</inputs>
-	<outputs>
-		<data name="output" format="tabular" label="${input.name}-parsed" />
-	</outputs>
-	<help>
-		Step 2 of the Immune Repertoire tools, extracts the relevant information needed from the reports generated by igblast (Step 1)
-	</help>
-</tool>
--- a/imgt_loader.xml	Fri Dec 16 09:01:40 2016 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-<tool id="imgt_loader_igg" name="IMGT Loader" version="1.0">
-	<description> </description>
-	<command interpreter="bash">
-		imgt_loader/imgt_loader.sh $in_file $out_file "tmp"
-	</command>
-	<inputs>
-        <param name="in_file" type="data" label="Archive with files" />
-	</inputs>
-	<outputs>
-		<data format="tabular" name="out_file" label="IMGT Loader on ${in_file.name}"/>
-	</outputs>
-	<help>
-**INPUT**
-
-This tool accepts an IMGT/HIGHV-QUEST ZIP file
-
-**OUTPUT**
-
-The following data is used for ARGalaxy
-
-+-----------------+----------------------------------------------+
-| Column name     | Column contents                              |
-+-----------------+----------------------------------------------+
-| ID              | The Sequence ID provided by the sequencer.   |
-+-----------------+----------------------------------------------+
-| VDJ Frame       | In-frame/Out-frame                           |
-+-----------------+----------------------------------------------+
-| Top V Gene      | The best matching V gene found.              |
-+-----------------+----------------------------------------------+
-| Top D Gene      | The best matching D gene found.              |
-+-----------------+----------------------------------------------+
-| Top J Gene      | The best matching J gene found.              |
-+-----------------+----------------------------------------------+
-| CDR3 Seq        | The CDR3 region.                             |
-+-----------------+----------------------------------------------+
-| CDR3 Length     | The length of the CDR3 region.               |
-+-----------------+----------------------------------------------+
-| CDR3 Seq DNA    | The CDR3 sequence region.                    |
-+-----------------+----------------------------------------------+
-| CDR3 Length DNA | The length of the CDR3 sequence region.      |
-+-----------------+----------------------------------------------+
-| Functionality   | If sequence is productive/unproductive       |
-+-----------------+----------------------------------------------+
-
-
-	</help>
-
-</tool>
--- a/report_clonality/RScript.r	Fri Dec 16 09:01:40 2016 -0500
+++ b/report_clonality/RScript.r	Mon Dec 19 08:50:31 2016 -0500
@@ -135,6 +135,20 @@
   }
 }
 
+#make a names list with sample -> color
+naive.colors = c('blue4', 'darkred', 'olivedrab3', 'red', 'gray74', 'darkviolet', 'lightblue1', 'gold', 'chartreuse2', 'pink', 'Paleturquoise3', 'Chocolate1', 'Yellow', 'Deeppink3', 'Mediumorchid1', 'Darkgreen', 'Blue', 'Gray36', 'Hotpink', 'Yellow4')
+unique.samples = unique(PRODF$Sample)
+
+if(length(unique.samples) <= length(naive.colors)){
+	sample.colors = naive.colors[1:length(unique.samples)]
+} else {
+	sample.colors = rainbow(length(unique.samples))
+}
+
+names(sample.colors) = unique.samples
+
+print("Sample.colors")
+print(sample.colors)
 
 
 #write the complete dataset that is left over, will be the input if 'none' for clonaltype and 'no' for filterproductive
@@ -275,7 +289,8 @@
 
 pV = ggplot(PRODFV)
 pV = pV + geom_bar( aes( x=factor(reorder(Top.V.Gene, chr.orderV)), y=relFreq, fill=Sample), stat='identity', position="dodge") + theme(axis.text.x = element_text(angle = 90, hjust = 1))
-pV = pV + xlab("Summary of V gene") + ylab("Frequency") + ggtitle("Relative frequency of V gene usage")
+pV = pV + xlab("Summary of V gene") + ylab("Frequency") + ggtitle("Relative frequency of V gene usage") + scale_fill_manual(values=sample.colors)
+pV = pV + theme(panel.background = element_rect(fill = "white", colour="black"),text = element_text(size=15, colour="black"), axis.text.x = element_text(angle = 45, hjust = 1), panel.grid.major.y = element_line(colour = "black"), panel.grid.major.x = element_blank())
 write.table(x=PRODFV, file="VFrequency.csv", sep=",",quote=F,row.names=F,col.names=T)
 
 png("VPlot.png",width = 1280, height = 720)
@@ -285,7 +300,8 @@
 if(useD){
   pD = ggplot(PRODFD)
   pD = pD + geom_bar( aes( x=factor(reorder(Top.D.Gene, chr.orderD)), y=relFreq, fill=Sample), stat='identity', position="dodge") + theme(axis.text.x = element_text(angle = 90, hjust = 1))
-  pD = pD + xlab("Summary of D gene") + ylab("Frequency") + ggtitle("Relative frequency of D gene usage")
+  pD = pD + xlab("Summary of D gene") + ylab("Frequency") + ggtitle("Relative frequency of D gene usage") + scale_fill_manual(values=sample.colors)
+  pD = pD + theme(panel.background = element_rect(fill = "white", colour="black"),text = element_text(size=15, colour="black"), axis.text.x = element_text(angle = 45, hjust = 1), panel.grid.major.y = element_line(colour = "black"), panel.grid.major.x = element_blank())
   write.table(x=PRODFD, file="DFrequency.csv", sep=",",quote=F,row.names=F,col.names=T)
   
   png("DPlot.png",width = 800, height = 600)
@@ -295,16 +311,8 @@
 
 pJ = ggplot(PRODFJ)
 pJ = pJ + geom_bar( aes( x=factor(reorder(Top.J.Gene, chr.orderJ)), y=relFreq, fill=Sample), stat='identity', position="dodge") + theme(axis.text.x = element_text(angle = 90, hjust = 1))
-pJ = pJ + xlab("Summary of J gene") + ylab("Frequency") + ggtitle("Relative frequency of J gene usage")
-write.table(x=PRODFJ, file="JFrequency.csv", sep=",",quote=F,row.names=F,col.names=T)
-
-png("JPlot.png",width = 800, height = 600)
-pJ
-dev.off();
-
-pJ = ggplot(PRODFJ)
-pJ = pJ + geom_bar( aes( x=factor(reorder(Top.J.Gene, chr.orderJ)), y=relFreq, fill=Sample), stat='identity', position="dodge") + theme(axis.text.x = element_text(angle = 90, hjust = 1))
-pJ = pJ + xlab("Summary of J gene") + ylab("Frequency") + ggtitle("Relative frequency of J gene usage")
+pJ = pJ + xlab("Summary of J gene") + ylab("Frequency") + ggtitle("Relative frequency of J gene usage") + scale_fill_manual(values=sample.colors)
+pJ = pJ + theme(panel.background = element_rect(fill = "white", colour="black"),text = element_text(size=15, colour="black"), axis.text.x = element_text(angle = 45, hjust = 1), panel.grid.major.y = element_line(colour = "black"), panel.grid.major.x = element_blank())
 write.table(x=PRODFJ, file="JFrequency.csv", sep=",",quote=F,row.names=F,col.names=T)
 
 png("JPlot.png",width = 800, height = 600)
@@ -324,7 +332,9 @@
 VPlot = ggplot(VGenes)
 VPlot = VPlot + geom_bar(aes( x = Top.V.Gene, y = Frequency, fill = Sample), stat='identity', position='dodge' ) + theme(axis.text.x = element_text(angle = 90, hjust = 1)) + 
   ggtitle("Distribution of V gene families") + 
-  ylab("Percentage of sequences")
+  ylab("Percentage of sequences") +
+  scale_fill_manual(values=sample.colors) +
+  theme(panel.background = element_rect(fill = "white", colour="black"),text = element_text(size=15, colour="black"), axis.text.x = element_text(angle = 45, hjust = 1), panel.grid.major.y = element_line(colour = "black"), panel.grid.major.x = element_blank())
 png("VFPlot.png")
 VPlot
 dev.off();
@@ -340,7 +350,9 @@
   DPlot = ggplot(DGenes)
   DPlot = DPlot + geom_bar(aes( x = Top.D.Gene, y = Frequency, fill = Sample), stat='identity', position='dodge' ) + theme(axis.text.x = element_text(angle = 90, hjust = 1)) + 
     ggtitle("Distribution of D gene families") + 
-    ylab("Percentage of sequences")
+    ylab("Percentage of sequences") + 
+    scale_fill_manual(values=sample.colors) +
+    theme(panel.background = element_rect(fill = "white", colour="black"),text = element_text(size=15, colour="black"), axis.text.x = element_text(angle = 45, hjust = 1), panel.grid.major.y = element_line(colour = "black"), panel.grid.major.x = element_blank())
   png("DFPlot.png")
   print(DPlot)
   dev.off();
@@ -359,7 +371,9 @@
 CDR3LengthPlot = CDR3LengthPlot + geom_bar(aes( x = CDR3.Length.DNA, y = Frequency, fill = Sample), stat='identity', position='dodge' ) + theme(axis.text.x = element_text(angle = 90, hjust = 1)) + 
   ggtitle("Length distribution of CDR3") + 
   xlab("CDR3 Length") + 
-  ylab("Percentage of sequences")
+  ylab("Percentage of sequences") +
+  scale_fill_manual(values=sample.colors) +
+  theme(panel.background = element_rect(fill = "white", colour="black"),text = element_text(size=15, colour="black"), axis.text.x = element_text(angle = 45, hjust = 1), panel.grid.major.y = element_line(colour = "black"), panel.grid.major.x = element_blank())
 png("CDR3LengthPlot.png",width = 1280, height = 720)
 CDR3LengthPlot
 dev.off()
@@ -786,16 +800,21 @@
 
 # ---------------------- D reading frame ----------------------
 
-D.REGION.reading.frame = PRODF$D.REGION.reading.frame
+D.REGION.reading.frame = PRODF[,c("Sample", "D.REGION.reading.frame")]
 
-D.REGION.reading.frame[is.na(D.REGION.reading.frame)] = "No D"
+chck = is.na(D.REGION.reading.frame$D.REGION.reading.frame)
+if(any(chck)){
+	D.REGION.reading.frame[chck,"D.REGION.reading.frame"] = "No D"
+}
 
-D.REGION.reading.frame = data.frame(table(D.REGION.reading.frame))
+D.REGION.reading.frame = data.frame(data.table(D.REGION.reading.frame)[, list(Freq=.N), by=c("Sample", "D.REGION.reading.frame")])
 
 write.table(D.REGION.reading.frame, "DReadingFrame.csv" , sep="\t",quote=F,row.names=F,col.names=T)
 
 D.REGION.reading.frame = ggplot(D.REGION.reading.frame)
-D.REGION.reading.frame = D.REGION.reading.frame + geom_bar(aes( x = D.REGION.reading.frame, y = Freq), stat='identity', position='dodge' ) + ggtitle("D reading frame") + xlab("Frequency") + ylab("Frame")
+D.REGION.reading.frame = D.REGION.reading.frame + geom_bar(aes( x = D.REGION.reading.frame, y = Freq, fill=Sample), stat='identity', position='dodge' ) + ggtitle("D reading frame") + xlab("Frequency") + ylab("Frame")
+D.REGION.reading.frame = D.REGION.reading.frame + scale_fill_manual(values=sample.colors)
+D.REGION.reading.frame = D.REGION.reading.frame + theme(panel.background = element_rect(fill = "white", colour="black"),text = element_text(size=15, colour="black"), axis.text.x = element_text(angle = 45, hjust = 1), panel.grid.major.y = element_line(colour = "black"), panel.grid.major.x = element_blank())
 
 png("DReadingFrame.png")
 D.REGION.reading.frame
@@ -834,11 +853,16 @@
 AAfreqplot = AAfreqplot + annotate("rect", xmin = 3.5, xmax = 4.5, ymin = 0, ymax = Inf, fill = "blue", alpha = 0.2)
 AAfreqplot = AAfreqplot + annotate("rect", xmin = 5.5, xmax = 6.5, ymin = 0, ymax = Inf, fill = "blue", alpha = 0.2)
 AAfreqplot = AAfreqplot + annotate("rect", xmin = 6.5, xmax = 7.5, ymin = 0, ymax = Inf, fill = "red", alpha = 0.2)
-AAfreqplot = AAfreqplot + ggtitle("Amino Acid Composition in the CDR3") + xlab("Amino Acid, from Hydrophilic (left) to Hydrophobic (right)") + ylab("Percentage")
+AAfreqplot = AAfreqplot + ggtitle("Amino Acid Composition in the CDR3") + xlab("Amino Acid, from Hydrophilic (left) to Hydrophobic (right)") + ylab("Percentage") + scale_fill_manual(values=sample.colors)
+AAfreqplot = AAfreqplot + theme(panel.background = element_rect(fill = "white", colour="black"),text = element_text(size=15, colour="black"), axis.text.x = element_text(angle = 45, hjust = 1), panel.grid.major.y = element_line(colour = "black"), panel.grid.major.x = element_blank())
 
 png("AAComposition.png",width = 1280, height = 720)
 AAfreqplot
 dev.off()
 write.table(AAfreq, "AAComposition.csv" , sep=",",quote=F,na="-",row.names=F,col.names=T)
 
+# ---------------------- AA median CDR3 length ----------------------
 
+median.aa.l = data.frame(data.table(PRODF)[, list(median=as.double(median(.SD$CDR3.Length.DNA))), by=c("Sample")])
+write.table(median.aa.l, "AAMedianBySample.csv" , sep=",",quote=F,na="-",row.names=F,col.names=F)
+
--- a/report_clonality/r_wrapper.sh	Fri Dec 16 09:01:40 2016 -0500
+++ b/report_clonality/r_wrapper.sh	Mon Dec 19 08:50:31 2016 -0500
@@ -106,7 +106,7 @@
 echo "<link rel='stylesheet' type='text/css' href='style.css'></head>" >> $outputFile
 echo "<div class='tabber'><div class='tabbertab' title='Gene frequencies'>" >> $outputFile
 
-echo "<img src='CDR3LengthPlot.png'/><br />" >> $outputFile
+
 echo "<img src='VFPlot.png'/>" >> $outputFile
 if [[ "$useD" == "true" ]] ; then
 	echo "<img src='DFPlot.png'/>" >> $outputFile
@@ -116,8 +116,21 @@
 	echo "<img src='DPlot.png'/>" >> $outputFile
 fi
 echo "<img src='JPlot.png'/>" >> $outputFile
+echo "</div>" >> $outputFile
+
+echo "<div class='tabbertab' title='CDR3 Characteristics'>" >> $outputFile
+echo "<img src='CDR3LengthPlot.png'/><br />" >> $outputFile
 echo "<img src='AAComposition.png'/>" >> $outputFile
 echo "<img src='DReadingFrame.png'/>" >> $outputFile
+
+echo "<table class='pure-table pure-table-striped'>" >> $outputFile
+echo "<thead><tr><th>Sample</th><th>Median CDR3 Length</th></tr></thead>" >> $outputFile
+while IFS=, read Sample median
+do
+	echo "<tr><td>$Sample</td><td>$median</td></tr>" >> $outputFile
+done < $outputDir/AAMedianBySample.csv
+echo "</table>" >> $outputFile
+
 echo "</div>" >> $outputFile
 
 #Heatmaps
--- a/report_clonality_igg.xml	Fri Dec 16 09:01:40 2016 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,197 +0,0 @@
-<tool id="report_clonality_igg" name="Report Clonality" version="1.0">
-	<description> </description>
-	<command interpreter="bash">
-#if $gene_selection.source == "imgtdb"		
-	report_clonality/r_wrapper.sh $in_file $out_file $out_file.files_path "$clonaltype" "${gene_selection.species}" "${gene_selection.locus}" $filterproductive $clonality_method
-#else
-	report_clonality/r_wrapper.sh $in_file $out_file $out_file.files_path "$clonaltype" "custom" "${gene_selection.vgenes};${gene_selection.dgenes};${gene_selection.jgenes}" $filterproductive $clonality_method
-#end if
-	</command>
-	<inputs>
-		<param name="in_file" format="tabular" type="data" label="Data to Process" />
-		<param name="clonaltype" type="select" label="Clonal Type Definition (Needed for clonality calculation)">
-			<option value="none">Don't remove duplicates based on clonaltype</option>
-			<option value="Top.V.Gene,CDR3.Seq">Top.V.Gene, CDR3 (AA)</option>
-			<option value="Top.V.Gene,CDR3.Seq.DNA">Top.V.Gene, CDR3 (nt)</option>
-			<option value="Top.V.Gene,Top.J.Gene,CDR3.Seq">Top.V.Gene, Top.J.Gene, CDR3 (AA)</option>
-			<option value="Top.V.Gene,Top.J.Gene,CDR3.Seq.DNA">Top.V.Gene, Top.J.Gene, CDR3 (nt)</option>
-			<option value="Top.V.Gene,Top.D.Gene,Top.J.Gene,CDR3.Seq.DNA">Top.V.Gene, Top.D.Gene, Top.J.Gene, CDR3 (nt)</option>
-			<option value="Top.V.Gene,Top.D.Gene,Top.J.Gene,CDR3.Seq">Top.V.Gene, Top.D.Gene, Top.J.Gene, CDR3 (AA)</option>
-		</param>
-		
-		<conditional name="gene_selection" >
-			<param name="source" type="select" label="Gene reference" help="" >
-					<option value="imgtdb" selected="true">IMGT-DB</option>
-					<option value="custom">User defined</option>
-			</param>
-			<when value="imgtdb">
-				<param name="species" type="select" label="Species">
-					<option value="Homo sapiens functional">Homo sapiens functional</option>
-					<option value="Homo sapiens">Homo sapiens</option>
-					<option value="Homo sapiens non-functional">Homo sapiens non-functional</option>
-					<option value="Bos taurus">Bos taurus</option>
-					<option value="Bos taurus functional">Bos taurus functional</option>
-					<option value="Bos taurus non-functional">Bos taurus non-functional</option>
-					<option value="Camelus dromedarius">Camelus dromedarius</option>
-					<option value="Camelus dromedarius functional">Camelus dromedarius functional</option>
-					<option value="Camelus dromedarius non-functional">Camelus dromedarius non-functional</option>
-					<option value="Canis lupus familiaris">Canis lupus familiaris</option>
-					<option value="Canis lupus familiaris functional">Canis lupus familiaris functional</option>
-					<option value="Canis lupus familiaris non-functional">Canis lupus familiaris non-functional</option>
-					<option value="Danio rerio">Danio rerio</option>
-					<option value="Danio rerio functional">Danio rerio functional</option>
-					<option value="Danio rerio non-functional">Danio rerio non-functional</option>
-					<option value="Macaca mulatta">Macaca mulatta</option>
-					<option value="Macaca mulatta functional">Macaca mulatta functional</option>
-					<option value="Macaca mulatta non-functional">Macaca mulatta non-functional</option>
-					<option value="Mus musculus">Mus musculus</option>
-					<option value="Mus musculus functional">Mus musculus functional</option>
-					<option value="Mus musculus non-functional">Mus musculus non-functional</option>
-					<option value="Mus spretus">Mus spretus</option>
-					<option value="Mus spretus functional">Mus spretus functional</option>
-					<option value="Mus spretus non-functional">Mus spretus non-functional</option>
-					<option value="Oncorhynchus mykiss">Oncorhynchus mykiss</option>
-					<option value="Oncorhynchus mykiss functional">Oncorhynchus mykiss functional</option>
-					<option value="Oncorhynchus mykiss non-functional">Oncorhynchus mykiss non-functional</option>
-					<option value="Ornithorhynchus anatinus">Ornithorhynchus anatinus</option>
-					<option value="Ornithorhynchus anatinus functional">Ornithorhynchus anatinus functional</option>
-					<option value="Ornithorhynchus anatinus non-functional">Ornithorhynchus anatinus non-functional</option>
-					<option value="Oryctolagus cuniculus">Oryctolagus cuniculus</option>
-					<option value="Oryctolagus cuniculus functional">Oryctolagus cuniculus functional</option>
-					<option value="Oryctolagus cuniculus non-functional">Oryctolagus cuniculus non-functional</option>
-					<option value="Rattus norvegicus">Rattus norvegicus</option>
-					<option value="Rattus norvegicus functional">Rattus norvegicus functional</option>
-					<option value="Rattus norvegicus non-functional">Rattus norvegicus non-functional</option>
-					<option value="Sus scrofa">Sus scrofa</option>
-					<option value="Sus scrofa functional">Sus scrofa functional</option>
-					<option value="Sus scrofa non-functional">Sus scrofa non-functional</option>
-				</param>
-			
-				<param name="locus" type="select" label="Locus">
-					<option value="TRA">TRA</option>
-					<option value="TRD">TRD</option>
-					<option value="TRG">TRG</option>
-					<option value="TRB">TRB</option>
-					<option value="IGH">IGH</option>
-					<option value="IGI">IGI</option>
-					<option value="IGK">IGK</option>
-					<option value="IGL">IGL</option>
-				</param>
-			</when>
-			<when value="custom">
-				<param name="species" type="hidden" value="custom" size="50" />
-				<param name="vgenes" type="text" label="V Genes, add the custom genes comma seperated, no spaces" size="100" />
-				<param name="dgenes" type="text" label="D Genes" size="100" />
-				<param name="jgenes" type="text" label="J Genes" size="100" />
-			</when>
-		</conditional>
-		
-		<param name="filterproductive" type="select" label="Remove the unproductive sequences from graphs ">
-			<option value="yes">Yes</option>
-			<option value="no">No</option>
-		</param>
-		
-		<param name="clonality_method" type="select" label="Old clonality algorithm or the newer R package">
-			<option value="old">Old</option>
-			<option value="boyd">R Package</option>
-		</param>
-		
-	</inputs>
-	<outputs>
-		<data format="html" name="out_file" />
-	</outputs>
-	<requirements>
-		<requirement type="package" version="3.3">weblogo</requirement>
-		<!--<requirement type="package" version="0.20">circostools</requirement>-->
-	</requirements>
-	<help>		
-**INPUT**
-
-One or more ARGalaxy proprietary format files combined with the ARGalaxy Experimental Design tool
-
-
-.. class:: warningmark
-
-Custom gene ordering based on position on genome: 
-
-**Human**
-
-IGH::
-
-    V:
-    IGHV7-81,IGHV3-74,IGHV3-73,IGHV3-72,IGHV3-71,IGHV2-70,IGHV1-69,IGHV3-66,IGHV3-64,IGHV4-61,IGHV4-59,IGHV1-58,IGHV3-53,IGHV3-52,IGHV5-a,IGHV5-51,IGHV3-49,IGHV3-48,IGHV3-47,IGHV1-46,IGHV1-45,IGHV3-43,IGHV4-39,IGHV3-35,IGHV4-34,IGHV3-33,IGHV4-31,IGHV4-30-4,IGHV4-30-2,IGHV3-30-3,IGHV3-30,IGHV4-28,IGHV2-26,IGHV1-24,IGHV3-23,IGHV3-22,IGHV3-21,IGHV3-20,IGHV3-19,IGHV1-18,IGHV3-15,IGHV3-13,IGHV3-11,IGHV3-9,IGHV1-8,IGHV3-7,IGHV2-5,IGHV7-4-1,IGHV4-4,IGHV4-b,IGHV1-3,IGHV1-2,IGHV6-1
-    D:
-    IGHD1-1,IGHD2-2,IGHD3-3,IGHD6-6,IGHD1-7,IGHD2-8,IGHD3-9,IGHD3-10,IGHD4-11,IGHD5-12,IGHD6-13,IGHD1-14,IGHD2-15,IGHD3-16,IGHD4-17,IGHD5-18,IGHD6-19,IGHD1-20,IGHD2-21,IGHD3-22,IGHD4-23,IGHD5-24,IGHD6-25,IGHD1-26,IGHD7-27
-    J:
-    IGHJ1,IGHJ2,IGHJ3,IGHJ4,IGHJ5,IGHJ6
-
-
-IGK::
-
-    V:
-    IGKV3D-7,IGKV1D-8,IGKV1D-43,IGKV3D-11,IGKV1D-12,IGKV1D-13,IGKV3D-15,IGKV1D-16,IGKV1D-17,IGKV3D-20,IGKV2D-26,IGKV2D-28,IGKV2D-29,IGKV2D-30,IGKV1D-33,IGKV1D-39,IGKV2D-40,IGKV2-40,IGKV1-39,IGKV1-33,IGKV2-30,IGKV2-29,IGKV2-28,IGKV1-27,IGKV2-24,IGKV3-20,IGKV1-17,IGKV1-16,IGKV3-15,IGKV1-13,IGKV1-12,IGKV3-11,IGKV1-9,IGKV1-8,IGKV1-6,IGKV1-5,IGKV5-2,IGKV4-1
-    J:
-    IGKJ1,IGKJ2,IGKJ3,IGKJ4,IGKJ5
-
-
-IGL::
-
-    V:
-    IGLV4-69,IGLV8-61,IGLV4-60,IGLV6-57,IGLV5-52,IGLV1-51,IGLV9-49,IGLV1-47,IGLV7-46,IGLV5-45,IGLV1-44,IGLV7-43,IGLV1-41,IGLV1-40,IGLV5-39,IGLV5-37,IGLV1-36,IGLV3-27,IGLV3-25,IGLV2-23,IGLV3-22,IGLV3-21,IGLV3-19,IGLV2-18,IGLV3-16,IGLV2-14,IGLV3-12,IGLV2-11,IGLV3-10,IGLV3-9,IGLV2-8,IGLV4-3,IGLV3-1
-    J:
-    IGLJ1,IGLJ2,IGLJ3,IGLJ6,IGLJ7
-
-
-TRB::
-
-    V:
-    TRBV2,TRBV3-1,TRBV4-1,TRBV5-1,TRBV6-1,TRBV4-2,TRBV6-2,TRBV4-3,TRBV6-3,TRBV7-2,TRBV6-4,TRBV7-3,TRBV9,TRBV10-1,TRBV11-1,TRBV10-2,TRBV11-2,TRBV6-5,TRBV7-4,TRBV5-4,TRBV6-6,TRBV5-5,TRBV7-6,TRBV5-6,TRBV6-8,TRBV7-7,TRBV6-9,TRBV7-8,TRBV5-8,TRBV7-9,TRBV13,TRBV10-3,TRBV11-3,TRBV12-3,TRBV12-4,TRBV12-5,TRBV14,TRBV15,TRBV16,TRBV18,TRBV19,TRBV20-1,TRBV24-1,TRBV25-1,TRBV27,TRBV28,TRBV29-1,TRBV30
-    D:
-    TRBD1,TRBD2
-    J:
-    TRBJ1-1,TRBJ1-2,TRBJ1-3,TRBJ1-4,TRBJ1-5,TRBJ1-6,TRBJ2-1,TRBJ2-2,TRBJ2-3,TRBJ2-4,TRBJ2-5,TRBJ2-6,TRBJ2-7
-
-
-TRA::
-
-    V:
-    TRAV1-1,TRAV1-2,TRAV2,TRAV3,TRAV4,TRAV5,TRAV6,TRAV7,TRAV8-1,TRAV9-1,TRAV10,TRAV12-1,TRAV8-2,TRAV8-3,TRAV13-1,TRAV12-2,TRAV8-4,TRAV13-2,TRAV14/DV4,TRAV9-2,TRAV12-3,TRAV8-6,TRAV16,TRAV17,TRAV18,TRAV19,TRAV20,TRAV21,TRAV22,TRAV23/DV6,TRAV24,TRAV25,TRAV26-1,TRAV27,TRAV29/DV5,TRAV30,TRAV26-2,TRAV34,TRAV35,TRAV36/DV7,TRAV38-1,TRAV38-2/DV8,TRAV39,TRAV40,TRAV41
-    J:
-    TRAJ57,TRAJ56,TRAJ54,TRAJ53,TRAJ52,TRAJ50,TRAJ49,TRAJ48,TRAJ47,TRAJ46,TRAJ45,TRAJ44,TRAJ43,TRAJ42,TRAJ41,TRAJ40,TRAJ39,TRAJ38,TRAJ37,TRAJ36,TRAJ34,TRAJ33,TRAJ32,TRAJ31,TRAJ30,TRAJ29,TRAJ28,TRAJ27,TRAJ26,TRAJ24,TRAJ23,TRAJ22,TRAJ21,TRAJ20,TRAJ18,TRAJ17,TRAJ16,TRAJ15,TRAJ14,TRAJ13,TRAJ12,TRAJ11,TRAJ10,TRAJ9,TRAJ8,TRAJ7,TRAJ6,TRAJ5,TRAJ4,TRAJ3
-
-
-TRG::
-
-    V:
-    TRGV9,TRGV8,TRGV5,TRGV4,TRGV3,TRGV2
-    J:
-    TRGJ2,TRGJP2,TRGJ1,TRGJP1
-
-
-TRD::
-
-    V:
-    TRDV1,TRDV2,TRDV3
-    D:
-    TRDD1,TRDD2,TRDD3
-    J:
-    TRDJ1,TRDJ4,TRDJ2,TRDJ3
-
-
-**Mouse**
-
-TRB::
-
-    V:
-    TRBV1,TRBV2,TRBV3,TRBV4,TRBV5,TRBV12-1,TRBV13-1,TRBV12-2,TRBV13-2,TRBV13-3,TRBV14,TRBV15,TRBV16,TRBV17,TRBV19,TRBV20,TRBV23,TRBV24,TRBV26,TRBV29,TRBV30,TRBV31
-    D:
-    TRBD1,TRBD2
-    J:
-    TRBJ1-1,TRBJ1-2,TRBJ1-3,TRBJ1-4,TRBJ1-5,TRBJ2-1,TRBJ2-2,TRBJ2-3,TRBJ2-4,TRBJ2-5,TRBJ2-6,TRBJ2-7
-    
-
-**OUTPUT**
-
-It generates the following result:
-	</help>
-</tool>