Try:


chrom <- c(1:22,'X','Y')



________________________________
 From: Karthik K N <karthikuttan@gmail.com>

Cc: "bioconductor@r-project.org" <bioconductor@r-project.org> 
Sent: Monday, July 23, 2012 7:46 AM
Subject: Re: [BioC] Problems in retrieving 3'UTR sequences of ALL human genes using biomaRt


 Hello Tim,

Thanks for the reply. I think this will give the 3'UTRs of all the genes in chromosome 1. How can I get this for ALL the genes in ALL the chromosome instead of repeating the step by changing the chromosome number?

Thanks a lot once again.




Seems to work with:
>
>
>chrom <- '1'
>xx <- getBM(attributes=c("hgnc_symbol", "3utr"),filters="chromosome_name",
>
>        values = chrom, mart = ensembl)
>
>
>
>________________________________
> From: Karthik K N <karthikuttan@gmail.com>
>To: bioconductor@r-project.org 
>Sent: Monday, July 23, 2012 5:02 AM
>Subject: [BioC] Problems in retrieving 3'UTR sequences of ALL human genes using biomaRt
> 
>
>Dear Members,
>
>I am trying to download the 3'UTR sequences of all human genes from Ensembl
>Biomart using the package biomaRt. Ideally, after retrieving I want to save
>these in FASTA format. When I am using the code given below to get 3'UTRs
>of genes in chromosome 1, 2 and 3 (not sure if this is the best way to
>achieve what I want), I am getting an error:
>
>"Error in getBM(attributes = c("hgnc_symbol", "3utr"), filters =
>"chromosome_name",  :
>  Query ERROR: caught BioMart::Exception::Database: Could not connect to
>mysql database ensembl_mart_67a: DBI
>connect('database=ensembl_mart_67a;host=bmdccdb.oicr.on.ca;port=3306','bm_web',...)
>failed: Too many connections at /srv/biomart_server/
>biomart.org/biomart-perl/lib/BioMart/Configuration/DBLocation.pm line 98"
>
>Code is given below:
>
>>
 library(biomaRt)
>> ensembl=useMart("ensembl")
>> ensembl = useDataset("hsapiens_gene_ensembl",mart=ensembl)
>> chrom=c(1,2,3)
>> getBM(attributes=c("hgnc_symbol", "3utr"),filters="chromosome_name",
>values = chrom, mart = ensembl)
>Error in getBM(attributes = c("hgnc_symbol", "3utr"), filters =
>"chromosome_name",  :
>  Query ERROR: caught BioMart::Exception::Database: Could not connect to
>mysql database ensembl_mart_67a: DBI
>connect('database=ensembl_mart_67a;host=bmdccdb.oicr.on.ca;port=3306','bm_web',...)
>failed: Too many connections at /srv/biomart_server/
>biomart.org/biomart-perl/lib/BioMart/Configuration/DBLocation.pm line 98
>
>*SessionInfo is given below:*
>*
>
>*
>> sessionInfo()
>R version 2.15.0 (2012-03-30)
>Platform: i386-pc-mingw32/i386 (32-bit)
>
>locale:
>[1] LC_COLLATE=English_India.1252  LC_CTYPE=English_India.1252
>LC_MONETARY=English_India.1252
 LC_NUMERIC=C
>[5] LC_TIME=English_India.1252
>
>attached base packages:
>[1] stats     graphics  grDevices utils     datasets  methods   base
>
>other attached packages:
>[1] biomaRt_2.12.0
>
>loaded via a namespace (and not attached):
>[1] RCurl_1.91-1.1 XML_3.9-1.1
>
>
>Can somebody please tell me where I am going wrong?
>
>Thanks a lot,
>
>Regards,
>
>Kart
>
>    [[alternative HTML version deleted]]
>
>_______________________________________________
>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
>
>
>


- 
	[[alternative HTML version deleted]]

