根据标签下载所有 NCBI PubMed ID
Download all NCBI PubMed IDs based on a tag
我可以使用以下代码读取一篇论文的 PubMed ID 和 return 一组关于该论文的记录:
from Bio import Entrez
from Bio import Medline
Entrez.email = "Your.Name.Here@example.org"
pubmed_rec = Entrez.efetch(db='pubmed',id=19053980,retmode='text',rettype='medline')
records = Medline.parse(pubmed_rec)
for rec in records:
print(rec)
输出为:
{'PMID': '19053980', 'OWN': 'NLM', 'STAT': 'MEDLINE', 'DCOM': '20090706', 'LR': '20091015', 'IS': '1365-2036 (Electronic) 0269-2813 (Linking)', 'VI': '29', 'IP': '5', 'DP': '2009 Mar 1', 'TI': 'Clinical trial: the effects of a trans-galactooligosaccharide prebiotic on faecal microbiota and symptoms in irritable bowel syndrome.', 'PG': '508-18', 'LID': '10.1111/j.1365-2036.2008.03911.x [doi]', 'AB': 'BACKGROUND: Gut microflora-mucosal interactions may be involved in the pathogenesis of irritable bowel syndrome (IBS). AIM: To investigate the efficacy of a novel prebiotic trans-galactooligosaccharide in changing the colonic microflora and improve the symptoms in IBS sufferers. METHODS: In all, 44 patients with Rome II positive IBS completed a 12-week single centre parallel crossover controlled clinical trial. Patients were randomized to receive either 3.5 g/d prebiotic, 7 g/d prebiotic or 7 g/d placebo. IBS symptoms were monitored weekly and scored according to a 7-point Likert scale. Changes in faecal microflora, stool frequency and form (Bristol stool scale) subjective global assessment (SGA), anxiety and depression and QOL scores were also monitored. RESULTS: The prebiotic significantly enhanced faecal bifidobacteria (3.5 g/d P < 0.005; 7 g/d P < 0.001). Placebo was without effect on the clinical parameters monitored, while the prebiotic at 3.5 g/d significantly changed stool consistency (P < 0.05), improved flatulence (P < 0.05) bloating (P < 0.05), composite score of symptoms (P < 0.05) and SGA (P < 0.05). The prebiotic at 7 g/d significantly improved SGA (P < 0.05) and anxiety scores (P < 0.05). CONCLUSION: The galactooligosaccharide acted as a prebiotic in specifically stimulating gut bifidobacteria in IBS patients and is effective in alleviating symptoms. These findings suggest that the prebiotic has potential as a therapeutic agent in IBS.', 'FAU': ['Silk, D B A', 'Davis, A', 'Vulevic, J', 'Tzortzis, G', 'Gibson, G R'], 'AU': ['Silk DB', 'Davis A', 'Vulevic J', 'Tzortzis G', 'Gibson GR'], 'AD': ['Department of Academic Surgery, Imperial College Healthcare NHS Trust, London, UK. David.Silk@nwlh.nhs.uk'], 'LA': ['eng'], 'PT': ['Journal Article', 'Randomized Controlled Trial', "Research Support, Non-U.S. Gov't"], 'DEP': '20081202', 'PL': 'England', 'TA': 'Aliment Pharmacol Ther', 'JT': 'Alimentary pharmacology & therapeutics', 'JID': '8707234', 'RN': ['0 (Oligosaccharides)'], 'SB': 'IM', 'CIN': ['Expert Rev Gastroenterol Hepatol. 2009 Oct;3(5):487-92. PMID: 19817670'], 'MH': ['Adult', 'Aged', 'Bifidobacterium/*drug effects/growth & development', 'Colony Count, Microbial', 'Feces/*microbiology', 'Female', 'Humans', 'Irritable Bowel Syndrome/*diet therapy', 'Male', 'Middle Aged', 'Oligosaccharides/*administration & dosage/metabolism', 'Probiotics/*therapeutic use', 'Quality of Life', 'Statistics as Topic', 'Treatment Outcome'], 'EDAT': '2008/12/05 09:00', 'MHDA': '2009/07/07 09:00', 'CRDT': ['2008/12/05 09:00'], 'PHST': ['2008/12/05 09:00 [pubmed]', '2009/07/07 09:00 [medline]', '2008/12/05 09:00 [entrez]'], 'AID': ['APT3911 [pii]', '10.1111/j.1365-2036.2008.03911.x [doi]'], 'PST': 'ppublish', 'SO': 'Aliment Pharmacol Ther. 2009 Mar 1;29(5):508-18. doi: 10.1111/j.1365-2036.2008.03911.x. Epub 2008 Dec 2.'}
如果您在 NCBI 网站上查看同一篇论文:
你可以看到它属于随机对照试验,我认为它在输出中是这样的:
'PT': ['Journal Article', 'Randomized Controlled Trial', "Research Support, Non-U.S. Gov't"]
我现在想获得 PMID 中所有随机对照试验的列表,而不是提供个人 PubMed ID。
即我想输入查询 'PT = randomized control trials tag and give me back all of the PubMed IDs'.
我试图将 id=19053980 更改为类似“pt = Randomized Controlled Trial”的内容,但这显然不是关键。
如何 return 列出所有带有随机对照试验标签的 PMID,以及我自己如何找到这个答案?我找到了所有代码的列表 here 但我不清楚如何从中知道如何使用它们。
可以使用MeSH term "clinical trial" and a recipe in biopython's tutorial。我添加了下面的代码。
from Bio import Entrez
from Bio import Medline
term = "clinical trial[MeSH Terms]"
Entrez.email = "A.N.Other@example.com" # Always tell NCBI who you are
handle = Entrez.esearch(db="pubmed", term=term, retmax=5)
esearch_record = Entrez.read(handle)
handle.close()
print(f"Records found: {esearch_record['Count']}")
all_pmids = esearch_record["IdList"]
handle = Entrez.efetch(
db="pubmed",
id=all_pmids,
rettype="medline",
retmode="text")
records = Medline.parse(handle)
for record in records:
print(record["PMID"])
输出是
Records found: 349991
33288887
33275561
33273736
33149899
33264530
这是 link 对 Pubmed 网站上相同查询的查询:https://pubmed.ncbi.nlm.nih.gov/?term=clinical+trial[MeSH+Terms]
为了找到这个答案,我做了两件事。首先,我使用 pubmed 的网站搜索临床试验并找到合适的 MeSH 术语。其次,去了 biopython 的教程和 control+f 的 pubmed。
我可以使用以下代码读取一篇论文的 PubMed ID 和 return 一组关于该论文的记录:
from Bio import Entrez
from Bio import Medline
Entrez.email = "Your.Name.Here@example.org"
pubmed_rec = Entrez.efetch(db='pubmed',id=19053980,retmode='text',rettype='medline')
records = Medline.parse(pubmed_rec)
for rec in records:
print(rec)
输出为:
{'PMID': '19053980', 'OWN': 'NLM', 'STAT': 'MEDLINE', 'DCOM': '20090706', 'LR': '20091015', 'IS': '1365-2036 (Electronic) 0269-2813 (Linking)', 'VI': '29', 'IP': '5', 'DP': '2009 Mar 1', 'TI': 'Clinical trial: the effects of a trans-galactooligosaccharide prebiotic on faecal microbiota and symptoms in irritable bowel syndrome.', 'PG': '508-18', 'LID': '10.1111/j.1365-2036.2008.03911.x [doi]', 'AB': 'BACKGROUND: Gut microflora-mucosal interactions may be involved in the pathogenesis of irritable bowel syndrome (IBS). AIM: To investigate the efficacy of a novel prebiotic trans-galactooligosaccharide in changing the colonic microflora and improve the symptoms in IBS sufferers. METHODS: In all, 44 patients with Rome II positive IBS completed a 12-week single centre parallel crossover controlled clinical trial. Patients were randomized to receive either 3.5 g/d prebiotic, 7 g/d prebiotic or 7 g/d placebo. IBS symptoms were monitored weekly and scored according to a 7-point Likert scale. Changes in faecal microflora, stool frequency and form (Bristol stool scale) subjective global assessment (SGA), anxiety and depression and QOL scores were also monitored. RESULTS: The prebiotic significantly enhanced faecal bifidobacteria (3.5 g/d P < 0.005; 7 g/d P < 0.001). Placebo was without effect on the clinical parameters monitored, while the prebiotic at 3.5 g/d significantly changed stool consistency (P < 0.05), improved flatulence (P < 0.05) bloating (P < 0.05), composite score of symptoms (P < 0.05) and SGA (P < 0.05). The prebiotic at 7 g/d significantly improved SGA (P < 0.05) and anxiety scores (P < 0.05). CONCLUSION: The galactooligosaccharide acted as a prebiotic in specifically stimulating gut bifidobacteria in IBS patients and is effective in alleviating symptoms. These findings suggest that the prebiotic has potential as a therapeutic agent in IBS.', 'FAU': ['Silk, D B A', 'Davis, A', 'Vulevic, J', 'Tzortzis, G', 'Gibson, G R'], 'AU': ['Silk DB', 'Davis A', 'Vulevic J', 'Tzortzis G', 'Gibson GR'], 'AD': ['Department of Academic Surgery, Imperial College Healthcare NHS Trust, London, UK. David.Silk@nwlh.nhs.uk'], 'LA': ['eng'], 'PT': ['Journal Article', 'Randomized Controlled Trial', "Research Support, Non-U.S. Gov't"], 'DEP': '20081202', 'PL': 'England', 'TA': 'Aliment Pharmacol Ther', 'JT': 'Alimentary pharmacology & therapeutics', 'JID': '8707234', 'RN': ['0 (Oligosaccharides)'], 'SB': 'IM', 'CIN': ['Expert Rev Gastroenterol Hepatol. 2009 Oct;3(5):487-92. PMID: 19817670'], 'MH': ['Adult', 'Aged', 'Bifidobacterium/*drug effects/growth & development', 'Colony Count, Microbial', 'Feces/*microbiology', 'Female', 'Humans', 'Irritable Bowel Syndrome/*diet therapy', 'Male', 'Middle Aged', 'Oligosaccharides/*administration & dosage/metabolism', 'Probiotics/*therapeutic use', 'Quality of Life', 'Statistics as Topic', 'Treatment Outcome'], 'EDAT': '2008/12/05 09:00', 'MHDA': '2009/07/07 09:00', 'CRDT': ['2008/12/05 09:00'], 'PHST': ['2008/12/05 09:00 [pubmed]', '2009/07/07 09:00 [medline]', '2008/12/05 09:00 [entrez]'], 'AID': ['APT3911 [pii]', '10.1111/j.1365-2036.2008.03911.x [doi]'], 'PST': 'ppublish', 'SO': 'Aliment Pharmacol Ther. 2009 Mar 1;29(5):508-18. doi: 10.1111/j.1365-2036.2008.03911.x. Epub 2008 Dec 2.'}
如果您在 NCBI 网站上查看同一篇论文:
你可以看到它属于随机对照试验,我认为它在输出中是这样的:
'PT': ['Journal Article', 'Randomized Controlled Trial', "Research Support, Non-U.S. Gov't"]
我现在想获得 PMID 中所有随机对照试验的列表,而不是提供个人 PubMed ID。
即我想输入查询 'PT = randomized control trials tag and give me back all of the PubMed IDs'.
我试图将 id=19053980 更改为类似“pt = Randomized Controlled Trial”的内容,但这显然不是关键。
如何 return 列出所有带有随机对照试验标签的 PMID,以及我自己如何找到这个答案?我找到了所有代码的列表 here 但我不清楚如何从中知道如何使用它们。
可以使用MeSH term "clinical trial" and a recipe in biopython's tutorial。我添加了下面的代码。
from Bio import Entrez
from Bio import Medline
term = "clinical trial[MeSH Terms]"
Entrez.email = "A.N.Other@example.com" # Always tell NCBI who you are
handle = Entrez.esearch(db="pubmed", term=term, retmax=5)
esearch_record = Entrez.read(handle)
handle.close()
print(f"Records found: {esearch_record['Count']}")
all_pmids = esearch_record["IdList"]
handle = Entrez.efetch(
db="pubmed",
id=all_pmids,
rettype="medline",
retmode="text")
records = Medline.parse(handle)
for record in records:
print(record["PMID"])
输出是
Records found: 349991
33288887
33275561
33273736
33149899
33264530
这是 link 对 Pubmed 网站上相同查询的查询:https://pubmed.ncbi.nlm.nih.gov/?term=clinical+trial[MeSH+Terms]
为了找到这个答案,我做了两件事。首先,我使用 pubmed 的网站搜索临床试验并找到合适的 MeSH 术语。其次,去了 biopython 的教程和 control+f 的 pubmed。