[ensembl-dev] Use of uninitialized value in print at HZ254_genedata.pl line .
mag
mr6 at ebi.ac.uk
Tue Feb 11 09:22:18 GMT 2014
Hi Pengfei,
Depending on the species and data, it is not always possible to have an
official gene name and/or description.
As more proteins and cDNAs are submitted to public databases, we will be
able to use these to name the gene models.
Regards,
Magali
On 11/02/2014 01:25, 刘鹏飞 wrote:
> Thanks, now I am analyzing RNAseq data and want to download the gene
> information of the species, so briefly now I need the gene name,
> production function or description, stable id and gene length data.
>
>
> 2014-02-10 17:10 GMT+08:00 mag <mr6 at ebi.ac.uk <mailto:mr6 at ebi.ac.uk>>:
>
> Hi Pengfei,
>
> I am not entirely sure which data you are looking at, but
> depending on the databases, not all genes will have a description
> or an external_name.
>
> For a given gene, we assign a display xref if we find an external
> reference from a trusted source matching the ensembl gene.
> That xref (external reference) is then used to assign a display
> name to the gene.
> If there is no such external reference, the gene will have no
> display name and we will use the ensembl stable id instead.
>
> A similar rule applies to assigning descriptions.
>
>
> Hope that helps,
> Magali
>
>
> On 10/02/2014 05:22, 刘鹏飞 wrote:
>> Hi Magali and
>> Hi all,
>>
>> I use following code to fetch all information of genes for a
>> bacteria, but get some errors (althouth I could get all data I
>> wanted), but I could not figure out where goes wrong, thanks:
>> errors:
>> Use of uninitialized value in print at HZ254_genedata.pl line 20.
>>
>> scripts:
>> # methanocella_conradii_hz254
>> #HZ254_genedata.pl
>> #!/usr/bin/perl
>> use strict;
>> use warnings;
>> use Bio::EnsEMBL::LookUp;
>> # load the lookup from the main Ensembl Bacteria public server
>> my $lookup = Bio::EnsEMBL::LookUp->new(
>> -URL => "http://bacteria.ensembl.org/registry.json",
>> -NO_CACHE => 1
>> );
>> # find the correct database adaptor using a unique name
>> my ($dba) = @{$lookup->get_by_name_exact(
>> 'methanocella_conradii_hz254'
>> )};
>> my $genes = $dba->get_GeneAdaptor()->fetch_all();
>> # get all gene infomation
>> open (MYFILE, '>>HZ254gene_data.txt');
>> foreach my $gene (@$genes){
>> print $gene->stable_id,"\t",
>> $gene->display_id,"\t",
>> $gene->description,"\t",
>> $gene->start, " - ",
>> $gene->end, "\t",
>> $gene->external_name, "\t",
>> $gene->length,"\n";
>> };
>> close (MYFILE);
>> ##API version 74
>>
>>
>> --
>> Pengfei Liu, PhD Candidate
>>
>> Lab of Microbial Ecology
>> College of Resources and Environmental Sciences
>> China Agricultural University
>> No.2 Yuanmingyuanxilu, Beijing, 100193
>> P.R. China
>>
>> Tel: +86-10-62731358
>> Fax: +86-10-62731016
>>
>> E-mail: liupfskygre at gmail.com <mailto:liupfskygre at gmail.com>
>> If you are afraid of tomorrow, how can you enjoy today!
>> Keep hungry, Keep foolish!
>> Moving forward!
>
>
>
>
> --
> Pengfei Liu, PhD Candidate
>
> Lab of Microbial Ecology
> College of Resources and Environmental Sciences
> China Agricultural University
> No.2 Yuanmingyuanxilu, Beijing, 100193
> P.R. China
>
> Tel: +86-10-62731358
> Fax: +86-10-62731016
>
> E-mail: liupfskygre at gmail.com <mailto:liupfskygre at gmail.com>
> If you are afraid of tomorrow, how can you enjoy today!
> Keep hungry, Keep foolish!
> Moving forward!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20140211/d4bd4e1a/attachment.html>
More information about the Dev
mailing list