Skip to content

Commit 7a01490

Browse files
committed
Modify the regex for chromosome names check. Now it only matches
"chr" at the beginning of the chromosome names.
1 parent 40da62d commit 7a01490

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/coverage.r

+1-1
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ chrTag <- function(sn.inbam) {
546546
# Args:
547547
# sn.inbam: seqnames in the bam file.
548548

549-
n.chr <- length(grep('chr', sn.inbam))
549+
n.chr <- length(grep('^chr', sn.inbam))
550550
if(n.chr == 0) {
551551
chr.tag <- F
552552
} else if(n.chr == length(sn.inbam)) {

0 commit comments

Comments
 (0)