bild
School of
Electrical Engineering
and Computer Science

More on RefSense usage

pmid2text | pmid2bibtex | pmsearch | pmid2related | pmid2connotea | pmcomplete | taxonomy | lca | taxtree

pmid2text

Usage

 pmid2text [<options>] [<pubmed identifier>+]

Options

  -u, -h, --help
      This text.
  -i  No indentation of citations.
  -s  Simple, no indentation and no PMID.
  -y  Sort by publication year.
  -a  Show abstract.
  -w  Show an URL for retrieving article via PubMed.
  -www
      Show only the URL and nothing more.
  -rs Show a sole link to RefSense.
  -p  Show a link to abstracts at PubMed.
  -n 
      Max number of authors without using "et al". Set to zero to show
      all authors.
  -html
      Output as HTML for inclusion on a web page.
  -q  Quiet. No extraneous output.
If no PMID is given on the command line, STDIN is read until EOF and parsed for PMID:s. The expected format is a PMID first on each line, possibly followed by a space and any string.

pmid2bibtex

Usage

pmid2bibtex [<option>] [<pubmed identifier>+]

Options

  -u, -h, --help
      This text.
  -y  Sort by year.
  -ay BibTeX keys are composed as <1st author>, instead of <1st
      author>. Keys are no longer guaranteed to be unique.
  -ali
      BibTeX keys are composed as <1st author>-, i.e., first author's
      last name, followed by a dash and last digits of publication year.
      Keys are not guaranteed to be unique.
  -kp PubMed have trailing periods in most titles, but not all. To reduce
      confusion in certain BiBTeX styles, these periods are removed by
      this program. Using this option, you can choose to always keep the
      period.  Question and exclamation marks are always kept.
  -w  Include PubMed's URL reference in the record.
If no PMID is given on the command line, STDIN is read until EOF and parsed for PMID:s. The expected format is a PMID first on each line, possibly followed by a space and any string.

pmsearch

Usage

pmsearch [<options>] <search terms>+

Options

  -u         This text.
  -c         Return the number of matching items.
  -d <int>   The maximum number of PMID:s to report. Default: 100.
  -t <int>   The number of days from today to include in search.
  -w <int>   Warn when more than <int> identifiers are returned. Default: 100.

Search Terms

A search term is either a lone word that can match anything in a PubMed entry. The complete query is a conjunction of its terms. You can for example write 'pmsearch eisen yeast' and get back (at this writing) 31 PubMed identifiers. You may also write these search terms using the PubMed qualifiers to specify to what record in an entry a term should match. For example, writing pmsearch eisen[AU] yeast specifies that 'eisen' is an author. However, since the PubMed way of writing things is hard to remember (for me at least), a second way of qualifying terms is implemented. The general syntax in this case is:
  <qualifier>=<term>
where <qualifier> is one of
  author        au
  abstract      ab
  journal       jo
  title         ti
  year          ye
The previous example is then written as 'pmsearch author=eisen yeast'.

The journal titles can be hard to get right. Use either their full names (e.g. 'Molecular Biology and Evolution') or the official abbreviation ('Mol Biol Evol'). See the PubMed WWW site for details. In addition to the official abbreviations, pmsearch recognizes some additional common acronyms, which is translated to a name recognized by PubMed. Currently implemented are:

      Key   Journal
      psb = Pac Symp Biocomput
      jmb = J Mol Biol
     ismb = Proc Int Conf Intell Syst Mol Biol
      jme = J Mol Evol
      nar = Nucleic Acids Res
      mbe = Mol Biol Evol
     embo = EMBO J
     pnas = Proc Natl Acad Sci U S A
   cabios = Comput Appl Biosci
      jcb = J Comput Biol

pmid2related

Usage

 pmid2related [<options>] [<pubmed identifier>+]
If no PMIDs (PubMed identifiers) are provided on the commandline, then they are read from stdin instead. PMIDs from the input list is always removed from the output. Output is two columns with related PMID on the left and the relatedness score on the right.

Options

   -u       This text.
   -c       Only return the number of available linked entries.
   -1       Only first column, no score.
   -n <int> Limit to the best <int> related articles.
   -m <int> Minimum relatedness score. A score below this is ignored.
   -t <int> The number of days from today to include in search.

   -q       Less verbose output.

pmid2connotea

Usage

 pmid2connotea  [<pubmed identifier>+]
If no PMIDs (PubMed identifiers) are provided on the commandline, then they are read from stdin instead. PMIDs from the input list is always removed from the output.

pmcomplete

