Answer: Getting Introns Expression at a Per Gene Level
6.1 years ago by
You can use import() from rtracklayer to read a bed in as a GRanges.
gr <- import('myfile.bed', asRangedData=FALSE)
I'm not sure what you've got in your file but let's say they are gene
isoforms. Presumably there is an identifier in the file that would let
you group the ranges by gene (or whatever grouping you are after).
will likely end up as one of the metadata columns in the GRanges after
import. Create a GRangesList by grouping the GRanges by gene.
grl <- split(gr, bySomeFactor)
The introns are the gaps between the ranges in each list element of
GRangesList. To get at these we want the difference between the full
range of the gene and the multiple elements (exons or transcripts
of the gene.
Create the gene ranges:
geneRanges <- range(grl)
Extract the differences:
introns <- psetdiff(geneRanges, grl)
If this doesn't help, I'll need to know more detail about the data in
the isoform file.
On 09/09/2013 07:31 PM, Carl Baribault wrote:
> Dear Valerie,
> I have a bed file of specific isoforms of interest. Can you please
> a best approach for obtaining the intron extents? Thanks.
> Carl Baribault
> [[alternative HTML version deleted]]
> Bioconductor mailing list
> Bioconductor at r-project.org
> Search the archives: