[BioC] GViz trouble retreiving X chromosome data with BiomartGeneRegionTrack
Robert Ivanek
robert.ivanek at unibas.ch
Tue Apr 16 15:04:04 CEST 2013
Dear Chris,
You have to run the code "options(ucscChromosomeNames=FALSE)" before
calling the function BiomartGeneRegionTrack. Gviz currently assumes
chromosome names in UCSC style like "chr1", "chrX" etc. following should
work for you.
library("Gviz")
library("GenomicRanges")
library("biomaRt")
library("BiocGenerics")
ensembl67 <- useMart(host='may2012.archive.ensembl.org',
biomart='ENSEMBL_MART_ENSEMBL') #uses ensemble67 build
("may2012.archive.ensembl.org")
ensembl67 <- useDataset("mmusculus_gene_ensembl", mart=ensembl67)
options(ucscChromosomeNames=FALSE)
biomTrack <- BiomartGeneRegionTrack(genome = "mm9", biomart = ensembl67,
chromosome = "X", start = 166123129, end = 166443668, stacking="squish",
showId = TRUE, name= "geneName")
Best
Robert
On 12/04/13 18:49, chris_utah wrote:
> Hi,
>
> I am encountering an error when attempting to retrieve data from the X chromosome using GViz. The error is unclear to me and I would greatly appreciate some help.
>
> The code and error and sessionInfo() are below. Please note that I have tried the code with and without ucscChromosomeNames=FALSE.
>
> Thank you very much.
>
> best wishes,
> Chris
>
> CODE:
> ##################################################
> library("Gviz")
> library("GenomicRanges")
> library("biomaRt")
> library("BiocGenerics")
> ensembl67 =useMart(host='may2012.archive.ensembl.org', biomart='ENSEMBL_MART_ENSEMBL') #uses ensemble67 build ("may2012.archive.ensembl.org")
> ensembl67 = useDataset("mmusculus_gene_ensembl", mart=ensembl67)
> biomTrack <- BiomartGeneRegionTrack(genome = "mm9", biomart = ensembl67, chromosome = "X", start = 166123129, end = 166443668, stacking="squish", showId = TRUE, name= geneName, ucscChromosomeNames=FALSE)
>
>
> ERROR:
>> biomTrack <- BiomartGeneRegionTrack(genome = "mm9", biomart = ensembl67, chromosome = "X", start = startGene, end = endGene, stacking="squish", showId = TRUE, name= geneName, ucscChromosomeNames=FALSE)
> Error in FUN("X"[[1L]], ...) : Invalid chromosome identifier 'x'
> Please consider setting options(ucscChromosomeNames=FALSE) to allow for arbitrary chromosome identifiers.
>
>
>> sessionInfo()
> R version 2.15.2 (2012-10-26)
> Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
>
> locale:
> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
>
> attached base packages:
> [1] grid stats graphics grDevices utils datasets methods base
>
> other attached packages:
> [1] edgeR_3.0.8 limma_3.14.4 biomaRt_2.14.0 GenomicRanges_1.10.7 IRanges_1.16.6 BiocGenerics_0.4.0
> [7] Gviz_1.2.1
>
> loaded via a namespace (and not attached):
> [1] annotate_1.36.0 AnnotationDbi_1.20.6 Biobase_2.18.0 Biostrings_2.26.3 biovizBase_1.6.2 bitops_1.0-4.2
> [7] BSgenome_1.26.1 cluster_1.14.3 colorspace_1.2-1 DBI_0.2-5 DESeq_1.10.1 dichromat_2.0-0
> [13] genefilter_1.40.0 geneplotter_1.36.0 GenomicFeatures_1.10.2 Hmisc_3.10-1 labeling_0.1 lattice_0.20-13
> [19] munsell_0.4 parallel_2.15.2 plyr_1.8 RColorBrewer_1.0-5 RCurl_1.95-4.1 Rsamtools_1.10.2
> [25] RSQLite_0.11.2 rtracklayer_1.18.2 scales_0.2.3 splines_2.15.2 stats4_2.15.2 stringr_0.6.2
> [31] survival_2.37-4 tools_2.15.2 XML_3.95-0.2 xtable_1.7-1 zlibbioc_1.4.0
>
>
>
> Christopher Gregg, PhD.
> New York Stem Cell Foundation-Robertson Investigator
> Assistant Professor, Neurobiology and Anatomy
> Adjunct Assistant Professor, Human Genetics
> 323 Wintrobe Bldg 530
> University of Utah, School of Medicine
> 20 North 1900 East
> Salt Lake City, Utah 84132-3401
>
> phone: (801) 581-8212
> fax: (801) 585-9736
> ------------------------------------
> Gregg Lab Website: www.neuro.utah.edu/labs/gregg/index.html
>
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>
More information about the Bioconductor
mailing list