[BioC] Fwd: all human gene coordinates

Steve Lianoglou mailinglist.honeypot at gmail.com
Wed Dec 5 18:21:35 CET 2012


Hah -- forgot to CC bioc-list, even though I suggested you not forget
that you should do the same ;-)


---------- Forwarded message ----------
From: Steve Lianoglou <mailinglist.honeypot at gmail.com>
Date: Wed, Dec 5, 2012 at 12:20 PM
Subject: Re: [BioC] all human gene coordinates
To: Wim Kreinen <wkreinen at gmail.com>


Hi Wim,

Please keep emails on the bioc list by hitting "reply all" -- this way
you can get more (and better help) by having more eyes on your
question, and also others can benefit as well.

So:

On Wed, Dec 5, 2012 at 11:29 AM, Wim Kreinen <wkreinen at gmail.com> wrote:
> This sounds promising.
> And principally I understand how it works but ... How do I define keys if I
> want all transcripts?
>  I defined via isActiveSeq the chr1...chr22, chrX, chrY as active
> chromosomes.
>
> I tried
> library ("TxDb.Hsapiens. UCSC.hg19.knownGenes")
> txdb->TxDb.Hsapiens. UCSC.hg19.knownGenes
> cols->c("TXCHROM", "TXSTRAND", "TXSTART", "TXEND")
> keys -> ? #How do I define keys if I want all transcripts?
> alltranscripts->select (txdb, keys=keys, cols=cols, keytype="TXID")

First: what's up w/ the spaces in your "TxDb.Hsapiens.[SPACE]UCSC..."

It's also ...knownGene -- not ...knownGeneS

Also, a suggestion: use `<-` for assignment, and not `->` ... although
the latter works, if anybody else is meant to read your code, they're
likely going to be confused for a bit until they get used to your
"odd" (but correct) choice of assignment direction.

Anyhow -- how about:

R> library(BiocInstaller)
R> biocLite("TxDb.Hsapiens.UCSC.hg19.knownGene")
R> library("TxDb.Hsapiens.UCSC.hg19.knownGene")
R> txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
R> txs <- transcripts(txdb)
R> head(txs)
R> head(txs)
GRanges with 6 ranges and 2 metadata columns:
      seqnames           ranges strand |     tx_id     tx_name
         <Rle>        <IRanges>  <Rle> | <integer> <character>
  [1]     chr1 [ 11874,  14409]      + |         1  uc001aaa.3
  [2]     chr1 [ 11874,  14409]      + |         2  uc010nxq.1
  ...

the ucsc id's are in the tx_name column.

HTH,
-steve

--
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact


-- 
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact



More information about the Bioconductor mailing list