[Bioc-sig-seq] GRanges object from AlignedRead?

Patrick Aboyoun paboyoun at fhcrc.org
Sun Feb 28 18:49:58 CET 2010


Joseph,
There is a short term answer and a long term answer to that question. 
The short term answer is below. The long term answer is that the 
GenomicFeatures infrastructure is undergoing rapid changes and so you 
should use it with caution over the next 2-4 weeks. If you run into any 
issues or have any feature requests, don't hesitate to e-mail the list.

library(ShortRead)
sp <- SolexaPath(system.file("extdata", package="ShortRead"))
ap <- analysisPath(sp)
aligns <- readAligned(ap, "s_2_export.txt", "SolexaExport")
aligns <- aligns[!is.na(position(aligns))]
levels(aligns at chromosome) <- gsub("\\.fa$", "", levels(chromosome(aligns)))

alignRanges <-
GRanges(seqnames = chromosome(aligns),
         ranges = IRanges(position(aligns), width = width(aligns)),
         strand = as.character(strand(aligns)))

alignRanges
GRanges with 406 ranges and 0 values columns
    seqnames                 ranges strand |
<Rle> <IRanges> <Rle> |
1     chr17 [ 69345321,  69345355]      - |
2     chr18 [ 54982866,  54982900]      + |
3     chr12 [ 80537786,  80537820]      - |
4     chr10 [117148563, 117148597]      - |
5      chr9 [  9192755,   9192789]      - |
6      chr1 [  3393025,   3393059]      + |
7     chr19 [  4786365,   4786399]      - |
8      chr2 [ 98506741,  98506775]      - |
9      chr9 [  3026723,   3026757]      + |
10     chr8 [129798321, 129798355]      + |





On 2/27/10 7:29 PM, joseph wrote:
> Hello
> My goal is to identify the genes associated with the reads in my AlignedRead object using GenomicFeatures package.
> Can you please show me how to make the GRanges object from the AlignedRead?
> Joseph Dhahbi
>
>
>
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> Bioc-sig-sequencing mailing list
> Bioc-sig-sequencing at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing
>



More information about the Bioc-sig-sequencing mailing list