[ensembl-dev] Help with getting cDNA sequences using Biomart perl api's
pip pipster
pipsterpip at yahoo.com
Wed Jul 13 13:44:51 BST 2011
Hello - I'm having trouble getting cDNA sequences using the bioperl/biomart api's. Here is an example query that I'm building. It works fine until I add the "cdna" attribute. Once I add that attribute, I get the message, "Attribute 'cdna' not found in dataset default.hsapiens_gene_ensembl" Perhaps cDNA is in another mart? I used the Ensembl Biomart 'perl' button to generate the perl query.
my $initializer = BioMart::Initializer->new('registryFile'=>$confFile, 'action'=>$action);
my $registry = $initializer->getRegistry;
my $query = BioMart::Query->new('registry'=>$registry,'virtualSchemaName'=>'default');
$query->setDataset("hsapiens_gene_ensembl");
$query->addFilter("biotype", ["pseudogene"]);
$query->addAttribute("ensembl_transcript_id");
$query->addAttribute("ensembl_gene_id");
$query->addAttribute("chromosome_name");
$query->addAttribute("strand");
$query->addAttribute("cdna");
$query->formatter("FASTA");
my $query_runner = BioMart::QueryRunner->new();
Here is my registryFile content. Does this look OK?
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MartRegistry>
<MartRegistry>
<MartURLLocation database="ensembl_mart_63" default="1" displayName="Ensembl Genes 63" host="www.ensembl.org" includeDatasets="" martUser="" name="ENSEMBL_MART_ENSEMBL" path="/biomart/martservice" port="80" serverVirtualSchema="default" visible="1" />
</MartRegistry>
I also tried this mart as well and received the same cdna not found in dataset message:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MartRegistry>
<MartRegistry>
<MartURLLocation database="ensembl_mart_63" default="1" displayName="ENSEMBL GENES 63 (SANGER UK)" host="www.biomart.org" includeDatasets="" martUser="" name="ensembl" path="/biomart/martservice" port="80" serverVirtualSchema="default" visible="1" />
</MartRegistry>
Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20110713/dd986a6b/attachment.html>
More information about the Dev
mailing list