1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-09 17:02:03 +02:00

(v0.9.0) website fixes

This commit is contained in:
2019-11-30 12:01:50 +01:00
parent c9aefd1841
commit 56ce9bf665
21 changed files with 300 additions and 302 deletions

View File

@ -51,7 +51,7 @@
<script src="../extra.js"></script>
<meta property="og:title" content="Property of a microorganism — mo_property" />
<meta property="og:description" content="Use these functions to return a specific property of a microorganism. All input values will be evaluated internally with as.mo(), which makes it possible for input of these functions to use microbial abbreviations, codes and names. See Examples." />
<meta property="og:description" content="Use these functions to return a specific property of a microorganism. All input values will be evaluated internally with as.mo(), which makes it possible to use microbial abbreviations, codes and names as input. Please see Examples." />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@ -234,7 +234,7 @@
</div>
<div class="ref-description">
<p>Use these functions to return a specific property of a microorganism. All input values will be evaluated internally with <code><a href='as.mo.html'>as.mo()</a></code>, which makes it possible for input of these functions to use microbial abbreviations, codes and names. See Examples.</p>
<p>Use these functions to return a specific property of a microorganism. All input values will be evaluated internally with <code><a href='as.mo.html'>as.mo()</a></code>, which makes it possible to use microbial abbreviations, codes and names as input. Please see <em>Examples</em>.</p>
</div>
<pre class="usage"><span class='fu'>mo_name</span>(<span class='no'>x</span>, <span class='kw'>language</span> <span class='kw'>=</span> <span class='fu'><a href='translate.html'>get_locale</a></span>(), <span class='no'>...</span>)
@ -311,7 +311,7 @@
<ul>
<li><p>An <code><a href='https://rdrr.io/r/base/integer.html'>integer</a></code> in case of <code>mo_year()</code></p></li>
<li><p>A <code><a href='https://rdrr.io/r/base/list.html'>list</a></code> in case of <code>mo_taxonomy()</code></p></li>
<li><p>A <code><a href='https://rdrr.io/r/base/list.html'>list</a></code> in case of <code>mo_taxonomy()</code> and <code>mo_info()</code></p></li>
<li><p>A named <code><a href='https://rdrr.io/r/base/character.html'>character</a></code> in case of <code>mo_url()</code></p></li>
<li><p>A <code><a href='https://rdrr.io/r/base/character.html'>character</a></code> in all other cases</p></li>
</ul>
@ -324,7 +324,7 @@
<li><p><code>mo_ref("Chlamydophila psittaci")</code> will return <code>"Everett et al., 1999"</code> (without a warning)</p></li>
</ul>
<p>The Gram stain - <code>mo_gramstain()</code> - will be determined on the taxonomic kingdom and phylum. According to Cavalier-Smith (2002) who defined subkingdoms Negibacteria and Posibacteria, only these phyla are Posibacteria: Actinobacteria, Chloroflexi, Firmicutes and Tenericutes. These bacteria are considered Gram positive - all other bacteria are considered Gram negative. Species outside the kingdom of Bacteria will return a value <code>NA</code>.</p>
<p>The Gram stain - <code>mo_gramstain()</code> - will be determined on the taxonomic kingdom and phylum. According to Cavalier-Smith (2002) who defined subkingdoms Negibacteria and Posibacteria, only these phyla are Posibacteria: Actinobacteria, Chloroflexi, Firmicutes and Tenericutes. These bacteria are considered Gram-positive - all other bacteria are considered Gram-negative. Species outside the kingdom of Bacteria will return a value <code>NA</code>.</p>
<p>All output will be <a href='translate.html'>translate</a>d where possible.</p>
<p>The function <code>mo_url()</code> will return the direct URL to the online database entry, which also shows the scientific reference of the concerned species.</p>
<h2 class="hasAnchor" id="catalogue-of-life"><a class="anchor" href="#catalogue-of-life"></a>Catalogue of Life</h2>

View File

@ -260,12 +260,12 @@ This is the fastest way to have your organisation (or analysis) specific codes p
<p>Reading an Excel file (<code>.xlsx</code>) with only one row has a size of 8-9 kB. The compressed file used by this package will have a size of 0.1 kB and can be read by <code>get_mo_source()</code> in only a couple of microseconds (a millionth of a second).</p><h3>How it works</h3>
<p>Imagine this data on a sheet of an Excel file (mo codes were looked up in the <code>microorganisms</code> data set). The first column contains the organisation specific codes, the second column contains an MO code from this package:</p><pre> | A | B |
--|--------------------|-------------|
1 | Organisation XYZ | mo |
2 | lab_mo_ecoli | B_ESCHR_COL |
3 | lab_mo_kpneumoniae | B_KLBSL_PNE |
4 | | |
<p>Imagine this data on a sheet of an Excel file (mo codes were looked up in the <code>microorganisms</code> data set). The first column contains the organisation specific codes, the second column contains an MO code from this package:</p><pre> | A | B |
--|--------------------|--------------|
1 | Organisation XYZ | mo |
2 | lab_mo_ecoli | B_ESCHR_COLI |
3 | lab_mo_kpneumoniae | B_KLBSL_PNMN |
4 | | |
</pre>
<p>We save it as <code>"home/me/ourcodes.xlsx"</code>. Now we have to set it as a source:</p><pre>set_mo_source("home/me/ourcodes.xlsx")
@ -274,7 +274,7 @@ This is the fastest way to have your organisation (or analysis) specific codes p
<p>It has now created a file <code>"~/.mo_source.rds"</code> with the contents of our Excel file, but only the first column with foreign values and the 'mo' column will be kept.</p>
<p>And now we can use it in our functions:</p><pre>as.mo("lab_mo_ecoli")
\[1\] B_ESCHR_COLI
[1] B_ESCHR_COLI
mo_genus("lab_mo_kpneumoniae")
[1] "Klebsiella"
@ -284,7 +284,7 @@ as.mo(c("Escherichia coli", "E. coli", "lab_mo_ecoli"))
[1] B_ESCHR_COLI B_ESCHR_COLI B_ESCHR_COLI
</pre>
<p>If we edit the Excel file to, let's say, this:</p><pre> | A | B |
<p>If we edit the Excel file to, let's say, by adding row 4 like this:</p><pre> | A | B |
--|--------------------|--------------|
1 | Organisation XYZ | mo |
2 | lab_mo_ecoli | B_ESCHR_COLI |
@ -293,7 +293,7 @@ as.mo(c("Escherichia coli", "E. coli", "lab_mo_ecoli"))
5 | | |
</pre>
<p>...any new usage of an MO function in this package will update your data:</p><pre>as.mo("lab_mo_ecoli")
<p>...any new usage of an MO function in this package will update your data file:</p><pre>as.mo("lab_mo_ecoli")
# Updated mo_source file '~/.mo_source.rds' from 'home/me/ourcodes.xlsx'.
[1] B_ESCHR_COLI
@ -301,8 +301,7 @@ mo_genus("lab_Staph_aureus")
[1] "Staphylococcus"
</pre>
<p>To remove the reference completely, just use any of these:</p><pre>set_mo_source("")
set_mo_source(NULL)
<p>To remove the reference data file completely, just use <code>""</code> or <code>NULL</code> as input for <code>[set_mo_source()]</code>:</p><pre>set_mo_source(NULL)
# Removed mo_source file '~/.mo_source.rds'.
</pre>