miga-base 0.4.3.0 → 0.5.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/miga/cli.rb +43 -223
- data/lib/miga/cli/action/add.rb +91 -62
- data/lib/miga/cli/action/classify_wf.rb +97 -0
- data/lib/miga/cli/action/daemon.rb +14 -10
- data/lib/miga/cli/action/derep_wf.rb +95 -0
- data/lib/miga/cli/action/doctor.rb +83 -55
- data/lib/miga/cli/action/get.rb +68 -52
- data/lib/miga/cli/action/get_db.rb +206 -0
- data/lib/miga/cli/action/index_wf.rb +31 -0
- data/lib/miga/cli/action/init.rb +115 -190
- data/lib/miga/cli/action/init/daemon_helper.rb +124 -0
- data/lib/miga/cli/action/ls.rb +20 -11
- data/lib/miga/cli/action/ncbi_get.rb +199 -157
- data/lib/miga/cli/action/preproc_wf.rb +46 -0
- data/lib/miga/cli/action/quality_wf.rb +45 -0
- data/lib/miga/cli/action/stats.rb +147 -99
- data/lib/miga/cli/action/summary.rb +10 -4
- data/lib/miga/cli/action/tax_dist.rb +61 -46
- data/lib/miga/cli/action/tax_test.rb +46 -39
- data/lib/miga/cli/action/wf.rb +178 -0
- data/lib/miga/cli/base.rb +11 -0
- data/lib/miga/cli/objects_helper.rb +88 -0
- data/lib/miga/cli/opt_helper.rb +160 -0
- data/lib/miga/daemon.rb +7 -4
- data/lib/miga/dataset/base.rb +5 -5
- data/lib/miga/project/base.rb +4 -4
- data/lib/miga/project/result.rb +2 -1
- data/lib/miga/remote_dataset/base.rb +5 -5
- data/lib/miga/remote_dataset/download.rb +1 -1
- data/lib/miga/version.rb +3 -3
- data/scripts/cds.bash +3 -1
- data/scripts/essential_genes.bash +1 -0
- data/scripts/stats.bash +1 -1
- data/scripts/trimmed_fasta.bash +5 -3
- data/utils/distance/runner.rb +3 -0
- data/utils/distance/temporal.rb +10 -1
- data/utils/enveomics/Manifest/Tasks/fasta.json +5 -0
- data/utils/enveomics/Manifest/Tasks/sequence-identity.json +7 -0
- data/utils/enveomics/Scripts/BlastTab.addlen.rb +33 -31
- data/utils/enveomics/Scripts/FastA.tag.rb +42 -41
- data/utils/enveomics/Scripts/HMM.essential.rb +85 -55
- data/utils/enveomics/Scripts/HMM.haai.rb +29 -20
- data/utils/enveomics/Scripts/SRA.download.bash +1 -1
- data/utils/enveomics/Scripts/aai.rb +163 -128
- data/utils/enveomics/build_enveomics_r.bash +11 -10
- data/utils/enveomics/enveomics.R/DESCRIPTION +3 -2
- data/utils/enveomics/enveomics.R/R/autoprune.R +141 -107
- data/utils/enveomics/enveomics.R/R/barplot.R +105 -86
- data/utils/enveomics/enveomics.R/R/cliopts.R +131 -115
- data/utils/enveomics/enveomics.R/R/df2dist.R +144 -106
- data/utils/enveomics/enveomics.R/R/growthcurve.R +201 -133
- data/utils/enveomics/enveomics.R/R/recplot.R +350 -315
- data/utils/enveomics/enveomics.R/R/recplot2.R +1334 -914
- data/utils/enveomics/enveomics.R/R/tribs.R +521 -361
- data/utils/enveomics/enveomics.R/R/utils.R +31 -15
- data/utils/enveomics/enveomics.R/README.md +7 -0
- data/utils/enveomics/enveomics.R/man/cash-enve.GrowthCurve-method.Rd +17 -0
- data/utils/enveomics/enveomics.R/man/cash-enve.RecPlot2-method.Rd +17 -0
- data/utils/enveomics/enveomics.R/man/cash-enve.RecPlot2.Peak-method.Rd +17 -0
- data/utils/enveomics/enveomics.R/man/enve.GrowthCurve-class.Rd +16 -21
- data/utils/enveomics/enveomics.R/man/enve.TRIBS-class.Rd +31 -28
- data/utils/enveomics/enveomics.R/man/enve.TRIBS.merge.Rd +23 -19
- data/utils/enveomics/enveomics.R/man/enve.TRIBStest-class.Rd +36 -26
- data/utils/enveomics/enveomics.R/man/enve.__prune.iter.Rd +23 -24
- data/utils/enveomics/enveomics.R/man/enve.__prune.reduce.Rd +23 -24
- data/utils/enveomics/enveomics.R/man/enve.__tribs.Rd +32 -33
- data/utils/enveomics/enveomics.R/man/enve.barplot.Rd +91 -64
- data/utils/enveomics/enveomics.R/man/enve.cliopts.Rd +57 -37
- data/utils/enveomics/enveomics.R/man/enve.col.alpha.Rd +24 -19
- data/utils/enveomics/enveomics.R/man/enve.col2alpha.Rd +19 -18
- data/utils/enveomics/enveomics.R/man/enve.df2dist.Rd +39 -26
- data/utils/enveomics/enveomics.R/man/enve.df2dist.group.Rd +38 -25
- data/utils/enveomics/enveomics.R/man/enve.df2dist.list.Rd +40 -26
- data/utils/enveomics/enveomics.R/man/enve.growthcurve.Rd +67 -49
- data/utils/enveomics/enveomics.R/man/enve.prune.dist.Rd +37 -28
- data/utils/enveomics/enveomics.R/man/enve.recplot.Rd +122 -97
- data/utils/enveomics/enveomics.R/man/enve.recplot2-class.Rd +35 -31
- data/utils/enveomics/enveomics.R/man/enve.recplot2.ANIr.Rd +24 -23
- data/utils/enveomics/enveomics.R/man/enve.recplot2.Rd +68 -51
- data/utils/enveomics/enveomics.R/man/enve.recplot2.__counts.Rd +25 -24
- data/utils/enveomics/enveomics.R/man/enve.recplot2.__peakHist.Rd +21 -22
- data/utils/enveomics/enveomics.R/man/enve.recplot2.__whichClosestPeak.Rd +19 -20
- data/utils/enveomics/enveomics.R/man/enve.recplot2.changeCutoff.Rd +19 -18
- data/utils/enveomics/enveomics.R/man/enve.recplot2.compareIdentities.Rd +41 -32
- data/utils/enveomics/enveomics.R/man/enve.recplot2.coordinates.Rd +29 -24
- data/utils/enveomics/enveomics.R/man/enve.recplot2.corePeak.Rd +18 -18
- data/utils/enveomics/enveomics.R/man/enve.recplot2.extractWindows.Rd +40 -34
- data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.Rd +36 -24
- data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.__em_e.Rd +19 -20
- data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.__em_m.Rd +19 -20
- data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.__emauto_one.Rd +27 -29
- data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.__mow_one.Rd +41 -42
- data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.__mower.Rd +17 -18
- data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.em.Rd +43 -33
- data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.emauto.Rd +36 -28
- data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.mower.Rd +74 -56
- data/utils/enveomics/enveomics.R/man/enve.recplot2.peak-class.Rd +44 -31
- data/utils/enveomics/enveomics.R/man/enve.recplot2.seqdepth.Rd +27 -22
- data/utils/enveomics/enveomics.R/man/enve.recplot2.windowDepthThreshold.Rd +32 -26
- data/utils/enveomics/enveomics.R/man/enve.tribs.Rd +59 -44
- data/utils/enveomics/enveomics.R/man/enve.tribs.test.Rd +28 -21
- data/utils/enveomics/enveomics.R/man/enve.truncate.Rd +27 -22
- data/utils/enveomics/enveomics.R/man/plot.enve.GrowthCurve.Rd +63 -43
- data/utils/enveomics/enveomics.R/man/plot.enve.TRIBS.Rd +38 -29
- data/utils/enveomics/enveomics.R/man/plot.enve.TRIBStest.Rd +38 -30
- data/utils/enveomics/enveomics.R/man/plot.enve.recplot2.Rd +111 -83
- data/utils/enveomics/enveomics.R/man/summary.enve.GrowthCurve.Rd +19 -18
- data/utils/enveomics/enveomics.R/man/summary.enve.TRIBS.Rd +19 -18
- data/utils/enveomics/enveomics.R/man/summary.enve.TRIBStest.Rd +19 -18
- data/utils/find-medoid.R +3 -2
- data/utils/representatives.rb +5 -3
- data/utils/subclade/pipeline.rb +22 -11
- data/utils/subclade/runner.rb +5 -1
- data/utils/subclades-compile.rb +1 -1
- data/utils/subclades.R +9 -3
- metadata +15 -4
- data/utils/enveomics/enveomics.R/man/enveomics.R-package.Rd +0 -15
- data/utils/enveomics/enveomics.R/man/z$-methods.Rd +0 -26
@@ -1,33 +1,32 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
\
|
4
|
-
\
|
5
|
-
\
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
}
|
10
|
-
|
11
|
-
}
|
12
|
-
|
13
|
-
}
|
14
|
-
|
15
|
-
}
|
16
|
-
|
17
|
-
}
|
18
|
-
|
19
|
-
}
|
20
|
-
|
21
|
-
}
|
22
|
-
|
23
|
-
}
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
1
|
+
% Generated by roxygen2: do not edit by hand
|
2
|
+
% Please edit documentation in R/tribs.R
|
3
|
+
\name{enve.__tribs}
|
4
|
+
\alias{enve.__tribs}
|
5
|
+
\title{Enveomics: TRIBS - Internal Ancillary Function}
|
6
|
+
\usage{
|
7
|
+
enve.__tribs(rep, frx, selection, dimensions, dots, dist.method,
|
8
|
+
summary.fx, dist)
|
9
|
+
}
|
10
|
+
\arguments{
|
11
|
+
\item{rep}{Replicates}
|
12
|
+
|
13
|
+
\item{frx}{Fraction}
|
14
|
+
|
15
|
+
\item{selection}{Selection}
|
16
|
+
|
17
|
+
\item{dimensions}{Dimensions}
|
18
|
+
|
19
|
+
\item{dots}{Sampling points}
|
20
|
+
|
21
|
+
\item{dist.method}{Distance method}
|
22
|
+
|
23
|
+
\item{summary.fx}{Summary function}
|
24
|
+
|
25
|
+
\item{dist}{Distance}
|
26
|
+
}
|
27
|
+
\description{
|
28
|
+
Internal ancillary function (see \code{\link{enve.tribs}}).
|
29
|
+
}
|
30
|
+
\author{
|
31
|
+
Luis M. Rodriguez-R [aut, cre]
|
32
|
+
}
|
@@ -1,64 +1,91 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
\
|
4
|
-
\
|
5
|
-
\
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
}
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
)
|
64
|
-
}
|
1
|
+
% Generated by roxygen2: do not edit by hand
|
2
|
+
% Please edit documentation in R/barplot.R
|
3
|
+
\name{enve.barplot}
|
4
|
+
\alias{enve.barplot}
|
5
|
+
\title{Enveomics: Barplot}
|
6
|
+
\usage{
|
7
|
+
enve.barplot(x, sizes, top = 25, colors.per.group = 9,
|
8
|
+
bars.width = 4, legend.ncol = 1, other.col = "#000000",
|
9
|
+
add.trend = FALSE, organic.trend = FALSE, sort.by = median,
|
10
|
+
min.report = 101, order = NULL, col, ...)
|
11
|
+
}
|
12
|
+
\arguments{
|
13
|
+
\item{x}{Can be either the input data or the path to the file containing
|
14
|
+
the table.
|
15
|
+
\itemize{
|
16
|
+
\item{If it contains the data, it must be a data frame or an
|
17
|
+
object coercible to a data frame.}
|
18
|
+
\item{If it is a path, it must point to a
|
19
|
+
tab-delimited file containing a header (first row) and row names
|
20
|
+
(first column).}
|
21
|
+
}}
|
22
|
+
|
23
|
+
\item{sizes}{A numeric vector containing the real size of the samples
|
24
|
+
(columns) in the same order of the input table. If set, the values are
|
25
|
+
assumed to be 100\%. Otherwise, the sum of the columns is used.}
|
26
|
+
|
27
|
+
\item{top}{Maximum number of categories to display. Any additional
|
28
|
+
categories will be listed as "Others".}
|
29
|
+
|
30
|
+
\item{colors.per.group}{Number of categories in the first two saturation
|
31
|
+
groups of colors. The third group contains the remaining categories if
|
32
|
+
needed.}
|
33
|
+
|
34
|
+
\item{bars.width}{Width of the barplot with respect to the legend.}
|
35
|
+
|
36
|
+
\item{legend.ncol}{Number of columns in the legend.}
|
37
|
+
|
38
|
+
\item{other.col}{Color of the "Others" category.}
|
39
|
+
|
40
|
+
\item{add.trend}{Controls if semi-transparent areas are to be plotted
|
41
|
+
between the bars to connect the regions (trend regions).}
|
42
|
+
|
43
|
+
\item{organic.trend}{Controls if the trend regions are to be smoothed
|
44
|
+
(curves). By default, trend regions have straight edges. If \code{TRUE},
|
45
|
+
forces \code{add.trend=TRUE}.}
|
46
|
+
|
47
|
+
\item{sort.by}{Any function that takes a numeric vector and returns a
|
48
|
+
numeric scalar. This function is applied to each row, and the resulting
|
49
|
+
values are used to sort the rows (decreasingly). Good options include:
|
50
|
+
\code{sd, min, max, mean, median}.}
|
51
|
+
|
52
|
+
\item{min.report}{Minimum percentage to report the value in the plot.
|
53
|
+
Any value above 100 indicates that no values are to be reported.}
|
54
|
+
|
55
|
+
\item{order}{Controls how the rows should be ordered.
|
56
|
+
\itemize{
|
57
|
+
\item{If \code{NULL}
|
58
|
+
(default), \code{sort.by} is applied per row and the results are
|
59
|
+
sorted decreasingly.}
|
60
|
+
\item{If \code{NA}, no sorting is performed, i.e., the original
|
61
|
+
order is respected.}
|
62
|
+
\item{If a vector is provided, it is assumed to be the
|
63
|
+
custom order to be used (either by numeric index or by row names).}
|
64
|
+
}}
|
65
|
+
|
66
|
+
\item{col}{Colors to use. If provided, overrides the variables \code{top}
|
67
|
+
and \code{colors.per.group}, but \code{other.col} is still used if the
|
68
|
+
vector is insufficient for all the rows. An additional palette is available with
|
69
|
+
\code{col='coto'} (contributed by Luis (Coto) Orellana).}
|
70
|
+
|
71
|
+
\item{...}{Any additional parameters to be passed to barplot.}
|
72
|
+
}
|
73
|
+
\description{
|
74
|
+
Creates nice barplots from tab-delimited tables.
|
75
|
+
}
|
76
|
+
\examples{
|
77
|
+
# Load data
|
78
|
+
data("phyla.counts", package="enveomics.R", envir=environment())
|
79
|
+
# Create a barplot sorted by variance with organic trends
|
80
|
+
enve.barplot(
|
81
|
+
phyla.counts, # Counts of phyla in four sites
|
82
|
+
sizes=c(250,100,75,200), # Total sizes of the datasets of each site
|
83
|
+
bars.width=2, # Decrease from default, so the names are fully displayed
|
84
|
+
organic.trend=TRUE, # Nice curvy background
|
85
|
+
sort.by=var # Sort by variance across sites
|
86
|
+
)
|
87
|
+
|
88
|
+
}
|
89
|
+
\author{
|
90
|
+
Luis M. Rodriguez-R [aut, cre]
|
91
|
+
}
|
@@ -1,37 +1,57 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
\
|
4
|
-
\
|
5
|
-
|
6
|
-
\usage{
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
}
|
27
|
-
|
28
|
-
|
29
|
-
the function
|
30
|
-
|
31
|
-
|
32
|
-
\
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
1
|
+
% Generated by roxygen2: do not edit by hand
|
2
|
+
% Please edit documentation in R/cliopts.R
|
3
|
+
\name{enve.cliopts}
|
4
|
+
\alias{enve.cliopts}
|
5
|
+
\title{Enveomics: Cliopts}
|
6
|
+
\usage{
|
7
|
+
enve.cliopts(fx, rd_file, positional_arguments, usage, mandatory = c(),
|
8
|
+
vectorize = c(), ignore = c(), number = c(), defaults = list(),
|
9
|
+
o_desc = list(), p_desc = "")
|
10
|
+
}
|
11
|
+
\arguments{
|
12
|
+
\item{fx}{Function for which the interface should be generated.}
|
13
|
+
|
14
|
+
\item{rd_file}{(Optional) .Rd file with the standard documentation of
|
15
|
+
the function.}
|
16
|
+
|
17
|
+
\item{positional_arguments}{(Optional) Number of \strong{positional}
|
18
|
+
arguments passed to \code{\link[optparse]{parse_args}}
|
19
|
+
(package: \pkg{optparse}).}
|
20
|
+
|
21
|
+
\item{usage}{(Optional) Usage passed to \code{\link[optparse]{OptionParser}}
|
22
|
+
(package: \pkg{optparse}).}
|
23
|
+
|
24
|
+
\item{mandatory}{Mandatory arguments.}
|
25
|
+
|
26
|
+
\item{vectorize}{Arguments of the function to vectorize (comma-delimited).
|
27
|
+
If numeric, use also \code{number}.}
|
28
|
+
|
29
|
+
\item{ignore}{Arguments of the function to ignore.}
|
30
|
+
|
31
|
+
\item{number}{Force these arguments as numerics. Useful for numeric
|
32
|
+
vectors (see \code{vectorize}) or arguments with no defaults.}
|
33
|
+
|
34
|
+
\item{defaults}{Defaults to use instead of the ones provided by the
|
35
|
+
formals.}
|
36
|
+
|
37
|
+
\item{o_desc}{Descriptions of the options. Help from \code{rd} is ignored
|
38
|
+
for arguments present in this list.}
|
39
|
+
|
40
|
+
\item{p_desc}{Description Description of the function. Help from \code{rd}
|
41
|
+
is ignored for the function description unless this value is an empty string.}
|
42
|
+
}
|
43
|
+
\value{
|
44
|
+
Returns a list with keys:
|
45
|
+
\itemize{
|
46
|
+
\item{\code{options}, a named list with the values for the function's
|
47
|
+
arguments}
|
48
|
+
\item{\code{args}, a vector with zero or more strings containing the
|
49
|
+
positional arguments}}
|
50
|
+
}
|
51
|
+
\description{
|
52
|
+
Generates nicely formatted command-line interfaces for functions
|
53
|
+
(\strong{closures} only).
|
54
|
+
}
|
55
|
+
\author{
|
56
|
+
Luis M. Rodriguez-R [aut, cre]
|
57
|
+
}
|
@@ -1,19 +1,24 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
\
|
4
|
-
\
|
5
|
-
\
|
6
|
-
\
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
}
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
1
|
+
% Generated by roxygen2: do not edit by hand
|
2
|
+
% Please edit documentation in R/utils.R
|
3
|
+
\name{enve.col.alpha}
|
4
|
+
\alias{enve.col.alpha}
|
5
|
+
\title{Enveomics: Color Alpha}
|
6
|
+
\usage{
|
7
|
+
enve.col.alpha(col, alpha = 1/2)
|
8
|
+
}
|
9
|
+
\arguments{
|
10
|
+
\item{col}{Color or vector of colors. It can be any value supported by
|
11
|
+
\code{\link[grDevices]{col2rgb}}, such as \code{darkred} or \code{#009988}.}
|
12
|
+
|
13
|
+
\item{alpha}{Alpha value to add to the color, from 0 to 1.}
|
14
|
+
}
|
15
|
+
\value{
|
16
|
+
Returns a color or a vector of colors in \emph{hex} notation,
|
17
|
+
including \code{alpha}.
|
18
|
+
}
|
19
|
+
\description{
|
20
|
+
Modify alpha in a color (or vector of colors).
|
21
|
+
}
|
22
|
+
\author{
|
23
|
+
Luis M. Rodriguez-R [aut, cre]
|
24
|
+
}
|
@@ -1,18 +1,19 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
\
|
4
|
-
\
|
5
|
-
\
|
6
|
-
\
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
1
|
+
% Generated by roxygen2: do not edit by hand
|
2
|
+
% Please edit documentation in R/growthcurve.R
|
3
|
+
\name{enve.col2alpha}
|
4
|
+
\alias{enve.col2alpha}
|
5
|
+
\title{Enveomics: Color to Alpha}
|
6
|
+
\usage{
|
7
|
+
enve.col2alpha(x, alpha)
|
8
|
+
}
|
9
|
+
\arguments{
|
10
|
+
\item{x}{A vector of any value base colors.}
|
11
|
+
|
12
|
+
\item{alpha}{Alpha level to set (in the 0-1 range).}
|
13
|
+
}
|
14
|
+
\description{
|
15
|
+
Takes a vector of colors and sets the alpha.
|
16
|
+
}
|
17
|
+
\author{
|
18
|
+
Luis M. Rodriguez-R [aut, cre]
|
19
|
+
}
|
@@ -1,26 +1,39 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
\
|
4
|
-
\
|
5
|
-
\
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
}
|
18
|
-
|
19
|
-
\
|
20
|
-
|
21
|
-
\
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
1
|
+
% Generated by roxygen2: do not edit by hand
|
2
|
+
% Please edit documentation in R/df2dist.R
|
3
|
+
\name{enve.df2dist}
|
4
|
+
\alias{enve.df2dist}
|
5
|
+
\title{Enveomics: Data Frame to Dist}
|
6
|
+
\usage{
|
7
|
+
enve.df2dist(x, obj1.index = 1, obj2.index = 2, dist.index = 3,
|
8
|
+
default.d = NA, max.sim = 0)
|
9
|
+
}
|
10
|
+
\arguments{
|
11
|
+
\item{x}{A dataframe (or coercible object) with at least three columns:
|
12
|
+
\enumerate{
|
13
|
+
\item ID of the object 1,
|
14
|
+
\item ID of the object 2, and
|
15
|
+
\item distance between the two objects.}}
|
16
|
+
|
17
|
+
\item{obj1.index}{Index of the column containing the ID of the object 1.}
|
18
|
+
|
19
|
+
\item{obj2.index}{Index of the column containing the ID of the object 2.}
|
20
|
+
|
21
|
+
\item{dist.index}{Index of the column containing the distance.}
|
22
|
+
|
23
|
+
\item{default.d}{Default value (for missing values).}
|
24
|
+
|
25
|
+
\item{max.sim}{If not zero, assumes that the values are similarity
|
26
|
+
(not distance) and this is the maximum similarity (corresponding to
|
27
|
+
distance 0). Applies transformation:
|
28
|
+
\eqn{distance = (max.sim - values)/max.sim.}}
|
29
|
+
}
|
30
|
+
\value{
|
31
|
+
Returns a \strong{dist} object.
|
32
|
+
}
|
33
|
+
\description{
|
34
|
+
Transform a dataframe (or coercible object, like a table) into a
|
35
|
+
\strong{dist} object.
|
36
|
+
}
|
37
|
+
\author{
|
38
|
+
Luis M. Rodriguez-R [aut, cre]
|
39
|
+
}
|