Skip to content

Commit

Permalink
#286 remove "NA" string
Browse files Browse the repository at this point in the history
"NA" string broke chain sorting, fixed now by removing in c1
  • Loading branch information
ncborcherding committed Dec 13, 2023
1 parent 30529b7 commit 80d3ce9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion R/clonalLength.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,12 @@ clonalLength <- function(input.data,
#Identifying and assigning chains
chain.pos <- which(colnames(input.data[[1]]) == "cdr3_aa1")-1
c1 <- na.omit(unique(substr(input.data[[1]][seq_len(10),chain.pos], 1,3)))
c1 <- c1[c1 != "NA."]
if(any(grepl("NA.", c1))) {
c1 <- c1[c1 != "NA."]
}
if(any(grepl("NA", c1))) {
c1 <- c1[c1 != "NA"]
}
c2 <- switch(c1,
"TRA" = "TRB",
"IGH" = "IGL",
Expand Down

0 comments on commit 80d3ce9

Please sign in to comment.