[BioC] biomaRt: retrieve total chromosome lengths

James W. MacDonald jmacdon at med.umich.edu
Fri Oct 27 20:28:01 CEST 2006


Hi An,

De Bondt, An-7114 [PRDBE] wrote:
> Hi,
> 
> How can I retrieve, for a certain organism (e.g. human), the total length of
> each of its chromosomes using biomaRt?
> 	library(biomaRt)
> 	mart <- useMart("ensembl")
> 	mart <- useDataset("hsapiens_gene_ensembl", mart)
> 	chr.lengths <- ???

Well, this doesn't agree exactly with what I see on this webpage:

http://www.ornl.gov/sci/techresources/Human_Genome/posters/chromosome/faqs.shtml

But it is pretty close. Of course I am finding the end of the 'last' 
transcript on a given chromosome rather than the end of the chromosome 
itself, so there will likely be differences. However, I don't see an 
attribute that looks like it gives chromosomal information without first 
being mapped through a gene, so I don't know if you can get exactly what 
you want.

If there is a way, Steffen Durinck will undoubtedly know what it is, but 
I haven't seen a response from him as yet.

Anyway, here is what I did.

 > mart <- useMart("ensembl", "hsapiens_gene_ensembl")
Checking attributes and filters ... ok
 > a <- getBM("hsapiens_gene_ensembl_structure.transcript_chrom_end", 
"chromosome_name", c(1:21, "x","y"), mart, output="list")
 > sapply(a[[1]], max)
         1         2         3         4         5
247197891 242713278 199439629 191246650 180727832
         6         7         8         9        10
170735623 158630410 146252219 140191642 135347681
        11        12        13        14        15
134361903 132289533 114110907 106354309 100334282
        16        17        18        19        20
  88771793  78646005  76106388  63802660  62429769
        21         x         y
  46935585 154908521  57767721

Best,

Jim


> 
> 
> Thanks in advance!
> An
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor


-- 
James W. MacDonald, M.S.
Biostatistician
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623


**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues.



More information about the Bioconductor mailing list