Skip to content

Commit

Permalink
Merge pull request #41 from imminfo/develop
Browse files Browse the repository at this point in the history
add fix for parse.mixcr for the new MiXCR format (all.x.alignment -> …
  • Loading branch information
Vadim Nazarov committed Nov 3, 2015
2 parents b568328 + e3c66d5 commit c6a0e80
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/input.R
Original file line number Diff line number Diff line change
Expand Up @@ -641,9 +641,9 @@ parse.mixcr <- function (.filename) {
.reads <- 'clone.count'
.barcodes <- 'clone.count'
.sep = '\t'
.vend <- "all.v.alignment"
.jstart <- "all.j.alignment"
.dalignments <- "all.d.alignment"
.vend <- "all.v.alignments"
.jstart <- "all.j.alignments"
.dalignments <- "all.d.alignments"
.vd.insertions <- "VD.insertions"
.dj.insertions <- "DJ.insertions"
.total.insertions <- "Total.insertions"
Expand Down Expand Up @@ -741,7 +741,7 @@ parse.mixcr <- function (.filename) {
.total.insertions <- "Total.insertions"
if (recomb_type == "VJ") {
df$Total.insertions <-
sapply(strsplit(df[[.jstart]], "|", T, F, T), "[[", 4) - sapply(strsplit(df[[.vend]], "|", T, F, T), "[[", 5) - 1
as.numeric(sapply(strsplit(df[[.jstart]], "|", T, F, T), "[[", 4)) - as.numeric(sapply(strsplit(df[[.vend]], "|", T, F, T), "[[", 5)) - 1
} else if (recomb_type == "VDJ") {
df$Total.insertions <- df[[.vd.insertions]] + df[[.dj.insertions]]
} else {
Expand Down

0 comments on commit c6a0e80

Please sign in to comment.