-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a0ec057
Showing
178 changed files
with
29,511 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: acfbbaecd20da8e792384ef7f306c5ac | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Binary file not shown.
Binary file added
BIN
+49.3 KB
.doctrees/bkbit.data_translators.anatomical_structure_translator.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+2.62 KB
.doctrees/bkbit.data_translators.library_generation_translator.doctree
Binary file not shown.
Binary file added
BIN
+5.76 KB
.doctrees/bkbit.data_translators.specimen_metadata_translator.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+3.09 KB
.doctrees/bkbit.model_editors.add_dunderMethods_genomeAnnotation.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
326 changes: 326 additions & 0 deletions
326
_modules/bkbit/data_translators/anatomical_structure_translator.html
Large diffs are not rendered by default.
Oops, something went wrong.
1,098 changes: 1,098 additions & 0 deletions
1,098
_modules/bkbit/data_translators/genome_annotation_translator.html
Large diffs are not rendered by default.
Oops, something went wrong.
159 changes: 159 additions & 0 deletions
159
_modules/bkbit/data_translators/specimen_metadata_translator.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
|
||
|
||
<!DOCTYPE html> | ||
<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" /> | ||
<title>bkbit.data_translators.specimen_metadata_translator — bkbit documentation</title> | ||
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=80d5e7a1" /> | ||
<link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css?v=e59714d7" /> | ||
|
||
|
||
<script src="../../../_static/jquery.js?v=5d32c60e"></script> | ||
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script> | ||
<script src="../../../_static/documentation_options.js?v=5929fcd5"></script> | ||
<script src="../../../_static/doctools.js?v=9bcbadda"></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" /> | ||
</head> | ||
|
||
<body class="wy-body-for-nav"> | ||
<div class="wy-grid-for-nav"> | ||
<nav data-toggle="wy-nav-shift" class="wy-nav-side"> | ||
<div class="wy-side-scroll"> | ||
<div class="wy-side-nav-search" > | ||
|
||
|
||
|
||
<a href="../../../index.html" class="icon icon-home"> | ||
bkbit | ||
</a> | ||
<div role="search"> | ||
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get"> | ||
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" /> | ||
<input type="hidden" name="check_keywords" value="yes" /> | ||
<input type="hidden" name="area" value="default" /> | ||
</form> | ||
</div> | ||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu"> | ||
<p class="caption" role="heading"><span class="caption-text">GETTING STARTED</span></p> | ||
<ul> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../install.html">Installation</a></li> | ||
</ul> | ||
<p class="caption" role="heading"><span class="caption-text">DATA TRANSLATORS</span></p> | ||
<ul> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../specimen_file_manifest.html">Specimen File Manifest</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../specimen_metadata.html">Specimen Metadata</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../genome_annotation.html">Annotated Genome Data</a></li> | ||
</ul> | ||
<p class="caption" role="heading"><span class="caption-text">MODEL CONVERTERS</span></p> | ||
<ul> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../spreadsheet_converter.html">Spreadsheet to LinkML Schema</a></li> | ||
</ul> | ||
<p class="caption" role="heading"><span class="caption-text">MODEL EDITORS</span></p> | ||
<ul> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../linkml_trimmer.html">LinkML Schema Trimmer</a></li> | ||
</ul> | ||
<p class="caption" role="heading"><span class="caption-text">REFERENCE</span></p> | ||
<ul> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../modules.html">bkbit</a></li> | ||
</ul> | ||
|
||
</div> | ||
</div> | ||
</nav> | ||
|
||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" > | ||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i> | ||
<a href="../../../index.html">bkbit</a> | ||
</nav> | ||
|
||
<div class="wy-nav-content"> | ||
<div class="rst-content"> | ||
<div role="navigation" aria-label="Page navigation"> | ||
<ul class="wy-breadcrumbs"> | ||
<li><a href="../../../index.html" class="icon icon-home" aria-label="Home"></a></li> | ||
<li class="breadcrumb-item"><a href="../../index.html">Module code</a></li> | ||
<li class="breadcrumb-item active">bkbit.data_translators.specimen_metadata_translator</li> | ||
<li class="wy-breadcrumbs-aside"> | ||
</li> | ||
</ul> | ||
<hr/> | ||
</div> | ||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> | ||
<div itemprop="articleBody"> | ||
|
||
<h1>Source code for bkbit.data_translators.specimen_metadata_translator</h1><div class="highlight"><pre> | ||
<span></span><span class="kn">import</span> <span class="nn">csv</span> | ||
<span class="kn">import</span> <span class="nn">click</span> | ||
|
||
<div class="viewcode-block" id="extract_specimen_ids"> | ||
<a class="viewcode-back" href="../../../bkbit.data_translators.specimen_metadata_translator.html#bkbit.data_translators.specimen_metadata_translator.extract_specimen_ids">[docs]</a> | ||
<span class="k">def</span> <span class="nf">extract_specimen_ids</span><span class="p">(</span><span class="n">csv_file_path</span><span class="p">):</span> | ||
<span class="w"> </span><span class="sd">"""</span> | ||
<span class="sd"> Reads a CSV file and prints the 'Specimen ID' column to the command line.</span> | ||
|
||
<span class="sd"> Parameters:</span> | ||
<span class="sd"> - csv_file_path: str, path to the input CSV file.</span> | ||
<span class="sd"> """</span> | ||
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">csv_file_path</span><span class="p">,</span> <span class="s1">'r'</span><span class="p">,</span> <span class="n">encoding</span><span class="o">=</span><span class="s1">'utf-8'</span><span class="p">)</span> <span class="k">as</span> <span class="n">csv_file</span><span class="p">:</span> | ||
<span class="n">reader</span> <span class="o">=</span> <span class="n">csv</span><span class="o">.</span><span class="n">DictReader</span><span class="p">(</span><span class="n">csv_file</span><span class="p">)</span> | ||
|
||
<span class="c1"># Ensure 'Specimen ID' column exists in the CSV</span> | ||
<span class="k">if</span> <span class="s1">'Specimen ID'</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">reader</span><span class="o">.</span><span class="n">fieldnames</span><span class="p">:</span> | ||
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">"The CSV file does not contain the 'Specimen ID' column."</span><span class="p">)</span> | ||
|
||
<span class="c1"># Print 'Specimen ID' values to the command line</span> | ||
<span class="k">for</span> <span class="n">row</span> <span class="ow">in</span> <span class="n">reader</span><span class="p">:</span> | ||
<span class="n">specimen_id</span> <span class="o">=</span> <span class="n">row</span><span class="p">[</span><span class="s1">'Specimen ID'</span><span class="p">]</span> | ||
<span class="k">if</span> <span class="n">specimen_id</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">"LA"</span><span class="p">):</span> | ||
<span class="nb">print</span><span class="p">(</span><span class="n">specimen_id</span><span class="p">)</span></div> | ||
|
||
|
||
<span class="nd">@click</span><span class="o">.</span><span class="n">command</span> | ||
<span class="nd">@click</span><span class="o">.</span><span class="n">argument</span><span class="p">(</span><span class="s1">'specimen_metadata_file_path'</span><span class="p">)</span> | ||
|
||
<span class="k">def</span> <span class="nf">list_library_aliquot</span><span class="p">(</span><span class="n">specimen_metadata_file_path</span><span class="p">):</span> | ||
<span class="w"> </span><span class="sd">"""</span> | ||
<span class="sd"> Extracts and prints all the Library Aliquot NHash IDs from Data Catalog's specimen metadata file.</span> | ||
|
||
<span class="sd"> Args:</span> | ||
<span class="sd"> specimen_metadata_file_path (str): Path to the specimen metadata file.</span> | ||
<span class="sd"> """</span> | ||
<span class="n">extract_specimen_ids</span><span class="p">(</span><span class="n">specimen_metadata_file_path</span><span class="p">)</span> | ||
|
||
<span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s1">'__main__'</span><span class="p">:</span> | ||
<span class="n">list_library_aliquot</span><span class="p">()</span> | ||
</pre></div> | ||
|
||
</div> | ||
</div> | ||
<footer> | ||
|
||
<hr/> | ||
|
||
<div role="contentinfo"> | ||
<p>© Copyright 2024, BICAN.</p> | ||
</div> | ||
|
||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a | ||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> | ||
provided by <a href="https://readthedocs.org">Read the Docs</a>. | ||
|
||
|
||
</footer> | ||
</div> | ||
</div> | ||
</section> | ||
</div> | ||
<script> | ||
jQuery(function () { | ||
SphinxRtdTheme.Navigation.enable(true); | ||
}); | ||
</script> | ||
|
||
</body> | ||
</html> |
Oops, something went wrong.