Usage

pmcomplete <progname> <string> <string>

This utility is intended to be used by the completion system in BASH and in conjunction with the command pubmed. Typical usage is to instruct BASH as follows:


  > complete -C pmcomplete pmid2text pmid2www pmid2bibtex

After a pubmed-search, the result is cached in a file in the user's home directory and used to filter out candidate PMID:s.

For example:

   > pubmed arvestad savolainen
   11005171   Savolainen P, Arvestad L, Lundeberg J (2000) "A novel method
              for forensic DNA investigations: repeat-type sequence analysis
              of tandemly repeated mtDNA in domestic dogs." J Forensic
              Sci 45(5), 990-999

   10742040   Savolainen P, Arvestad L, Lundeberg J (2000) "mtDNA tandem
              repeats in domestic dogs and wolves: mutation mechanism studied
              by analysis of the sequence of imperfect repeats." Mol Biol
              Evol 17(4), 474-488
Now trying to retrieve the abstract for the paper in J Forensic Sci, we ask for completion on the text fragment 'for':

   > pmid2text -a for<tab>

This will result in the 'for' string to be converted to 11005171, the proper PMID. Completion is done on all parts of the search result from pubmed, including PMID, author names, journal name, and title.

journalcomplete

Usage

journalcomplete <progname> <string> <string>

This utility is intended to be used by the completion system in BASH and in conjunction with the pubmed or pmsearch commands. Typical usage is to instruct BASH as follows:


  > complete -C journalcomplete pubmed pmsearch

This way, Bash will recognize when you are writing a journal name and hit TAB. For example, if you are composing a query for papers written by Smith in Nature Biotechnology, you write:
  > pubmed au=Smith journal=na
and then hit TAB. Bash will invoke journalcompete, which gives several suggestions:
Nat+Biotechnol         Nat+Protoc             Nat+Struct+Mol+Biol    nar
Nat+Cell+Biol          Nat+Rev+Mol+Cell+Biol  Nature
by filling in "t+b" and hitting TAB again, you will find the full journal name (or abbreviation) on the command line:
  > pubmed au=Smith journal=Nat+Biotechnol 
Try it out!

An important factor is that you need a file in your home directory called .refsense_journals. You can download such a file with more than 70 journals here. The format is very easy: one journal name per line, but you can also add a shorthand after a comma. For example,

Proc Int Conf Intell Syst Mol Biol, ismb
Proc Natl Acad Sci U S A, pnas
defines the shorthands ismb and pnas.

taxonomy

Usage

taxonomy [<options>] <search terms>+

Options

-u, -h, and --help returns this text!
The search terms are species names, common or latin, of living or extinct (ancient) animals.

Example

> taxonomy pig gallus+gallus
Scientific Name: Sus scrofa
    Common Name: pig
    Common Name: wild boar
    Common Name: swine
    Common Name: pigs
           Rank: species
       Division: Mammals
        Lineage: cellular organisms; Eukaryota; Fungi/Metazoa group; Metazoa; Eumetazoa; 
Bilateria; Coelomata; Deuterostomia; Chordata; Craniata; Vertebrata; Gnathostomata; Tele
ostomi; Euteleostomi; Sarcopterygii; Tetrapoda; Amniota; Mammalia; Theria;Eutheria; Laur
asiatheria; Cetartiodactyla; Suina; Suidae; Sus

Scientific Name: Gallus gallus
    Common Name: chicken
    Common Name: bantam
    Common Name: chickens
           Rank: species
       Division: Vertebrates
        Lineage: cellular organisms; Eukaryota; Fungi/Metazoa group; Metazoa; Eumetazoa;
 Bilateria; Coelomata; Deuterostomia; Chordata; Craniata; Vertebrata; Gnathostomata; Tel
eostomi; Euteleostomi; Sarcopterygii; Tetrapoda; Amniota; Sauropsida; Sauria; Archosauri
a; Aves; Neognathae; Galliformes; Phasianidae; Phasianinae; Gallus

lca

Usage

taxonomy   ... | lca 

Options

None

The command computes the last common ancestor of the given species.

Example

> taxonomy pig gallus+gallus human| lca
Amniota


taxtree

Usage

taxonomy   ... | taxtree 

Options

None

Assemble a Newick tree from the output of 'taxonomy'

Example

> taxonomy pig gallus+gallus human| taxtree
(Gallus_gallus, (Homo_sapiens, Sus_scrofa));


Published by: Lars Arvestad <arve@csc.kth.se>
Updated 2011-03-07