changeset 36:d592dab2fca1 draft

Uploaded
author davidvanzessen
date Mon, 31 Aug 2015 09:28:38 -0400
parents 32d8a5abed4c
children 623bbe972363
files RScript.r wrapper.sh
diffstat 2 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/RScript.r	Wed Aug 26 05:51:20 2015 -0400
+++ b/RScript.r	Mon Aug 31 09:28:38 2015 -0400
@@ -156,8 +156,11 @@
     patient1.fuzzy = patient1[!(patient1$merge %in% merge.list),]
     patient2.fuzzy = patient2[!(patient2$merge %in% merge.list),]
     
-    patient1.fuzzy$merge = paste(patient1.fuzzy$V_Segment_Major_Gene, patient1.fuzzy$J_Segment_Major_Gene, patient1.fuzzy$CDR3_Sense_Sequence)
-    patient2.fuzzy$merge = paste(patient2.fuzzy$V_Segment_Major_Gene, patient2.fuzzy$J_Segment_Major_Gene, patient2.fuzzy$CDR3_Sense_Sequence)
+    #patient1.fuzzy$merge = paste(patient1.fuzzy$V_Segment_Major_Gene, patient1.fuzzy$J_Segment_Major_Gene, patient1.fuzzy$CDR3_Sense_Sequence)
+    #patient2.fuzzy$merge = paste(patient2.fuzzy$V_Segment_Major_Gene, patient2.fuzzy$J_Segment_Major_Gene, patient2.fuzzy$CDR3_Sense_Sequence)
+    
+    patient1.fuzzy$merge = paste(patient1.fuzzy$locus_V, patient1.fuzzy$locus_J, patient1.fuzzy$CDR3_Sense_Sequence)
+    patient2.fuzzy$merge = paste(patient2.fuzzy$locus_V, patient2.fuzzy$locus_J, patient2.fuzzy$CDR3_Sense_Sequence)
     
     merge.freq.table = data.frame(table(c(patient1.fuzzy$merge, patient2.fuzzy$merge)))
     merge.freq.table.gt.1 = merge.freq.table[merge.freq.table$Freq > 1,]
@@ -171,7 +174,7 @@
       current.merge.in.2 = patient2.fuzzy[patient2.fuzzy$merge == current.merge.1,]
      
       #agrep/adist the two samples
-      agrep.match = agrep(current.clone.seq.1, current.merge.in.2$Clone_Sequence, max.distance = 1, costs=list(insertions=0.1, deletions=0.1, substitutions=1))
+      agrep.match = agrep(current.clone.seq.1, current.merge.in.2$Clone_Sequence, max.distance = 9, costs=list(insertions=1, deletions=1, substitutions=10))
       
 
       if(length(agrep.match) == 1){
@@ -233,7 +236,7 @@
         
       } else if (length(agrep.match) > 1){
         #multiple matches, whatdo?
-        cat(paste("<tr><td>", "Multiple matches found for ", current.merge.1, " in ", patient, "</td></tr>", sep=""), file=logfile, append=T)
+        cat(paste("<tr><td>", "Multiple matches found for ", current.merge.1, ", ", current.clone.seq.1, " in ", patient, ", ", oneSample, "</td></tr>", sep=""), file=logfile, append=T)
       }
       patient1.fuzzy = patient1.fuzzy[-1,]
     }
--- a/wrapper.sh	Wed Aug 26 05:51:20 2015 -0400
+++ b/wrapper.sh	Mon Aug 31 09:28:38 2015 -0400
@@ -16,6 +16,7 @@
 cp $dir/script.js $outputDir
 cp $dir/style.css $outputDir
 cp $dir/tabber.js $outputDir
+mv "$outputFile" "$outputDir/log.html"
 
 echo "<html><center><h1><a href='index.html'>Click here for the results</a></h1>Tip: Open it in a new tab (middle mouse button or right mouse button -> 'open in new tab' on the link above)</center></html>" > $outputFile