Rsamtools usage with URL
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
• 2,191 views
•
link
0 answers
No answers yet.
Log in to answer this question.
From a quick look at manuals
read.tableaccepts a filename, stdin, or url, butscanBamonly accepts filename.do you know about alternative solutions?
Maybe download first, then read?
well, that's exactly what I want to avoid :)
Sorry, that's what I thought, too. Maybe submit an issue at GitHub? Or ask at https://support.bioconductor.org/