Skip to content

Commit

Permalink
deploy: 111cdbc
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-E-Rose committed Aug 19, 2024
1 parent e0b18ee commit b6d6898
Show file tree
Hide file tree
Showing 19 changed files with 282 additions and 185 deletions.
2 changes: 1 addition & 1 deletion .buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 18bab0713659a3e0a8054d4799da3b04
config: 4403808061e5ec20fbfa783a07f2c982
tags: 645f666f9bcd5a90fca523b33c5a78b7
8 changes: 4 additions & 4 deletions _modules/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en">
<html class="writer-html5" lang="en" data-content_root="../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
Expand All @@ -14,9 +14,9 @@

<script src="../_static/jquery.js?v=5d32c60e"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=4e78f113"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<script src="../_static/documentation_options.js?v=6c02275b"></script>
<script src="../_static/doctools.js?v=9a2dae69"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
Expand Down
18 changes: 12 additions & 6 deletions _modules/pubmed_parser/medline_parser.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en">
<html class="writer-html5" lang="en" data-content_root="../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
Expand All @@ -14,9 +14,9 @@

<script src="../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=4e78f113"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<script src="../../_static/documentation_options.js?v=6c02275b"></script>
<script src="../../_static/doctools.js?v=9a2dae69"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
Expand Down Expand Up @@ -412,7 +412,9 @@ <h1>Source code for pubmed_parser.medline_parser</h1><div class="highlight"><pre
<span class="k">return</span> <span class="n">dict_info</span>


