changeset 85:07f7da724a77 draft

Uploaded
author davidvanzessen
date Thu, 26 May 2016 08:18:13 -0400
parents 041f94f50b34
children 0011a0597685
files merge_and_filter.r mutation_analysis.py wrapper.sh
diffstat 2 files changed, 6 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/mutation_analysis.py	Tue May 24 03:59:44 2016 -0400
+++ b/mutation_analysis.py	Thu May 26 08:18:13 2016 -0400
@@ -49,8 +49,8 @@
 			fr2Index = linesplt.index("FR2.IMGT")
 			cdr2Index = linesplt.index("CDR2.IMGT")
 			fr3Index = linesplt.index("FR3.IMGT")
-			cdr1LengthIndex = linesplt.index("CDR1.IMGT.Nb.of.nucleotides")
-			cdr2LengthIndex = linesplt.index("CDR2.IMGT.Nb.of.nucleotides")
+			cdr1LengthIndex = linesplt.index("CDR1.IMGT.length")
+			cdr2LengthIndex = linesplt.index("CDR2.IMGT.length")
 			first = False
 			continue
 		linecount += 1
@@ -73,9 +73,9 @@
 		cdr1Length = linesplt[cdr1LengthIndex]
 		cdr2Length = linesplt[cdr2LengthIndex]
 
-		cdr1LengthDic[ID] = int(cdr1Length) / 3
-		cdr2LengthDic[ID] = int(cdr2Length) / 3
-
+		cdr1LengthDic[ID] = int(cdr1Length) if cdr1Length != "X" else 0
+		cdr2LengthDic[ID] = int(cdr2Length) if cdr2Length != "X" else 0
+		
 		IDlist += [ID]
 
 AALength = (int(max(mutationList, key=lambda i: int(i[4]) if i[4] else 0)[4]) + 1)  # [4] is the position of the AA mutation, None if silent
--- a/wrapper.sh	Tue May 24 03:59:44 2016 -0400
+++ b/wrapper.sh	Thu May 26 08:18:13 2016 -0400
@@ -90,10 +90,6 @@
 echo "R mutation analysis"
 Rscript $dir/mutation_analysis.r $outdir/merged.txt $classes $outdir ${include_fr1} 2>&1
 
-#echo "." > $output
-#exit 0
-
-
 
 echo "---------------- mutation_analysis.py ----------------"
 echo "---------------- mutation_analysis.py ----------------<br />" >> $output
@@ -119,7 +115,7 @@
 
 while read ID class seq A C G T
 do
-	echo "<tr><td>$ID</td><td>$class</td><td>$A</td><td>$C</td><td>$G</td><td>$T</td></tr>" >> $outdir/base_overview.html
+	echo "<tr><td>$ID</td><td>$seq</td><td>$class</td><td>$A</td><td>$C</td><td>$G</td><td>$T</td></tr>" >> $outdir/base_overview.html
 done < $outdir/sequence_overview/ntoverview.txt