Question: Rsamtools usage with URL
1
gravatar for Friederike
22 months ago by
Friederike5.3k
United States
Friederike5.3k wrote:

Can anyone tell me the correct syntax for loading parts of a BAM file into R using a URL?

Since something like read.table(file = url("http://my.url.com/a-table.csv")) works fine, I hoped that it would be similarly straight-forward with Rsamtools, but this: scanBam(file = url("http://my.url.com/a-bam-file.bam")) only resulted in an error message:

(Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘scanBam’ for signature ‘"url"’ ).

Any pointers?

PS: an example BAM file URL could be this: http://chagall.med.cornell.edu/RNASEQcourse/WT_1_Aligned.sortedByCoord.out.bam

alignment rsamtools bam R • 521 views
ADD COMMENTlink modified 22 months ago by zx87549.0k • written 22 months ago by Friederike5.3k

From a quick look at manuals read.table accepts a filename, stdin, or url, but scanBam only accepts filename.

ADD REPLYlink written 22 months ago by zx87549.0k

do you know about alternative solutions?

ADD REPLYlink written 22 months ago by Friederike5.3k

Maybe download first, then read?

ADD REPLYlink written 22 months ago by zx87549.0k

well, that's exactly what I want to avoid :)

ADD REPLYlink written 22 months ago by Friederike5.3k

Sorry, that's what I thought, too. Maybe submit an issue at GitHub? Or ask at https://support.bioconductor.org/

ADD REPLYlink written 22 months ago by zx87549.0k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 950 users visited in the last hour