Re: GRanges list and reduce function

Vincent Carey <[email protected]>
Newsgroups gmane.science.biology.informatics.conductor
Message-ID <CAANT7+WBYp5Ct9cCXm31d1HBDoxQ+jOWZmiX73n76NNtH8Hz3w@mail.gmail.com>
On Fri, Aug 15, 2014 at 6:20 AM, Asma rabe <[email protected]> wrote:

> Hi ,
>
>
> I need a Granges object with exons data for  few chromosomes, i got Granges
> list of transcripts and their exons as follows:
>
>
> library("TxDb.Hsapiens.UCSC.hg19.knownGene")
>
> txdb<-TxDb.Hsapiens.UCSC.hg19.knownGene
>
> tx_Exons<-exonsBy(txdb)
>
>
>
> 1-How to use reduce on Granges list?how to get the unique exons only and
> exclude redundant exons?
>
>
r = reduce(tx_Exons)


>
> 2-How to select exons of certain chromosomes only ex: chr10? i tried the
> following but i wonder why i got  GRnages list with empty Grange lists??
>
>
one way

ur = unlist(r)
r10 = ur[which(seqnames(ur)=="chr10")]


>
> chr10<-tx_Exons[seqnames(tx_Exons)=="chr10",]
>
>
> >chr10
>
> GRangesList of length 80922:
>
> $1
>
> GRanges with 0 ranges and 3 metadata columns:
>
>    seqnames    ranges strand |   exon_id   exon_name exon_rank
>
>       <Rle> <IRanges>  <Rle> | <integer> <character> <integer>
>
>
> $2
>
> GRanges with 0 ranges and 3 metadata columns:
>
>      seqnames ranges strand | exon_id exon_name exon_rank
>
>
> $3
>
> GRanges with 0 ranges and 3 metadata columns:
>
>      seqnames ranges strand | exon_id exon_name exon_rank
>
>
> ...
>
> <80919 more elements>
>
> ---
>
> seqlengths:
>
>                   chr1                  chr2 ...        chrUn_gl000249
>
>              249250621             243199373 ...                 38502
>
>
>
> > length(chr10)
>
> [1] 80922
>
> > length(tx_Exons)
>
> [1] 80922
>
>
> Thank you
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> [email protected]
> 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
[email protected]
https://stat.ethz.ch/mailman/listinfo/bioconductor
Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.