Skip to content

Commit 01f4ff8

Browse files
committed
correct order of extracted barcode to match devel_pre_v4
1 parent 93b2e7d commit 01f4ff8

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

R/prepareDataFromBam.R

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,6 @@ prepareDataFromBam <- function(bamFile, yieldSize = NULL, verbose = FALSE,
6868
mcols(readGrgList[[counter]])$UMI <- readMap[,3][match(names(readGrgList[[counter]]),readMap[,1])]
6969
}
7070
}
71-
cells <- unique(c(cells, mcols(readGrgList[[counter]])$CB))
72-
mcols(readGrgList[[counter]])$CB <- factor(mcols(readGrgList[[counter]])$CB, levels = cells)
73-
umi <- unique(c(umi, mcols(readGrgList[[counter]])$UMI))
74-
mcols(readGrgList[[counter]])$UMI <- factor(mcols(readGrgList[[counter]])$UMI, levels = umi)
7571
}
7672
if(cleanReads){
7773
softClip5Prime <- clipFunction(cigarData = GenomicAlignments::cigar(alignmentInfo), grep_pattern = '^(\\d*)[S].*', replace_pattern = '\\1')
@@ -103,7 +99,7 @@ prepareDataFromBam <- function(bamFile, yieldSize = NULL, verbose = FALSE,
10399
}
104100

105101
if (demultiplexed){
106-
mcols(readGrgList)$CB <- as.factor(mcols(readGrgList)$CB)
102+
mcols(readGrgList)$CB <- factor(mcols(readGrgList)$CB, levels = sort(unique(mcols(readGrgList)$CB)))
107103
}
108104

109105
# remove microexons of width 1bp from list

0 commit comments

Comments
 (0)