I use cn.mops to call CNV in tumor-only samples, My data is Targeted DNA sequencing data.
I have prepared sorted bam file, bam index file and target region bed file. My bed file contains four columns(chromosome,start,end and name).
Command lines are as follows:
>BAMFiles <- list.files(pattern=".bam$")
>segments <- read.table("targetRegions.bed",sep="\t",as.is=TRUE)
>gr <- GRanges(segments[,1],IRanges(segments[,2],segments[,3]))
> X <- getSegmentReadCountsFromBAM(BAMFiles,GR=gr,mode="unpaired",)
and ran into this error infomation:
Error in value[[3L]](cond) : 'countBam' failed:
In addition: Warning message:
In doTryCatch(return(expr), name, parentenv, handler) :
space 'chr21' not in BAM header
what is the reason, is it because I don't have a chromosome ref seq alignment information or something else?
Thank you for your time.