[BioC] export a GappedAlignment object to a BAM file
Martin Morgan
mtmorgan at fhcrc.org
Tue May 8 16:52:46 CEST 2012
On 05/08/2012 07:07 AM, Yue Li wrote:
> Hi Michael,
>
> Sure. I am working on it and will let you know once it is ready. Basically, we need a function (e.g. exportGappedAlignments) or an inheritance method something like export.GappedAlignments to export the objects of that class, right?
GappedAlignments doesn't really contain enough information for an
informative BAM file, e.g., reads, qualities, alignment scores, ... Also
presumably header information in the original BAM would need to be
carried forward... Not that I have anything better to offer (other than
filterBam for simple filtering of reads).
Martin
> Thanks,
> Yue
>
> On 2012-05-08, at 9:37 AM, Michael Lawrence wrote:
>
>> Good point. We should add GappedAlignments export to BAM into rtracklayer. I recently added BAM import to devel. Without any help from Rsamtools though, we would need to use the strategy that you outline: write out a SAM file and asBam() it. That's not so bad though. Do you think you could submit this as a patch?
>>
>> Thanks,
>> Michael
>>
>> On Tue, May 8, 2012 at 6:24 AM, Yue Li<gorillayue at gmail.com> wrote:
>> Dear List,
>>
>> I wonder if there's a way to export a GappedAlignment object to a bam file.
>>
>> rtracklayer 'export' function exports gff, bed, bed15, bedGraph but not bam. It also does not recognize GappedAlignment class.
>>
>> One could reformat the GappedAlignment object into a SAM-like table, write.table it to a local disk, and then use 'asBAM' to convert that file to BAM. But that seems a little cumbersome.
>>
>> Thanks much,
>> Yue
>>
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>>
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
--
Computational Biology
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109
Location: M1-B861
Telephone: 206 667-2793
More information about the Bioconductor
mailing list