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?

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@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@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]]

