[BioC] DEXSeq Issue
Michael Love
michaelisaiahlove at gmail.com
Tue May 28 22:52:44 CEST 2013
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
More information about the Bioconductor
mailing list