Mercurial > repos > davidvanzessen > argalaxy_tools
comparison report_clonality/RScript.r @ 13:b45a74248628 draft
Uploaded
| author | davidvanzessen |
|---|---|
| date | Fri, 07 Aug 2015 05:52:21 -0400 |
| parents | 010402c959aa |
| children | cf1def1aaa74 |
comparison
equal
deleted
inserted
replaced
| 12:010402c959aa | 13:b45a74248628 |
|---|---|
| 111 un = paste(un, sep="\n") | 111 un = paste(un, sep="\n") |
| 112 writeLines(un, sampleFile) | 112 writeLines(un, sampleFile) |
| 113 close(sampleFile) | 113 close(sampleFile) |
| 114 | 114 |
| 115 # ---------------------- Counting the productive/unproductive and unique sequences ---------------------- | 115 # ---------------------- Counting the productive/unproductive and unique sequences ---------------------- |
| 116 | |
| 117 if(!("Functionality" %in% inputdata)){ #add a functionality column to the igblast data | |
| 118 inputdata$Functionality = "unproductive" | |
| 119 search = (inputdata$VDJ.Frame != "In-frame with stop codon" & inputdata$VDJ.Frame != "Out-of-frame" & inputdata$CDR3.Found.How != "NOT_FOUND") | |
| 120 if(sum(search) > 0){ | |
| 121 inputdata[search,]$Functionality = "productive" | |
| 122 } | |
| 123 } | |
| 116 | 124 |
| 117 inputdata.dt = data.table(inputdata) #for speed | 125 inputdata.dt = data.table(inputdata) #for speed |
| 118 | 126 |
| 119 if(clonaltype == "none"){ | 127 if(clonaltype == "none"){ |
| 120 ct = c("clonaltype") | 128 ct = c("clonaltype") |
