[BioC] Reading paired-end data into GRangesList
Cory Barr
barr.cory at gene.com
Wed Oct 26 22:07:32 CEST 2011
Hi Hubert,
Try the grglist function on a GappedAlignments object.
gapped_alignments <- readBamGappedAlignments(bam_file)
granges_list <- grglist(gapped_alignments)
Then to combine each end of the read from the different ends into the
same element of the GRangesList, try the "split" function on the names
of the reads.
-Cory
On Wed, Oct 26, 2011 at 6:51 AM, Hubert Rehrauer
<Hubert.Rehrauer at fgcz.ethz.ch> wrote:
> Hi
>
> I want to load paired-end data from Bam-Files into R in order to do
> expression counting. The complicating thing is, that the first read was
> aligned using a gapped alignment (i.e. the cigar string contains Ns).
>
> How can this be done? I thought this would be a quite common task but I did
> not find any function that would do this. Neither scanBam nor
> readBamGappedAlignments are directly helpful with this.
>
> For me the most obvious thing would be to hold the alignment of such a read
> as a GRangesList. In order to get there I would use scanBam to load the
> first read. Parse the cigar string to identify the gaps, build a
> GRangesList and then add the alignment of the second read to the List. Do
> you have any better ideas?
>
>
> best regards,
> hubert
>
> _______________________________________________
> 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
>
More information about the Bioconductor
mailing list