I'd like to use Rsamtools, I think it would be very ideal for generating coverage plots.
However, when I try to use the scaBam function to process a bam file, using the following code
> bam <- scanBam(C_Term_Flag_1)
I always get this error
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘scanBam’ for signature ‘"spec_tbl_df"’
I cannot find any useful solutions on the web
Has anyone else encountered this issue ?
see session info below
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)
Matrix products: default
locale:
[1] LC_COLLATE=English_Ireland.1252 LC_CTYPE=English_Ireland.1252
[3] LC_MONETARY=English_Ireland.1252 LC_NUMERIC=C
[5] LC_TIME=English_Ireland.1252
attached base packages:
[1] stats4 parallel stats graphics grDevices utils datasets
[8] methods base
other attached packages:
[1] Rsamtools_2.0.3 Biostrings_2.52.0 XVector_0.24.0
[4] GenomicRanges_1.36.0 GenomeInfoDb_1.20.0 IRanges_2.18.1
[7] S4Vectors_0.22.0 BiocGenerics_0.30.0
loaded via a namespace (and not attached):
[1] zlibbioc_1.30.0 compiler_3.6.1 tools_3.6.1
[4] GenomeInfoDbData_1.2.1 RCurl_1.95-4.12 BiocParallel_1.17.18
[7] bitops_1.0-6
Thanks for your reply, it was very useful. I changed the object in question to a character(1) path to the file that I wanted to read, it worked perfectly. Previous to this the object was an imported dataset. Thanks again.