scanBam error in bioconductor
0
0
Entering edit mode
7.8 years ago
miraamir15 • 0

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?

bam RNA-Seq RSamtools rsamtools • 1.7k views
ADD COMMENT

Login before adding your answer.

Traffic: 2892 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6