| |
- checkVersion()
- Checks if software is up-to-date; returns True (up-to-date) or False.
- echo(string)
- Echoes [string] when command line is used a la:
$ ./pm2xl.py echo('foo') # outputs "foo".
Note: strings must be surrounded by single quotation marks or escaped
double quotations. In Linux, escaping parenthesis might also be necessary.
Note: If "DEBUG" is passed as the last argument, Python error messages
will be printed to screen instead of "1".
- inspectStyle(styleSheet='styles/default.xml')
- Returns list of tuples with column title and whether cell will be
hyperlinked (True) or not (False) for a given [styleSheet].
- main()
- Checks if command line is being used, if so uses eval() to execute called
functions.
- makeHarvest(term, offset=0, limit=100, addParams='', outputPrefix=None, harvestLimit=1, timeStamp=False)
- Makes XML citation files for a given search [term] using the PubMed
ESearch API:
- starts with citation in [offset] position,
- harvests [limit] citations at time,
- uses optional [addParams] string to send additional GET parameters to
PubMed API,
- names output files with optional [outputPrefix] string,
- limits harvest request to optional [harvestLimit] value,
- timestamps output files if [timeStamp] == True.
Returns list of newly created XML files.
ESearch info: http://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.ESearch
- makeLists(PMID_file, chunkSize=500, outputPrefix=None)
- Makes PMID text file(s) from one [PMID_file]:
- makes new file for every [chunkSize] PMIDs,
- names output files with optional [outputPrefix] string.
Returns list of newly created text files.
- makeSheet(pubmedXML, outputFile='output/_makeSheet.xls', styleSheet='styles/default.xml', addBooks=False, showProgress=False)
- Makes spreadsheet file from a PubMed XML file, [pubmedXML]:
- names file as [outputFile],
- uses the [styleSheet] to parse the XML file,
- uses optional [addBooks=True] to allow book citations in spreadsheet,
- uses optional [showProgress=True] to show progress in real-time.
Returns [outFile].
- makeXML(PMIDs, outputFile='output/_makeXML.xml')
- Makes XML citation file from a list of [PMIDs] using PubMed EFetch API;
names file as [outputFile].
Returns [outFile].
EFetch info: http://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.EFetch
- returnList(PMID_file)
- Returns list of PMIDs from a text [PMID_file].
- returnSearch(term, offset=0, limit=100, addParams='')
- Returns list of PMIDs from PubMed ESearch API for a given search [term]:
- starts with citation in [offset] position,
- requests [limit] citations at time,
- uses optional [addParams] string to send additional GET parameters to
PubMed API.
ESearch info: http://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.ESearch
|