Entrez.efetch(db =“Taxonomy”,id = tax_id,retmode =“xml”)返回空记录

时间:2012-06-01 11:41:53

标签: biopython

以下代码返回一个空记录:

handle = Entrez.efetch(db="Taxonomy", id="158330", retmode="xml") #From biopython tutorial
records = Entrez.read(handle) #Record is empty

1 个答案:

答案 0 :(得分:1)

我刚尝试了同样的事情,并且返回的记录不是空的。

In [20]: handle = Entrez.efetch(db="Taxonomy", id="158330", retmode="xml")

In [21]: records = Entrez.read(handle)

In [22]: records
Out[22]: [{u'Lineage': 'cellular organisms; Eukaryota; Viridiplantae; Streptophyta; Streptophytina; Embryophyta; Tracheophyta; Euphyllophyta; Spermatophyta; Magnoliophyta; Liliopsida; Asparagales; Orchidaceae', u'Division': 'Plants', u'ParentTaxId': '4747', u'PubDate': '2001/04/25 19:02:00', u'LineageEx': [{u'ScientificName': 'cellular organisms', u'TaxId': '131567', u'Rank': 'no rank'}, {u'ScientificName': 'Eukaryota', u'TaxId': '2759', u'Rank': 'superkingdom'}, {u'ScientificName': 'Viridiplantae', u'TaxId': '33090', u'Rank': 'kingdom'}, {u'ScientificName': 'Streptophyta', u'TaxId': '35493', u'Rank': 'phylum'}, {u'ScientificName': 'Streptophytina', u'TaxId': '131221', u'Rank': 'no rank'}, {u'ScientificName': 'Embryophyta', u'TaxId': '3193', u'Rank': 'no rank'}, {u'ScientificName': 'Tracheophyta', u'TaxId': '58023', u'Rank': 'no rank'}, {u'ScientificName': 'Euphyllophyta', u'TaxId': '78536', u'Rank': 'no rank'}, {u'ScientificName': 'Spermatophyta', u'TaxId': '58024', u'Rank': 'no rank'}, {u'ScientificName': 'Magnoliophyta', u'TaxId': '3398', u'Rank': 'no rank'}, {u'ScientificName': 'Liliopsida', u'TaxId': '4447', u'Rank': 'class'}, {u'ScientificName': 'Asparagales', u'TaxId': '73496', u'Rank': 'order'}, {u'ScientificName': 'Orchidaceae', u'TaxId': '4747', u'Rank': 'family'}], u'CreateDate': '2001/04/24 16:31:00', u'TaxId': '158330', u'Rank': 'subfamily', u'GeneticCode': {u'GCId': '1', u'GCName': 'Standard'}, u'ScientificName': 'Cypripedioideae', u'MitoGeneticCode': {u'MGCId': '1', u'MGCName': 'Standard'}, u'UpdateDate': '2001/04/24 16:31:00'}]