Entering edit mode
margherita mutarelli
▴
10
@margherita-mutarelli-5063
Last seen 10.1 years ago
Dear all,
I have searched Rsamtools help pages and the mailing lists archives,
but I
couldn't find an answer to my question: is there any function to write
a
BAM file from within R?
I use the scanBam function to read in R an input file and, after some
merging and filtering within R, I would like to write the output a BAM
file.
Have you any suggestion? My first option at the moment is to create a
SAM
text file by writing the fields in the corresponding order and then
use
samtools to convert the SAM in BAM, but maybe there is a better
solution
that I have missed.
Thank you all in advance.
Best,
Margherita
[[alternative HTML version deleted]]