or just

biocLite("TxDb.Hsapiens.UCSC.hg19.knownGene")
library("TxDb.Hsapiens.UCSC.hg19.knownGene")
tx.by.gene <- transcriptsBy(TxDb.Hsapiens.UCSC.hg19.knownGene, 'gene')

which will be indexed by EntrezGene ID
Not sure if this is what you were looking for, though.



On Tue, Jun 12, 2012 at 3:24 AM, Stefanie <stefanie.tauber@univie.ac.at>wrote:

> Hi,
>
> I just managed to do it the following way:
>
> I get the transcript IDs of all known genes by the following command:
>
> ensembl = useDataset("hsapiens_gene_ensembl",mart=ensembl)
>
> res = getBM(attributes = "ensembl_transcript_id", filters = "status",
> values =
> "known", mart = ensembl)
>
> humanDb = makeTranscriptDbFromUCSC(genome = "hg19", tablename =
> "ensGene",transcript_ids = as.character(res[,1]))
>
> tx = transcriptsBy(humanDb)
>
>
> Works! :)
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>



-- 
*A model is a lie that helps you see the truth.*
*
*
Howard Skipper<http://cancerres.aacrjournals.org/content/31/9/1173.full.pdf>

	[[alternative HTML version deleted]]

