Hello,

I try to read BAM files - so far without success. And I dont know why.

My Bamfile is wgEncodeOpenChromDnase8988tAlnRep1.bam
(downloaded from the Encode site)

For example:

library (ShortRead)
> which <- RangesList(seq1=IRanges(1000,2000),
+ seq2=IRanges(c(100,1000), c(1000,2000)))
> what <- c("rname", "strand", "pos", "qwidth","seq")
> param <- ScanBamParam(which=which, what=what)
> bam <- scanBam ("~/Bam/wgEncodeOpenChromDnase8988tAlnRep1.bam",
param=param)
[bam_index_load] fail to load BAM index.
Fehler in open.BamFile(BamFile(file, index), "rb") :
  failed to load BAM index
  file: /home/hnorpois/Bam/wgEncodeOpenChromDnase8988tAlnRep1.bam


The mentioned syntax I copied from an introduction to Rsamtools.
Actually I would like to know a simple syntax that enables me to read
BAM-files. Can anybody give me a hint.

Thanks Hermann

	[[alternative HTML version deleted]]

