Read Bam file using rbamtools::bamReader()
1
0
Entering edit mode
@emadelhewihy-14919
Last seen 6.9 years ago

the code :

bamf <- system.file("file.bam",package="rbamtools",idx=FALSE,verbose=0)
r1 <- bamReader(bamf)

the error:

Error in .local(.Object, ...) : [bam_reader_open] Opening bam_file "" failed! ```
rbamtools • 900 views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 5 months ago
United States

It's not clear where your command is coming from; system.file() does not have arguments 'idx' or FALSE. Also, the return value of the function is

> system.file("file.bam",package="rbamtools",idx=FALSE,verbose=0)
[1] ""

so you are asking bamReader() to open a file called ""! bamReader() expects a path to a BAM file, for instance. Maybe if you used

bamf = file.choose()

to select one of your BAM fiiles, and then

rl = bamReader(bamf)

you would have more success?

ADD COMMENT
0
Entering edit mode

it work successfully, thanks  

ADD REPLY

Login before adding your answer.

Traffic: 533 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