<div class="viewcode-block" id="parse_grant_id"><a class="viewcode-back" href="../../api.html#pubmed_parser.parse_grant_id">[docs]</a><span class="k">def</span> <span class="nf">parse_grant_id</span><span class="p">(</span><span class="n">pubmed_article</span><span class="p">):</span>
<div class="viewcode-block" id="parse_grant_id">
<a class="viewcode-back" href="../../api.html#pubmed_parser.parse_grant_id">[docs]</a>
<span class="k">def</span> <span class="nf">parse_grant_id</span><span class="p">(</span><span class="n">pubmed_article</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Parse Grant ID and related information from a given MEDLINE tree</span>

<span class="sd"> Parameters</span>
Expand Down Expand Up @@ -465,6 +467,7 @@ <h1>Source code for pubmed_parser.medline_parser</h1><div class="highlight"><pre
<span class="k">return</span> <span class="n">grant_list</span></div>



<span class="k">def</span> <span class="nf">parse_author_affiliation</span><span class="p">(</span><span class="n">medline</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Parse MEDLINE authors and their corresponding affiliations</span>

Expand Down Expand Up @@ -769,7 +772,9 @@ <h1>Source code for pubmed_parser.medline_parser</h1><div class="highlight"><pre
<span class="k">return</span> <span class="n">dict_out</span>


<div class="viewcode-block" id="parse_medline_xml"><a class="viewcode-back" href="../../api.html#pubmed_parser.parse_medline_xml">[docs]</a><span class="k">def</span> <span class="nf">parse_medline_xml</span><span class="p">(</span>
<div class="viewcode-block" id="parse_medline_xml">
<a class="viewcode-back" href="../../api.html#pubmed_parser.parse_medline_xml">[docs]</a>
<span class="k">def</span> <span class="nf">parse_medline_xml</span><span class="p">(</span>
<span class="n">path</span><span class="p">,</span>
<span class="n">year_info_only</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
<span class="n">nlm_category</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
Expand Down Expand Up @@ -839,6 +844,7 @@ <h1>Source code for pubmed_parser.medline_parser</h1><div class="highlight"><pre
<span class="n">res</span><span class="p">[</span><span class="s1">&#39;grant_ids&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">parse_grant_id</span><span class="p">(</span><span class="n">element</span><span class="p">)</span>
<span class="n">element</span><span class="o">.</span><span class="n">clear</span><span class="p">()</span>
<span class="k">yield</span> <span class="n">res</span></div>

</pre></div>

</div>
Expand Down
33 changes: 24 additions & 9 deletions _modules/pubmed_parser/pubmed_oa_parser.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en">
<html class="writer-html5" lang="en" data-content_root="../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
Expand All @@ -14,9 +14,9 @@

<script src="../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=4e78f113"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<script src="../../_static/documentation_options.js?v=6c02275b"></script>
<script src="../../_static/doctools.js?v=9a2dae69"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
Expand Down Expand Up @@ -209,7 +209,9 @@ <h1>Source code for pubmed_parser.pubmed_oa_parser</h1><div class="highlight"><p
<span class="k">yield</span> <span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">el</span><span class="o">.</span><span class="n">itertext</span><span class="p">())</span>


<div class="viewcode-block" id="parse_pubmed_xml"><a class="viewcode-back" href="../../api.html#pubmed_parser.parse_pubmed_xml">[docs]</a><span class="k">def</span> <span class="nf">parse_pubmed_xml</span><span class="p">(</span><span class="n">path</span><span class="p">,</span> <span class="n">include_path</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">nxml</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
<div class="viewcode-block" id="parse_pubmed_xml">
<a class="viewcode-back" href="../../api.html#pubmed_parser.parse_pubmed_xml">[docs]</a>
<span class="k">def</span> <span class="nf">parse_pubmed_xml</span><span class="p">(</span><span class="n">path</span><span class="p">,</span> <span class="n">include_path</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">nxml</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Given an input XML path to PubMed XML file, extract information and metadata</span>
<span class="sd"> from a given XML file and return parsed XML file in dictionary format.</span>
Expand Down Expand Up @@ -347,6 +349,7 @@ <h1>Source code for pubmed_parser.pubmed_oa_parser</h1><div class="highlight"><p
<span class="k">return</span> <span class="n">dict_out</span></div>



<span class="k">def</span> <span class="nf">get_reference</span><span class="p">(</span><span class="n">reference</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Get reference from one of the three possible positions.&quot;&quot;&quot;</span>
<span class="k">for</span> <span class="n">tag</span> <span class="ow">in</span> <span class="p">[</span><span class="s2">&quot;mixed-citation&quot;</span><span class="p">,</span> <span class="s2">&quot;element-citation&quot;</span><span class="p">,</span> <span class="s2">&quot;citation&quot;</span><span class="p">]:</span>
Expand All @@ -356,7 +359,9 @@ <h1>Source code for pubmed_parser.pubmed_oa_parser</h1><div class="highlight"><p
<span class="k">return</span> <span class="kc">None</span>


<div class="viewcode-block" id="parse_pubmed_references"><a class="viewcode-back" href="../../api.html#pubmed_parser.parse_pubmed_references">[docs]</a><span class="k">def</span> <span class="nf">parse_pubmed_references</span><span class="p">(</span><span class="n">path</span><span class="p">):</span>
<div class="viewcode-block" id="parse_pubmed_references">
<a class="viewcode-back" href="../../api.html#pubmed_parser.parse_pubmed_references">[docs]</a>
<span class="k">def</span> <span class="nf">parse_pubmed_references</span><span class="p">(</span><span class="n">path</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Given path to xml file, parse references articles</span>
<span class="sd"> to list of dictionary</span>
Expand Down Expand Up @@ -445,7 +450,10 @@ <h1>Source code for pubmed_parser.pubmed_oa_parser</h1><div class="highlight"><p
<span class="k">return</span> <span class="n">dict_refs</span></div>


<div class="viewcode-block" id="parse_pubmed_paragraph"><a class="viewcode-back" href="../../api.html#pubmed_parser.parse_pubmed_paragraph">[docs]</a><span class="k">def</span> <span class="nf">parse_pubmed_paragraph</span><span class="p">(</span><span class="n">path</span><span class="p">,</span> <span class="n">all_paragraph</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>

<div class="viewcode-block" id="parse_pubmed_paragraph">
<a class="viewcode-back" href="../../api.html#pubmed_parser.parse_pubmed_paragraph">[docs]</a>
<span class="k">def</span> <span class="nf">parse_pubmed_paragraph</span><span class="p">(</span><span class="n">path</span><span class="p">,</span> <span class="n">all_paragraph</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Give path to a given PubMed OA file, parse and return</span>
<span class="sd"> a dictionary of all paragraphs, section that it belongs to,</span>
Expand Down Expand Up @@ -505,7 +513,10 @@ <h1>Source code for pubmed_parser.pubmed_oa_parser</h1><div class="highlight"><p
<span class="k">return</span> <span class="n">dict_pars</span></div>


<div class="viewcode-block" id="parse_pubmed_caption"><a class="viewcode-back" href="../../api.html#pubmed_parser.parse_pubmed_caption">[docs]</a><span class="k">def</span> <span class="nf">parse_pubmed_caption</span><span class="p">(</span><span class="n">path</span><span class="p">):</span>

<div class="viewcode-block" id="parse_pubmed_caption">
<a class="viewcode-back" href="../../api.html#pubmed_parser.parse_pubmed_caption">[docs]</a>
<span class="k">def</span> <span class="nf">parse_pubmed_caption</span><span class="p">(</span><span class="n">path</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Given single xml path, extract figure caption and</span>
<span class="sd"> reference id back to that figure</span>
Expand Down Expand Up @@ -581,6 +592,7 @@ <h1>Source code for pubmed_parser.pubmed_oa_parser</h1><div class="highlight"><p
<span class="k">return</span> <span class="n">dict_captions</span></div>



<span class="k">def</span> <span class="nf">table_to_df</span><span class="p">(</span><span class="n">table_text</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> This is a function to transform an input table XML text to list of row values and columns.</span>
Expand Down Expand Up @@ -620,7 +632,9 @@ <h1>Source code for pubmed_parser.pubmed_oa_parser</h1><div class="highlight"><p
<span class="k">return</span> <span class="kc">None</span><span class="p">,</span> <span class="kc">None</span>


<div class="viewcode-block" id="parse_pubmed_table"><a class="viewcode-back" href="../../api.html#pubmed_parser.parse_pubmed_table">[docs]</a><span class="k">def</span> <span class="nf">parse_pubmed_table</span><span class="p">(</span><span class="n">path</span><span class="p">,</span> <span class="n">return_xml</span><span class="o">=</span><span class="kc">True</span><span class="p">):</span>
<div class="viewcode-block" id="parse_pubmed_table">
<a class="viewcode-back" href="../../api.html#pubmed_parser.parse_pubmed_table">[docs]</a>
<span class="k">def</span> <span class="nf">parse_pubmed_table</span><span class="p">(</span><span class="n">path</span><span class="p">,</span> <span class="n">return_xml</span><span class="o">=</span><span class="kc">True</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Parse table from given Pubmed Open-Access XML file</span>

Expand Down Expand Up @@ -692,6 +706,7 @@ <h1>Source code for pubmed_parser.pubmed_oa_parser</h1><div class="highlight"><p
<span class="k">return</span> <span class="n">table_dicts</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">return</span> <span class="kc">None</span></div>

</pre></div>

</div>
Expand Down
23 changes: 16 additions & 7 deletions _modules/pubmed_parser/pubmed_web_parser.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en">
<html class="writer-html5" lang="en" data-content_root="../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
Expand All @@ -14,9 +14,9 @@

<script src="../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=4e78f113"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<script src="../../_static/documentation_options.js?v=6c02275b"></script>
<script src="../../_static/doctools.js?v=9a2dae69"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
Expand Down Expand Up @@ -243,7 +243,9 @@ <h1>Source code for pubmed_parser.pubmed_web_parser</h1><div class="highlight"><
<span class="k">return</span> <span class="n">dict_out</span>


<div class="viewcode-block" id="parse_xml_web"><a class="viewcode-back" href="../../api.html#pubmed_parser.parse_xml_web">[docs]</a><span class="k">def</span> <span class="nf">parse_xml_web</span><span class="p">(</span><span class="n">pmid</span><span class="p">,</span> <span class="n">sleep</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">save_xml</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
<div class="viewcode-block" id="parse_xml_web">
<a class="viewcode-back" href="../../api.html#pubmed_parser.parse_xml_web">[docs]</a>
<span class="k">def</span> <span class="nf">parse_xml_web</span><span class="p">(</span><span class="n">pmid</span><span class="p">,</span> <span class="n">sleep</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">save_xml</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Give an input PMID, load and parse XML using PubMed eutils</span>

Expand Down Expand Up @@ -288,6 +290,7 @@ <h1>Source code for pubmed_parser.pubmed_web_parser</h1><div class="highlight"><
<span class="k">return</span> <span class="n">dict_out</span></div>



<span class="k">def</span> <span class="nf">extract_citations</span><span class="p">(</span><span class="n">tree</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Extract number of citations from a given eutils XML tree.</span>
Expand Down Expand Up @@ -384,7 +387,9 @@ <h1>Source code for pubmed_parser.pubmed_web_parser</h1><div class="highlight"><
<span class="k">return</span> <span class="p">{</span><span class="s2">&quot;pmc&quot;</span><span class="p">:</span> <span class="n">pmc</span><span class="p">,</span> <span class="s2">&quot;pmid&quot;</span><span class="p">:</span> <span class="n">pmid</span><span class="p">,</span> <span class="s2">&quot;doi&quot;</span><span class="p">:</span> <span class="n">doi</span><span class="p">}</span>


<div class="viewcode-block" id="parse_citation_web"><a class="viewcode-back" href="../../api.html#pubmed_parser.parse_citation_web">[docs]</a><span class="k">def</span> <span class="nf">parse_citation_web</span><span class="p">(</span><span class="n">doc_id</span><span class="p">,</span> <span class="n">id_type</span><span class="o">=</span><span class="s2">&quot;PMC&quot;</span><span class="p">):</span>
<div class="viewcode-block" id="parse_citation_web">
<a class="viewcode-back" href="../../api.html#pubmed_parser.parse_citation_web">[docs]</a>
<span class="k">def</span> <span class="nf">parse_citation_web</span><span class="p">(</span><span class="n">doc_id</span><span class="p">,</span> <span class="n">id_type</span><span class="o">=</span><span class="s2">&quot;PMC&quot;</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Parse citations from given document id</span>

Expand Down Expand Up @@ -451,7 +456,10 @@ <h1>Source code for pubmed_parser.pubmed_web_parser</h1><div class="highlight"><
<span class="k">return</span> <span class="n">dict_out</span></div>


<div class="viewcode-block" id="parse_outgoing_citation_web"><a class="viewcode-back" href="../../api.html#pubmed_parser.parse_outgoing_citation_web">[docs]</a><span class="k">def</span> <span class="nf">parse_outgoing_citation_web</span><span class="p">(</span><span class="n">doc_id</span><span class="p">,</span> <span class="n">id_type</span><span class="o">=</span><span class="s2">&quot;PMC&quot;</span><span class="p">):</span>

<div class="viewcode-block" id="parse_outgoing_citation_web">
<a class="viewcode-back" href="../../api.html#pubmed_parser.parse_outgoing_citation_web">[docs]</a>
<span class="k">def</span> <span class="nf">parse_outgoing_citation_web</span><span class="p">(</span><span class="n">doc_id</span><span class="p">,</span> <span class="n">id_type</span><span class="o">=</span><span class="s2">&quot;PMC&quot;</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> A function to load citations from NCBI eutils API for a given document</span>

Expand Down Expand Up @@ -507,6 +515,7 @@ <h1>Source code for pubmed_parser.pubmed_web_parser</h1><div class="highlight"><
<span class="s2">&quot;pmid_cited&quot;</span><span class="p">:</span> <span class="n">pmid_cited_all</span><span class="p">,</span>
<span class="p">}</span>
<span class="k">return</span> <span class="n">dict_out</span></div>

</pre></div>

</div>
Expand Down
Loading

0 comments on commit b6d6898

Please sign in to comment.