1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-09 04:42:22 +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

@ -83,13 +83,13 @@ mo_property(x, property = "fullname", language = get_locale(), ...)
\value{
\itemize{
\item An \code{\link{integer}} in case of \code{\link[=mo_year]{mo_year()}}
\item A \code{\link{list}} in case of \code{\link[=mo_taxonomy]{mo_taxonomy()}}
\item A \code{\link{list}} in case of \code{\link[=mo_taxonomy]{mo_taxonomy()}} and \code{\link[=mo_info]{mo_info()}}
\item A named \code{\link{character}} in case of \code{\link[=mo_url]{mo_url()}}
\item A \code{\link{character}} in all other cases
}
}
\description{
Use these functions to return a specific property of a microorganism. All input values will be evaluated internally with \code{\link[=as.mo]{as.mo()}}, which makes it possible for input of these functions to use microbial abbreviations, codes and names. See Examples.
Use these functions to return a specific property of a microorganism. All input values will be evaluated internally with \code{\link[=as.mo]{as.mo()}}, which makes it possible to use microbial abbreviations, codes and names as input. Please see \emph{Examples}.
}
\details{
All functions will return the most recently known taxonomic property according to the Catalogue of Life, except for \code{\link[=mo_ref]{mo_ref()}}, \code{\link[=mo_authors]{mo_authors()}} and \code{\link[=mo_year]{mo_year()}}. This leads to the following results:
@ -99,7 +99,7 @@ All functions will return the most recently known taxonomic property according t
\item \code{mo_ref("Chlamydophila psittaci")} will return \code{"Everett et al., 1999"} (without a warning)
}
The Gram stain - \code{\link[=mo_gramstain]{mo_gramstain()}} - 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}.
The Gram stain - \code{\link[=mo_gramstain]{mo_gramstain()}} - 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}.
All output will be \link{translate}d where possible.

View File

@ -28,12 +28,12 @@ The reference file can be a text file seperated with commas (CSV) or tabs or pip
Reading an Excel file (\code{.xlsx}) 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{\link[=get_mo_source]{get_mo_source()}} in only a couple of microseconds (a millionth of a second).
\subsection{How it works}{
Imagine this data on a sheet of an Excel file (mo codes were looked up in the \code{microorganisms} data set). The first column contains the organisation specific codes, the second column contains an MO code from this package:\preformatted{ | A | B |
--|--------------------|-------------|
1 | Organisation XYZ | mo |
2 | lab_mo_ecoli | B_ESCHR_COL |
3 | lab_mo_kpneumoniae | B_KLBSL_PNE |
4 | | |
Imagine this data on a sheet of an Excel file (mo codes were looked up in the \code{microorganisms} data set). The first column contains the organisation specific codes, the second column contains an MO code from this package:\preformatted{ | A | B |
--|--------------------|--------------|
1 | Organisation XYZ | mo |
2 | lab_mo_ecoli | B_ESCHR_COLI |
3 | lab_mo_kpneumoniae | B_KLBSL_PNMN |
4 | | |
}
We save it as \code{"home/me/ourcodes.xlsx"}. Now we have to set it as a source:\preformatted{set_mo_source("home/me/ourcodes.xlsx")
@ -43,7 +43,7 @@ We save it as \code{"home/me/ourcodes.xlsx"}. Now we have to set it as a source:
It has now created a file \code{"~/.mo_source.rds"} with the contents of our Excel file, but only the first column with foreign values and the 'mo' column will be kept.
And now we can use it in our functions:\preformatted{as.mo("lab_mo_ecoli")
\[1\] B_ESCHR_COLI
[1] B_ESCHR_COLI
mo_genus("lab_mo_kpneumoniae")
[1] "Klebsiella"
@ -53,7 +53,7 @@ as.mo(c("Escherichia coli", "E. coli", "lab_mo_ecoli"))
[1] B_ESCHR_COLI B_ESCHR_COLI B_ESCHR_COLI
}
If we edit the Excel file to, let's say, this:\preformatted{ | A | B |
If we edit the Excel file to, let's say, by adding row 4 like this:\preformatted{ | A | B |
--|--------------------|--------------|
1 | Organisation XYZ | mo |
2 | lab_mo_ecoli | B_ESCHR_COLI |
@ -62,7 +62,7 @@ If we edit the Excel file to, let's say, this:\preformatted{ | A
5 | | |
}
...any new usage of an MO function in this package will update your data:\preformatted{as.mo("lab_mo_ecoli")
...any new usage of an MO function in this package will update your data file:\preformatted{as.mo("lab_mo_ecoli")
# Updated mo_source file '~/.mo_source.rds' from 'home/me/ourcodes.xlsx'.
[1] B_ESCHR_COLI
@ -70,8 +70,7 @@ mo_genus("lab_Staph_aureus")
[1] "Staphylococcus"
}
To remove the reference completely, just use any of these:\preformatted{set_mo_source("")
set_mo_source(NULL)
To remove the reference data file completely, just use \code{""} or \code{NULL} as input for \verb{[set_mo_source()]}:\preformatted{set_mo_source(NULL)
# Removed mo_source file '~/.mo_source.rds'.
}
}