Tripal
|
Functions | |
tripal_pub_remote_alter_form_PMID ($form, $form_state, $num_criteria=1) | |
tripal_pub_remote_validate_form_PMID ($form, $form_state) | |
tripal_pub_remote_search_PMID ($search_array, $num_to_retrieve, $page) | |
tripal_pub_PMID_search_init ($search_str, $retmax) | |
tripal_pub_PMID_fetch ($query_key, $web_env, $rettype='null', $retmod='null', $start=0, $limit=10, $args=[]) | |
tripal_pub_PMID_parse_pubxml ($pub_xml) | |
tripal_pub_PMID_parse_medline_journal_info ($xml, &$pub) | |
tripal_pub_PMID_parse_article ($xml, &$pub) | |
tripal_pub_PMID_parse_publication_type ($xml, &$pub) | |
tripal_pub_PMID_parse_abstract ($xml, &$pub) | |
tripal_pub_PMID_parse_pagination ($xml, &$pub) | |
tripal_pub_PMID_parse_journal ($xml, &$pub) | |
tripal_pub_PMID_parse_journal_issue ($xml, &$pub) | |
tripal_pub_PMID_parse_date ($xml, $element_name) | |
tripal_pub_PMID_parse_authorlist ($xml, &$pub) | |
tripal_pub_remote_search_get_language ($lang_abbr) | |
This file provides support for importing and parsing of results from the NCBI PubMed database. The functions here are used by both the publication importer setup form and the publication importer.
tripal_pub_PMID_fetch | ( | $query_key, | |
$web_env, | |||
$rettype = 'null' , |
|||
$retmod = 'null' , |
|||
$start = 0 , |
|||
$limit = 10 , |
|||
$args = [] |
|||
) |
Retrieves from PubMed a set of publications from the previously initiated query.
$query_key | The esearch QueryKey |
$web_env | The esearch WebEnv |
$rettype | The efetch return type |
$retmod | The efetch return mode |
$start | The start of the range to retrieve |
$limit | The number of publications to retrieve |
$args | Any additional arguments to add the efetch query URL |
tripal_pub_PMID_parse_abstract | ( | $xml, | |
& | $pub | ||
) |
Parses the section from the XML returned from PubMed that contains information about the abstract
$xml | The XML to parse |
$pub | The publication object to which additional details will be added |
tripal_pub_PMID_parse_article | ( | $xml, | |
& | $pub | ||
) |
Parses the section from the XML returned from PubMed that contains information about an article.
$xml | The XML to parse |
$pub | The publication object to which additional details will be added |
tripal_pub_PMID_parse_authorlist | ( | $xml, | |
& | $pub | ||
) |
Parses the section from the XML returned from PubMed that contains information about the author list for a publication
$xml | The XML to parse |
$pub | The publication object to which additional details will be added |
tripal_pub_PMID_parse_date | ( | $xml, | |
$element_name | |||
) |
Parses the section from the XML returned from PubMed that contains information regarding to dates
$xml | The XML to parse |
$pub | The publication object to which additional details will be added |
tripal_pub_PMID_parse_journal | ( | $xml, | |
& | $pub | ||
) |
Parses the section from the XML returned from PubMed that contains information about a journal
$xml | The XML to parse |
$pub | The publication object to which additional details will be added |
tripal_pub_PMID_parse_journal_issue | ( | $xml, | |
& | $pub | ||
) |
Parses the section from the XML returned from PubMed that contains information about a journal issue
$xml | The XML to parse |
$pub | The publication object to which additional details will be added |
tripal_pub_PMID_parse_medline_journal_info | ( | $xml, | |
& | $pub | ||
) |
Parses the section from the XML returned from PubMed that contains information about the Journal
$xml | The XML to parse |
$pub | The publication object to which additional details will be added |
tripal_pub_PMID_parse_pagination | ( | $xml, | |
& | $pub | ||
) |
Parses the section from the XML returned from PubMed that contains information about pagination
$xml | The XML to parse |
$pub | The publication object to which additional details will be added |
tripal_pub_PMID_parse_publication_type | ( | $xml, | |
& | $pub | ||
) |
Parses the section from the XML returned from PubMed that contains information about a publication
A full list of publication types can be found here: http://www.nlm.nih.gov/mesh/pubtypes.html.
The Tripal Pub ontology doesn't yet have terms for all of the publication types so we store the value in the 'publication_type' term.
$xml | The XML to parse |
$pub | The publication object to which additional details will be added |
tripal_pub_PMID_parse_pubxml | ( | $pub_xml | ) |
This function parses the XML containing details of a publication and converts it into an associative array of where keys are Tripal Pub ontology terms and the values are extracted from the XML. The XML should contain only a single publication record.
Information about the valid elements in the PubMed XML can be found here: https://www.nlm.nih.gov/bsd/licensee/elements_descriptions.html
Information about PubMed's citation format can be found here https://www.nlm.nih.gov/bsd/policy/cit_format.html
$pub_xml | An XML string describing a single publication |
tripal_pub_PMID_search_init | ( | $search_str, | |
$retmax | |||
) |
Initailizes a PubMed Search using a given search string
$search_str | The PubMed Search string |
$retmax | The maximum number of records to return |
tripal_pub_remote_alter_form_PMID | ( | $form, | |
$form_state, | |||
$num_criteria = 1 |
|||
) |
A hook for altering the publication importer form. It Changes the 'Abstract' filter to be 'Abstract/Title'.
$form | The Drupal form array |
$form_state | The form state array |
$num_criteria | The number of criteria the user currently has added to the form |
tripal_pub_remote_search_get_language | ( | $lang_abbr | ) |
Get the name of the language based on an abbreviation
Language abbreviations were obtained here: http://www.nlm.nih.gov/bsd/language_table.html
$lang_abbr | The abbreviation of the language to return |
tripal_pub_remote_search_PMID | ( | $search_array, | |
$num_to_retrieve, | |||
$page | |||
) |
A hook for performing the search on the PubMed database.
$search_array | An array containing the search criteria for the search |
$num_to_retrieve | Indicates the maximum number of publications to retrieve from the remote database |
$page | Indicates the page to retrieve. This corresponds to a paged table, where each page has $num_to_retrieve publications. |
tripal_pub_remote_validate_form_PMID | ( | $form, | |
$form_state | |||
) |
A hook for providing additional validation of importer setup form.
$form | The Drupal form array |
$form_state | The form state array |