[BioC] DEXSeq Issue
Alejandro Reyes
alejandro.reyes at embl.de
Wed May 29 09:18:25 CEST 2013
Hi Margaret,
The error says that the header of your bam files is missing. Do you have
any output if you do:
samtools view -H yourbamfile.bam
?
Alejandro
> Hi Michael,
>
> I tried the code but got the exact same errors as before.
>
> Thanks,
> Margaret Linan
>
>
> On Tue, May 28, 2013 at 1:52 PM, Michael Love
> <michaelisaiahlove at gmail.com>wrote:
>
>> hi Margaret,
>>
>> On Tue, May 28, 2013 at 10:26 PM, Margaret Linan <mlinan at asu.edu> wrote:
>>> However I ran into a problem with my file.bam see below:
>>>
>>>> library("DEXSeq")
>>>> exonicParts <- prepareAnnotationForDEXSeq(hse, aggregateGenes=TRUE)
>>>> bamDir<-file.path("C:/Users/mlinan/Desktop")
>>>> fls <- list.files(bamDir, pattern="bam$", full=TRUE)
>>>> library("Rsamtools")
>>> Loading required package: Biostrings
>>>
>>>> bamlst <- BamFileList(fls)
>>>> library("DEXSeq")
>>>> SE <- countReadsForDEXSeq(exonicParts, bamlst)
>>> Error in value[[3L]](cond) :
>>> failed to open BamFile: SAM/BAM header missing or empty
>>> file: 'C:/Users/mlinan/Desktop/file.bam'
>>> In addition: Warning messages:
>>> 1: In doTryCatch(return(expr), name, parentenv, handler) :
>>> [bam_header_read] EOF marker is absent. The input is probably
>> truncated.
>>> 2: In doTryCatch(return(expr), name, parentenv, handler) :
>>> [bam_header_read] invalid BAM binary header (this is not a BAM file).
>>>> SE
>>> Error: object 'SE' not found
>>>
>>>
>> Maybe we can troubleshoot with a simpler use of the Rsamtools package,
>> which is used by countReadsForDEXSeq().
>>
>> Could you try this code:
>>
>> file <- "C:/Users/mlinan/Desktop/file.bam"
>> library(Rsamtools)
>> which <- GRanges("chr1",IRanges(10e6,width=1000)) # assuming you are
>> using 'chr' style coordinates
>> what <- c("rname", "strand", "pos", "qwidth", "seq")
>> param <- ScanBamParam(which=which, what=what)
>> bam <- scanBam(file, param=param)
>> str(bam)
>>
>> best,
>>
>> Mike
>>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
More information about the Bioconductor
mailing list