Question: How To Generate A Bibtex File From Pmids
6
gravatar for Farhat
8.6 years ago by
Farhat2.9k
Pune, India
Farhat2.9k wrote:

This is not strictly bioinformatics but I am not sure where this would fit. Anyway, close this question if it is misplaced.

I have a long list of PMIDs, I would like to generate a BiBTeX file from this. How could I go about doing this?

• 14k views
ADD COMMENTlink modified 2.6 years ago by by0110 • written 8.6 years ago by Farhat2.9k

Thanks! Excellent ways to do this. I wish I could mark more than one as correct.

ADD REPLYlink written 8.6 years ago by Farhat2.9k

Not a direct solution if you only have PMID's, but if you save your papers in Zotero it is easy to export a BiBTeX format list of citations.

ADD REPLYlink written 2.6 years ago by steve2.5k
7
gravatar for Pierre Lindenbaum
8.6 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum128k wrote:

Use ncbi efetch to download your papers as XML and use a XSLT stylesheet like pubmed2bibtex.xsl ( http://svn.gna.org/viewcvs/kbibtex/trunk/xslt/ ) to transform it to bibtex.

I've used this method to compile a recent TeX paper: see http://code.google.com/p/knime4bio/source/browse/trunk/paper20110804/Makefile

ADD COMMENTlink written 8.6 years ago by Pierre Lindenbaum128k
7
gravatar for Neilfws
8.6 years ago by
Neilfws48k
Sydney, Australia
Neilfws48k wrote:

This is very easy using Bio::PubMed and Bio::MEDLINE from BioRuby.

Chris Miller has posted example code which loops through a list of PMIDs and returns citations in BibTeX.

ADD COMMENTlink written 8.6 years ago by Neilfws48k
1

FWIW, I tried this method today and it no longer works. I'm not sure whether the package or the API changed, but I ended up using the following solution instead: 1) install [Zotero](https://www.zotero.org), if you haven't already. 2) Upload your list of PMIDs here and do a pubmed search: http://www.ncbi.nlm.nih.gov/sites/batchentrez?.  3) Use Zotero to batch import from the results page. 4) export a bibtex from Zotero.

ADD REPLYlink written 5.2 years ago by Chris Miller21k
1

Yes it seems a few things have changed.

  • Bio::PubMed::query() no longer works (returns nil)
  • Bio::PubMed::efetch() returns an array; elements can be converted to MEDLINE objects
  • Syntax for conversion to BibTeX has altered

This works for me:

require 'bio'
id = "18265351"
Bio::NCBI.default_email = "me@me.com"
e = Bio::PubMed::efetch(id)
m = Bio::MEDLINE.new(e[0])
bib = m.reference.format("bibtex")

# => "@article{PMID:18265351,\n  author       = {Brown, T. and Mackey, K. and Du, T.},\n  title        = {Analysis of RNA by northern and slot blot hybridization.},\n  journal      = {Curr Protoc Mol Biol},\n  year         = {2004},\n  volume       = {Chapter 4},\n  pages        = {Unit 4.9},\n  url          = {http://www.ncbi.nlm.nih.gov/pubmed/18265351},\n}\n"


ADD REPLYlink written 5.2 years ago by Neilfws48k

This still works. I've tried it earlier today. I was able to generate a .bib file out of a PUBMED ID list of more than 700 references.

ADD REPLYlink written 4.2 years ago by lcordeiro30
5
gravatar for Andra Waagmeester
8.6 years ago by
Maastricht, the Netherlands
Andra Waagmeester3.2k wrote:

jabref uses bibtex as standard storage format of references. You can directly download pubmed references from within jabref.

Mekentosj Papers also supports bibtex exports.

ADD COMMENTlink written 8.6 years ago by Andra Waagmeester3.2k

Same for CiteULike...

ADD REPLYlink written 8.6 years ago by Egon Willighagen5.2k
5
gravatar for Nick Loman
8.6 years ago by
Nick Loman610
United Kingdom
Nick Loman610 wrote:

I did something like this a while back and blogged on it: http://pathogenomics.bham.ac.uk/blog/2011/03/creating-my-perfect-citation-system-using-latex/

The Python code is at: https://github.com/nickloman/latex-pubmed

Feel free to fork it and improve it (and send me a pull request)

ADD COMMENTlink modified 7.2 years ago by brentp23k • written 8.6 years ago by Nick Loman610

thanks, this is great!

ADD REPLYlink written 7.2 years ago by brentp23k

@Nick This is great, but do you have it in Python 3 instead of Python 2?

ADD REPLYlink written 2.3 years ago by Tommy Carstensen200
1

I just wrote a Python 3 solution here:

ADD REPLYlink written 2.3 years ago by Tommy Carstensen200
2
gravatar for Stefano Berri
8.6 years ago by
Stefano Berri4.1k
Cambridge, UK
Stefano Berri4.1k wrote:

I use BibDesk, for Macs that let me do it. I looked at my bookmark and found this page with many tools to convert to bib files. You enter all your PMID in pubmed, export to xml and then convert xml to bib. Mendley Should let you do it as well somehow. I did it once to play around and it looked smooth. Most bibliogaphic tools should let you export to RIS and then from there convert to bibtex.

ADD COMMENTlink written 8.6 years ago by Stefano Berri4.1k
1
gravatar for ronald.findling
5.1 years ago by
Austria
ronald.findling10 wrote:

I normally use a combination of ris2xml and xml2bib (bibutils) similar to Stefano Berri description. If there is no easy ris export I use TexMed from http://www.bioinformatics.org, a website where you can enter a search-query and export the results as bibtex, the search-query can also be a list of pmids. Unfortunately the export needs to be taken with some caution because the tool might include unnecessary curly braces which you then have to remove.

ADD COMMENTlink modified 5.1 years ago • written 5.1 years ago by ronald.findling10
0
gravatar for csetzkorn
3.9 years ago by
csetzkorn0
csetzkorn0 wrote:

Hi there,

You can also use:

PubTransformer

online to achieve this. Just enter a pubmed PMID and it does the work for you.

HTH,

C

ADD COMMENTlink written 3.9 years ago by csetzkorn0
0
gravatar for by0
2.6 years ago by
by0110
United Kingdom
by0110 wrote:

http://pubtex.herokuapp.com/

ADD COMMENTlink written 2.6 years ago by by0110
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1871 users visited in the last hour