Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
ROBITools2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OBITools
ROBITools2
Commits
b16a0f39
Commit
b16a0f39
authored
Mar 21, 2020
by
Eric Coissac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upadate on the taxonomy
parent
46dbb4a8
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
110 additions
and
32 deletions
+110
-32
.Rbuildignore
.Rbuildignore
+3
-0
.gitignore
.gitignore
+2
-0
DESCRIPTION
DESCRIPTION
+5
-4
NAMESPACE
NAMESPACE
+5
-0
R/ROBITools2.R
R/ROBITools2.R
+3
-6
R/robitaxid.R
R/robitaxid.R
+24
-3
R/taxonomy_default.R
R/taxonomy_default.R
+12
-0
R/taxonomy_methods.R
R/taxonomy_methods.R
+6
-2
R/taxonomy_robi.R
R/taxonomy_robi.R
+15
-4
ROBITools2.Rproj
ROBITools2.Rproj
+1
-1
man/ROBITools2.Rd
man/ROBITools2.Rd
+3
-6
man/as_robitaxid.Rd
man/as_robitaxid.Rd
+2
-2
man/reference_taxonomy.Rd
man/reference_taxonomy.Rd
+27
-3
man/robiuniqueid.Rd
man/robiuniqueid.Rd
+1
-1
src/.gitignore
src/.gitignore
+1
-0
No files found.
.Rbuildignore
View file @
b16a0f39
^.*\.Rproj$
^\.Rproj\.user$
^external_data_pkg$
^LICENCE-CECILL-2.1.txt$
^data-raw$
.gitignore
View file @
b16a0f39
...
...
@@ -7,3 +7,5 @@ B100000.fasta
B3500.fasta
B5.fasta
Bison-gh.uniq.fasta
*.o
*.so
DESCRIPTION
View file @
b16a0f39
Package: ROBITools2
Type: Package
Title:
What the Package Does (Title Case)
Title:
Provides tools to help in the analysing of DNA metabarcoding data.
Version: 0.1.0
Author:
Who wrote it
Maintainer:
The package maintainer <yourself@somewhere.net
>
Author:
Eric Coissac
Maintainer:
Eric Coissac <eric.coissac@metabarcoding.org
>
Description: More about what it does (maybe more than one line)
Use four spaces when indenting paragraphs within the Description.
License:
What license is it under?
License:
CeCILL-2
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.1.0
...
...
@@ -45,6 +45,7 @@ Collate:
'robitag.R'
'robitaxid.R'
'tags_categories.R'
'taxonomy_default.R'
'taxonomy_methods.R'
'taxonomy_robi.R'
'taxonomy_ncbi.R'
...
...
NAMESPACE
View file @
b16a0f39
...
...
@@ -94,6 +94,7 @@ S3method(pillar_shaft,robitaxid)
S3method(pillar_shaft,robiuniqueid)
S3method(print,robicategory)
S3method(reference_taxonomy,robilca)
S3method(reference_taxonomy,robitaxid)
S3method(reference_taxonomy,robitaxonomy)
S3method(rep,robicategory)
S3method(rep,robitag)
...
...
@@ -159,6 +160,7 @@ export(filter_tag_homopolymere)
export(filter_tag_homopolymere_min)
export(full_taxonomy)
export(genus)
export(get_default_taxonomy)
export(gradient_tol1)
export(gradient_tol2)
export(ids)
...
...
@@ -206,6 +208,7 @@ export(read_fasta)
export(read_ncbi_taxdump)
export(read_obitab)
export(read_obitools_taxonomy)
export(read_robitaxonomy)
export(reference_taxonomy)
export(resets_category_tags)
export(rkmer)
...
...
@@ -227,6 +230,7 @@ export(rseq)
export(sample_ids_name)
export(samples)
export(scientific_name)
export(set_default_taxonomy)
export(species)
export(superkingdom)
export(tags_positive_ctrls)
...
...
@@ -238,6 +242,7 @@ export(unclass_robiobject)
export(validate_robisample)
export(validate_robitaxonomy)
export(write.xlsx)
export(write_robitaxonomy)
import(R6)
import(doParallel)
import(dplyr)
...
...
R/ROBITools2.R
View file @
b16a0f39
...
...
@@ -3,13 +3,10 @@
#' @description Provides tools to help in the analysing of DNA metabarcoding data.
#'
#' @details
#' The functions in the ProcMod package aims to estimate and to test correlation
#' between matrices, correcting for the spurious correlations because of the
#' over-fitting effect.
#' More about what it does (maybe more than one line)
#' Use four spaces when indenting paragraphs within the Description.
#'
#' over-fitting effect.
#'
#' The ProcMod package is developed on the metabarcoding.org gitlab
#' The ROBITools2 package is developed on the metabarcoding.org gitlab
#' (https://git.metabarcoding.org/obitools/ROBITools2.git).
#' The gitlab of metabarcoding.org provides up-to-date information and
#' forums for bug reports.
...
...
R/robitaxid.R
View file @
b16a0f39
...
...
@@ -111,8 +111,8 @@ robitaxid <- function(x, check_against=NULL, verbose = TRUE) {
#' @return a \code{robitaxid} instance
#'
#' @examples
#' x <- robitaxid(c(
"A","B","C"
))
#'
a
s_robitaxid(x)
#' x <- robitaxid(c(
1,2,2759
))
#'
i
s_robitaxid(x)
#'
#' @author Eric Coissac <eric.coissac@metabarcoding.org>
#' @export
...
...
@@ -171,9 +171,28 @@ pillar_shaft.robitaxid <- function(x, ...) {
pillar
::
new_pillar_shaft_simple
(
out
,
align
=
"right"
)
}
#' @details For \code{\link[ROBITools2]{robitaxid}}, is no reference taxonomy
#' are attached to an instance, then the ROBITools2 default taxonomy
#' is returned.
#'
#' @seealso \code{\link[ROBITools2]{get_default_taxonomy}},
#' \code{\link[ROBITools2]{set_default_taxonomy}}.
#'
#' @rdname reference_taxonomy
#' @export
#'
#' @examples
#'
#' x <- robitaxid(c(1,2,2759))
#' reference_taxonomy(x)
#'
reference_taxonomy.robitaxid
=
function
(
object
)
{
ref
<-
attr
(
object
,
"reference_taxonomy"
)
if
(
is.null
(
ref
))
get_default_taxonomy
()
else
ref
}
#########################
#
# robitaxid_
forward
# robitaxid_
master
#
#########################
...
...
@@ -331,3 +350,5 @@ as_robitaxonomy.robilca <- function(object) {
}
R/taxonomy_default.R
0 → 100644
View file @
b16a0f39
.The_default_taxonomy
=
new.env
(
parent
=
emptyenv
())
#' @export
set_default_taxonomy
<-
function
(
taxonomy
)
{
.The_default_taxonomy
$
taxonomy
<-
taxonomy
invisible
(
taxonomy
)
}
#' @export
get_default_taxonomy
<-
function
()
{
.The_default_taxonomy
$
taxonomy
}
\ No newline at end of file
R/taxonomy_methods.R
View file @
b16a0f39
...
...
@@ -10,10 +10,14 @@ NULL
#' robiobjects including taxonomy can be linked to a reference taxonomy.
#' This method return this taxonomy.
#'
#' @param object the interrogated object.
#'
#' @return a robitaxonomy instance.
#'
#' @author Eric Coissac
#' @export
reference_taxonomy
=
function
(
taxonomy
)
{
UseMethod
(
"reference_taxonomy"
,
taxonomy
)
reference_taxonomy
=
function
(
object
)
{
UseMethod
(
"reference_taxonomy"
,
object
)
}
#' @author Eric Coissac
...
...
R/taxonomy_robi.R
View file @
b16a0f39
...
...
@@ -52,7 +52,7 @@ is_robitaxonomy = function(object) {
.robitaxonomy
<-
R6Class
(
"robitaxonomy"
,
lock_objects
=
FALSE
,
.robitaxonomy
<-
R6Class
(
"robitaxonomy"
,
public
=
list
(
nodes
=
NULL
,
...
...
@@ -358,9 +358,9 @@ lowest_common_ancestor.robitaxonomy <- function(taxonomy,
#' @rdname reference_taxonomy
#' @export
reference_taxonomy.robitaxonomy
=
function
(
taxonomy
)
{
ref
<-
taxonomy
$
reference_taxonomy
if
(
is.null
(
ref
))
taxonomy
else
ref
reference_taxonomy.robitaxonomy
=
function
(
object
)
{
ref
<-
object
$
reference_taxonomy
if
(
is.null
(
ref
))
object
else
ref
}
#' @rdname alternative_names
...
...
@@ -415,4 +415,15 @@ full_taxonomy.robitaxonomy = function(taxonomy) {
reference_taxonomy
=
NULL
)
}
#' @export
write_robitaxonomy
<-
function
(
taxonomy
,
file
)
{
save
(
taxonomy
,
file
=
file
)
invisible
(
taxonomy
)
}
#' @export
read_robitaxonomy
<-
function
(
file
)
{
get
(
load
(
file
))
}
ROBITools2.Rproj
View file @
b16a0f39
...
...
@@ -17,4 +17,4 @@ StripTrailingWhitespace: Yes
BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
PackageRoxygenize: rd,collate,namespace
,vignette
PackageRoxygenize: rd,collate,namespace
man/ROBITools2.Rd
View file @
b16a0f39
...
...
@@ -8,13 +8,10 @@
Provides tools to help in the analysing of DNA metabarcoding data.
}
\details{
The functions in the ProcMod package aims to estimate and to test correlation
between matrices, correcting for the spurious correlations because of the
over-fitting effect.
More about what it does (maybe more than one line)
Use four spaces when indenting paragraphs within the Description.
over-fitting effect.
The ProcMod package is developed on the metabarcoding.org gitlab
The ROBITools2 package is developed on the metabarcoding.org gitlab
(https://git.metabarcoding.org/obitools/ROBITools2.git).
The gitlab of metabarcoding.org provides up-to-date information and
forums for bug reports.
...
...
man/as_robitaxid.Rd
View file @
b16a0f39
...
...
@@ -34,8 +34,8 @@ a \code{robitaxid} instance
Converts an object to a \code{robitaxid} instance
}
\examples{
x <- robitaxid(c(
"A","B","C"
))
a
s_robitaxid(x)
x <- robitaxid(c(
1,2,2759
))
i
s_robitaxid(x)
}
\author{
...
...
man/reference_taxonomy.Rd
View file @
b16a0f39
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/robitaxid.R, R/taxonomy_methods.R,
% R/taxonomy_robi.R
\name{reference_taxonomy.robilca}
\name{reference_taxonomy.robitaxid}
\alias{reference_taxonomy.robitaxid}
\alias{reference_taxonomy.robilca}
\alias{reference_taxonomy}
\alias{reference_taxonomy.robitaxonomy}
\title{Returns the reference taxonomy of an object}
\usage{
\method{reference_taxonomy}{robitaxid}(object)
\method{reference_taxonomy}{robilca}(taxonomy)
reference_taxonomy(
taxonomy
)
reference_taxonomy(
object
)
\method{reference_taxonomy}{robitaxonomy}(taxonomy)
\method{reference_taxonomy}{robitaxonomy}(object)
}
\arguments{
\item{object}{the interrogated object.}
}
\value{
a robitaxonomy instance.
}
\description{
robiobjects including taxonomy can be linked to a reference taxonomy.
This method return this taxonomy.
}
\details{
For \code{\link[ROBITools2]{robitaxid}}, is no reference taxonomy
are attached to an instance, then the ROBITools2 default taxonomy
is returned.
}
\examples{
x <- robitaxid(c(1,2,2759))
reference_taxonomy(x)
}
\seealso{
\code{\link[ROBITools2]{get_default_taxonomy}},
\code{\link[ROBITools2]{set_default_taxonomy}}.
}
\author{
Eric Coissac
}
man/robiuniqueid.Rd
View file @
b16a0f39
...
...
@@ -4,7 +4,7 @@
\alias{robiuniqueid}
\title{Build a \code{robiuniqueid} instance}
\usage{
robiuniqueid(x, make_unique = TRUE, sep = "_", verbose =
TRUE
)
robiuniqueid(x, make_unique = TRUE, sep = "_", verbose =
is_robi_verbose()
)
}
\arguments{
\item{x}{an object coercible to a \code{charactere}}
...
...
src/.gitignore
0 → 100644
View file @
b16a0f39
ROBITools2.so
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment