I'm trying to load a BAM file into R for further analysis with NucleR. Following the recommendations from the NucleR package documentation, I tried using the 'readAligned' function from package 'ShortRead' to read my BAM file. Only problem is, this function does not seem to be capable of reading BAM files.
If I try:
aln <- readAligned(".", "mini.bam", type="BAM")
I end up with this error:
arugment 'type' had value 'BAM' allowable values: 'SolexaExport'
'SolexaAlign' 'SolexaPrealign' 'SolexaRealign' 'SolexaResult'
'MAQMap' 'MAQMapShort' 'MAQMapview' 'Bowtie' 'SOAP'
What surprises me, is that I see many example online of people using type="BAM" with this function. Including people positing about some other problems on this site (see for example: https://support.bioconductor.org/p/40789/)
It's almost as if I was using an old version of the function or something like that. However, I'm using version 1.36 of the 'ShortRead' package, which seems to be the most recent one (R version is 3.4.3, I'm on a Linux station). What I don't understand is that there is no mention of a "BAM" option in the documentation for ShortRead 1.36. So, what is this function that other people use with the type="BAM" option? I'm completely lost...
Note that I have the same problem with ShortRead v 1.32.1 and R 3.3.1
Thanks for your help!