from Bio import Entrez
from Bio import Medline
keyword = "PyCogent"
Entrez.email = "tongyuan915@163.com"
handle = Entrez.esearch(db = "pubmed", term = keyword)
record = Entrez.read(handle)
print(record)
{'IdList': ['22479120', '18230758', '17708774'], 'TranslationStack': [{'Count': '3', 'Explode': 'N', 'Term': 'PyCogent[All Fields]', 'Field': 'All Fields'}, 'GROUP'], 'Count': '3', 'RetMax': '3', 'RetStart': '0', 'TranslationSet': [], 'QueryTranslation': 'PyCogent[All Fields]'}
pmids = record['IdList']
print(pmids)
['22479120', '18230758', '17708774']
handle = Entrez.efetch(db="pubmed", id=pmids, rettype="medline", retmode="text")
medline_records = Medline.parse(handle)
records = list(medline_records)
[{'AU': ['Cieslik M', 'Derewenda ZS', 'Mura C'], 'DP': '2011 Apr 1', 'PST': 'ppublish', 'CRDT': ['2012/04/06 06:00'], 'OWN': 'NLM', 'PHST': ['2010/06/17 00:00 [received]', '2011/02/07 00:00 [accepted]', '2012/04/06 06:00 [entrez]', '2012/04/06 06:00 [pubmed]', '2012/04/06 06:00 [medline]'], 'GR': ['U54 GM074946/GM/NIGMS NIH HHS/United States'], 'IS': '0021-8898 (Print) 0021-8898 (Linking)', 'LA': ['eng'], 'JID': '9876190', 'MHDA': '2012/04/06 06:00', 'PMC': 'PMC3253748', 'PL': 'United States', 'PG': '424-428', 'DEP': '20110211', 'IP': 'Pt 2', 'PT': ['Journal Article'], 'JT': 'Journal of applied crystallography', 'TI': 'Abstractions, algorithms and data structures for structural bioinformatics in PyCogent.', 'EDAT': '2012/04/06 06:00', 'AID': ['10.1107/S0021889811004481 [doi]', 'kk5078 [pii]'], 'PMID': '22479120', 'AB': "To facilitate flexible and efficient structural bioinformatics analyses, new functionality for three-dimensional structure processing and analysis has been introduced into PyCogent - a popular feature-rich framework for sequence-based bioinformatics, but one which has lacked equally powerful tools for handling stuctural/coordinate-based data. Extensible Python modules have been developed, which provide object-oriented abstractions (based on a hierarchical representation of macromolecules), efficient data structures (e.g.kD-trees), fast implementations of common algorithms (e.g. surface-area calculations), read/write support for Protein Data Bank-related file formats and wrappers for external command-line applications (e.g. Stride). Integration of this code into PyCogent is symbiotic, allowing sequence-based work to benefit from structure-derived data and, reciprocally, enabling structural studies to leverage PyCogent's versatile tools for phylogenetic and evolutionary analyses.", 'LR': '20191120', 'VI': '44', 'STAT': 'Publisher', 'SO': 'J Appl Crystallogr. 2011 Apr 1;44(Pt 2):424-428. doi: 10.1107/S0021889811004481. Epub 2011 Feb 11.', 'TA': 'J Appl Crystallogr', 'FAU': ['Cieslik, Marcin', 'Derewenda, Zygmunt S', 'Mura, Cameron']}, {'AU': ['Smit S', 'Rother K', 'Heringa J', 'Knight R'], 'DP': '2008 Mar', 'PST': 'ppublish', 'AD': 'Centre for Integrative Bioinformatics VU (IBIVU), Vrije Universiteit Amsterdam, 1081 HV Amsterdam, The Netherlands.', 'CRDT': ['2008/01/31 09:00'], 'LR': '20181113', 'OWN': 'NLM', 'PHST': ['2008/01/31 09:00 [pubmed]', '2008/03/12 09:00 [medline]', '2008/01/31 09:00 [entrez]'], 'IS': '1469-9001 (Electronic) 1355-8382 (Linking)', 'LA': ['eng'], 'SB': 'IM', 'JID': '9509184', 'MHDA': '2008/03/12 09:00', 'PMC': 'PMC2248259', 'PL': 'United States', 'PG': '410-6', 'DEP': '20080129', 'IP': '3', 'PT': ['Journal Article', "Research Support, Non-U.S. Gov't"], 'JT': 'RNA (New York, N.Y.)', 'TI': 'From knotted to nested RNA structures: a variety of computational methods for pseudoknot removal.', 'EDAT': '2008/01/31 09:00', 'DCOM': '20080311', 'AID': ['rna.881308 [pii]', '10.1261/rna.881308 [doi]'], 'RN': ['63231-63-0 (RNA)'], 'PMID': '18230758', 'AB': 'Pseudoknots are abundant in RNA structures. Many computational analyses require pseudoknot-free structures, which means that some of the base pairs in the knotted structure must be disregarded to obtain a nested structure. There is a surprising diversity of methods to perform this pseudoknot removal task, but these methods are often poorly described and studies can therefore be difficult to reproduce (in part, because different procedures may be intuitively obvious to different investigators). Here we provide a variety of algorithms for pseudoknot removal, some of which can incorporate sequence or alignment information in the removal process. We demonstrate that different methods lead to different results, which might affect structure-based analyses. This work thus provides a starting point for discussion of the extent to which these different methods recapture the underlying biological reality. We provide access to reference implementations through a web interface (at http://www.ibi.vu.nl/programs/k2nwww), and the source code is available in the PyCogent project.', 'LID': '10.1261/rna.881308 [doi]', 'VI': '14', 'STAT': 'MEDLINE', 'SO': 'RNA. 2008 Mar;14(3):410-6. doi: 10.1261/rna.881308. Epub 2008 Jan 29.', 'TA': 'RNA', 'FAU': ['Smit, Sandra', 'Rother, Kristian', 'Heringa, Jaap', 'Knight, Rob'], 'MH': ['Algorithms', 'Base Pairing', 'Base Sequence', 'Computer Simulation', 'Models, Molecular', 'Nucleic Acid Conformation', 'RNA/chemistry/genetics/metabolism']}, {'AU': ['Knight R', 'Maxwell P', 'Birmingham A', 'Carnes J', 'Caporaso JG', 'Easton BC', 'Eaton M', 'Hamady M', 'Lindsay H', 'Liu Z', 'Lozupone C', 'McDonald D', 'Robeson M', 'Sammut R', 'Smit S', 'Wakefield MJ', 'Widmann J', 'Wikman S', 'Wilson S', 'Ying H', 'Huttley GA'], 'DP': '2007', 'PST': 'ppublish', 'AD': 'Department of Chemistry and Biochemistry, University of Colorado, Boulder, Colorado, USA. rob@spot.colorado.edu', 'CRDT': ['2007/08/22 09:00'], 'OWN': 'NLM', 'PHST': ['2007/05/30 00:00 [received]', '2007/08/13 00:00 [revised]', '2007/08/21 00:00 [accepted]', '2007/08/22 09:00 [pubmed]', '2008/03/01 09:00 [medline]', '2007/08/22 09:00 [entrez]'], 'GR': ['T32 GM008759/GM/NIGMS NIH HHS/United States', 'T32 GM065103/GM/NIGMS NIH HHS/United States'], 'IS': '1474-760X (Electronic) 1474-7596 (Linking)', 'LA': ['eng'], 'JID': '100960660', 'MHDA': '2008/03/01 09:00', 'PMC': 'PMC2375001', 'PL': 'England', 'PG': 'R171', 'SB': 'IM', 'IP': '8', 'PT': ['Evaluation Study', 'Journal Article', 'Research Support, N.I.H., Extramural', "Research Support, Non-U.S. Gov't"], 'JT': 'Genome biology', 'TI': 'PyCogent: a toolkit for making sense from sequence.', 'EDAT': '2007/08/22 09:00', 'DCOM': '20080229', 'AID': ['gb-2007-8-8-r171 [pii]', '10.1186/gb-2007-8-8-r171 [doi]'], 'RN': ['0 (BRCA1 Protein)', '0 (von Willebrand Factor)'], 'PMID': '17708774', 'AB': 'We have implemented in Python the COmparative GENomic Toolkit, a fully integrated and thoroughly tested framework for novel probabilistic analyses of biological sequences, devising workflows, and generating publication quality graphics. PyCogent includes connectors to remote databases, built-in generalized probabilistic techniques for working with biological sequences, and controllers for third-party applications. The toolkit takes advantage of parallel architectures and runs on a range of hardware and operating systems, and is available under the general public license from http://sourceforge.net/projects/pycogent.', 'LR': '20191210', 'VI': '8', 'STAT': 'MEDLINE', 'SO': 'Genome Biol. 2007;8(8):R171. doi: 10.1186/gb-2007-8-8-r171.', 'TA': 'Genome Biol', 'FAU': ['Knight, Rob', 'Maxwell, Peter', 'Birmingham, Amanda', 'Carnes, Jason', 'Caporaso, J Gregory', 'Easton, Brett C', 'Eaton, Michael', 'Hamady, Micah', 'Lindsay, Helen', 'Liu, Zongzhi', 'Lozupone, Catherine', 'McDonald, Daniel', 'Robeson, Michael', 'Sammut, Raymond', 'Smit, Sandra', 'Wakefield, Matthew J', 'Widmann, Jeremy', 'Wikman, Shandy', 'Wilson, Stephanie', 'Ying, Hua', 'Huttley, Gavin A'], 'MH': ['Animals', 'BRCA1 Protein/genetics', 'Databases, Genetic', 'Genomics/methods', 'Humans', 'Phylogeny', 'Protein Conformation', 'Proteobacteria/classification/genetics', 'Sequence Analysis/methods', 'Software', 'von Willebrand Factor/chemistry/genetics']}]
n=1
for record in records:
#print(record['TI'])
if keyword in record['TI']:
print("{} ) {}".format(n, record['TI']))
n += 1
1 ) Abstractions, algorithms and data structures for structural bioinformatics in PyCogent.
2 ) PyCogent: a toolkit for making sense from sequence.
from Bio import Entrez
handle = Entrez.esearch(db="pubmed", term="PyCogent AND RNA")
record = Entrez.read(handle)
print(record['IdList'])
handle = Entrez.esearch(db="pubmed", term="PyCogent OR RNA")
record = Entrez.read(handle)
print(record['Count'])
handle = Entrez.esearch(db="pubmed", term="PyCogent AND 2008[year]")
record = Entrez.read(handle)
print(record['IdList'])
handle = Entrez.esearch(db="pubmed", term="C. elegans [Organism] AND 2008[year] AND Mapk [Gene]")
record = Entrez.read(handle)
print(record['Count'])
网友评论