Question: scanBam error in bioconductor
0
gravatar for miraamir15
3.4 years ago by
miraamir150
miraamir150 wrote:

Can someone please help me with the following error in scanBam

my code is as follows:

"chr.param<-ScanBamParam(which=aaeg.gr[1:4757],flag=my.flag,what=c("qname","rname","strand","pos","qwidth"))

bam01 <- scanBam(bam.files[1],param=chr.param)"

I am working with aedes aegypti and it has about 4757 contigs. When I run the code in R, I get this error:

"Error in value[3L] : 'scanBam' failed: record: 0 error: 0 file: bamfiles/Aae01.bam index: bamfiles/Aae01.bam In addition: Warning message: In doTryCatch(return(expr), name, parentenv, handler) : space 'supercont1.4754' not in BAM header "

Now I know the problem is that my bam file does not have all the contigs that the aaeg.gr does. I could manually go through and exclude the contigs that are not in the bam file, however that would take forever. Does anyone have a better way of doing this?

rsamtools rna-seq bam • 988 views
ADD COMMENTlink written 3.4 years ago by miraamir150
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1958 users visited in the last hour