From e3c66d51a2d8ce4c05038c2d08f5d88630a85ec1 Mon Sep 17 00:00:00 2001 From: Vadim Nazarov Date: Tue, 3 Nov 2015 19:32:02 +0300 Subject: [PATCH] add fix for parse.mixcr for the new MiXCR format (all.x.alignment -> all.x.alignmentS) --- R/input.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/R/input.R b/R/input.R index c70da62..44a10f2 100644 --- a/R/input.R +++ b/R/input.R @@ -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" @@ -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 {