changeset 31:fe44a905aee9 draft

Uploaded
author davidvanzessen
date Tue, 13 Dec 2016 10:06:49 -0500
parents 33a7c49d48a7
children 4c5ba6b5d10d
files new_imgt.r sequence_overview.r shm_csr.xml wrapper.sh
diffstat 4 files changed, 14 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/new_imgt.r	Mon Dec 12 05:19:58 2016 -0500
+++ b/new_imgt.r	Tue Dec 13 10:06:49 2016 -0500
@@ -4,7 +4,7 @@
 merged.file = args[2]
 gene = args[3]
 
-merged = read.table(merged.file, header=T, sep="\t", fill=T, stringsAsFactors=F)
+merged = read.table(merged.file, header=T, sep="\t", fill=T, stringsAsFactors=F, comment.char="")
 
 if(gene != "-"){
 	merged = merged[grepl(paste("^", gene, sep=""), merged$best_match),]
@@ -17,7 +17,7 @@
 for(f in list.files(imgt.dir, pattern="*.txt$")){
 	#print(paste("filtering", f))
 	path = paste(imgt.dir, f, sep="")
-	dat = read.table(path, header=T, sep="\t", fill=T, quote="", stringsAsFactors=F, check.names=FALSE)
+	dat = read.table(path, header=T, sep="\t", fill=T, quote="", stringsAsFactors=F, check.names=FALSE, comment.char="")
 	
 	dat = dat[dat[,"Sequence ID"] %in% merged$Sequence.ID,]
 	
--- a/sequence_overview.r	Mon Dec 12 05:19:58 2016 -0500
+++ b/sequence_overview.r	Tue Dec 13 10:06:49 2016 -0500
@@ -22,13 +22,13 @@
 #before.unique = before.unique[!grepl("unmatched", before.unique$best_match),]
 
 if(empty.region.filter == "leader"){
-	before.unique$seq_conc = paste(before.unique$FR1.IMGT.seq, before.unique$CDR1.IMGT.seq, before.unique$FR2.IMGT.seq, before.unique$CDR2.IMGT.seq, before.unique$FR3.IMGT.seq)
+	before.unique$seq_conc = paste(before.unique$FR1.IMGT.seq, before.unique$CDR1.IMGT.seq, before.unique$FR2.IMGT.seq, before.unique$CDR2.IMGT.seq, before.unique$FR3.IMGT.seq, before.unique$CDR3.IMGT.seq)
 } else if(empty.region.filter == "FR1"){
-	before.unique$seq_conc = paste(before.unique$CDR1.IMGT.seq, before.unique$FR2.IMGT.seq, before.unique$CDR2.IMGT.seq, before.unique$FR3.IMGT.seq)
+	before.unique$seq_conc = paste(before.unique$CDR1.IMGT.seq, before.unique$FR2.IMGT.seq, before.unique$CDR2.IMGT.seq, before.unique$FR3.IMGT.seq, before.unique$CDR3.IMGT.seq)
 } else if(empty.region.filter == "CDR1"){
-	before.unique$seq_conc = paste(before.unique$FR2.IMGT.seq, before.unique$CDR2.IMGT.seq, before.unique$FR3.IMGT.seq)
+	before.unique$seq_conc = paste(before.unique$FR2.IMGT.seq, before.unique$CDR2.IMGT.seq, before.unique$FR3.IMGT.seq, before.unique$CDR3.IMGT.seq)
 } else if(empty.region.filter == "FR2"){
-	before.unique$seq_conc = paste(before.unique$CDR2.IMGT.seq, before.unique$FR3.IMGT.seq)
+	before.unique$seq_conc = paste(before.unique$CDR2.IMGT.seq, before.unique$FR3.IMGT.seq, before.unique$CDR3.IMGT.seq)
 }
 
 IDs = before.unique[,c("Sequence.ID", "seq_conc", "best_match", "Functionality")]
--- a/shm_csr.xml	Mon Dec 12 05:19:58 2016 -0500
+++ b/shm_csr.xml	Tue Dec 13 10:06:49 2016 -0500
@@ -55,23 +55,23 @@
 	</inputs>
 	<outputs>
 		<data format="html" name="out_file" label = "SHM &amp; CSR on ${in_file.name}"/>
-		<data format="imgt_archive" name="naive_output_ca" label = "Naive CA input data from ${in_file.name}" >
+		<data format="imgt_archive" name="naive_output_ca" label = "Filtered IMGT IGA: ${in_file.name}" >
 		    <filter>naive_output_cond['naive_output'] == "yes"</filter>
 		    <filter>class_filter_cond['class_filter'] != "101_101"</filter>
 		</data>
-		<data format="imgt_archive" name="naive_output_cg" label = "Naive CG input data from ${in_file.name}" >
+		<data format="imgt_archive" name="naive_output_cg" label = "Filtered IMGT IGG: ${in_file.name}" >
 		    <filter>naive_output_cond['naive_output'] == "yes"</filter>
 		    <filter>class_filter_cond['class_filter'] != "101_101"</filter>
 		</data>
-		<data format="imgt_archive" name="naive_output_cm" label = "Naive CM input data from ${in_file.name}" >
+		<data format="imgt_archive" name="naive_output_cm" label = "Filtered IMGT IGM: ${in_file.name}" >
 		    <filter>naive_output_cond['naive_output'] == "yes"</filter>
 		    <filter>class_filter_cond['class_filter'] != "101_101"</filter>
 		</data>
-		<data format="imgt_archive" name="naive_output_ce" label = "Naive CE input data from ${in_file.name}" >
+		<data format="imgt_archive" name="naive_output_ce" label = "Filtered IMGT IGE: ${in_file.name}" >
 		    <filter>naive_output_cond['naive_output'] == "yes"</filter>
 		    <filter>class_filter_cond['class_filter'] != "101_101"</filter>
 		</data>
-		<data format="imgt_archive" name="naive_output_all" label = "Naive input data from ${in_file.name}" >
+		<data format="imgt_archive" name="naive_output_all" label = "Filtered IMGT all: ${in_file.name}" >
 		    <filter>naive_output_cond['naive_output'] == "yes"</filter>
 		    <filter>class_filter_cond['class_filter'] == "101_101"</filter>
 		</data>
--- a/wrapper.sh	Mon Dec 12 05:19:58 2016 -0500
+++ b/wrapper.sh	Tue Dec 13 10:06:49 2016 -0500
@@ -546,7 +546,7 @@
 	echo "</div>" >> $output
 
 	echo "<div class='tabbertab' title='Overlap'>" >> $output
-	cat "$outdir/sequence_overview/index.html" >> $output
+	cat "$outdir/sequence_overview/index.html" | sed "s%href='\(.*\).html%href='sequence_overview/\1.html%g" >> $output # rewrite href to 'sequence_overview/..."
 	echo "</div>" >> $output
 
 
@@ -609,6 +609,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 PDF</td><td><a href='baseline_IGE.pdf' download='baseline_IGE.pdf' >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
@@ -639,7 +640,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 "<tr><td>An IMGT archive with just the matched and filtered IGE sequences</td><td><a href='new_IMGT_IGE.txz' download='new_IMGT_IGE.txz' >Download</a></td></tr>" >> $output
 
 echo "</table>" >> $output