miga-base 1.2.17.1 → 1.2.17.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/lib/miga/remote_dataset/download.rb +1 -1
  3. data/lib/miga/remote_dataset.rb +9 -4
  4. data/lib/miga/version.rb +2 -2
  5. data/utils/enveomics/Manifest/Tasks/mapping.json +39 -11
  6. data/utils/enveomics/Manifest/Tasks/remote.json +2 -1
  7. data/utils/enveomics/Scripts/BedGraph.tad.rb +98 -53
  8. data/utils/enveomics/Scripts/SRA.download.bash +14 -2
  9. data/utils/enveomics/Tests/low-cov.bg.gz +0 -0
  10. data/utils/enveomics/enveomics.R/DESCRIPTION +5 -5
  11. data/utils/enveomics/enveomics.R/R/autoprune.R +99 -87
  12. data/utils/enveomics/enveomics.R/R/barplot.R +116 -97
  13. data/utils/enveomics/enveomics.R/R/cliopts.R +65 -59
  14. data/utils/enveomics/enveomics.R/R/df2dist.R +96 -58
  15. data/utils/enveomics/enveomics.R/R/growthcurve.R +166 -148
  16. data/utils/enveomics/enveomics.R/R/recplot.R +201 -136
  17. data/utils/enveomics/enveomics.R/R/recplot2.R +371 -304
  18. data/utils/enveomics/enveomics.R/R/tribs.R +318 -263
  19. data/utils/enveomics/enveomics.R/R/utils.R +30 -20
  20. data/utils/enveomics/enveomics.R/man/enve.TRIBS-class.Rd +4 -3
  21. data/utils/enveomics/enveomics.R/man/enve.TRIBS.merge.Rd +2 -2
  22. data/utils/enveomics/enveomics.R/man/enve.TRIBStest-class.Rd +3 -3
  23. data/utils/enveomics/enveomics.R/man/enve.__prune.iter.Rd +7 -4
  24. data/utils/enveomics/enveomics.R/man/enve.__prune.reduce.Rd +7 -4
  25. data/utils/enveomics/enveomics.R/man/enve.__tribs.Rd +4 -0
  26. data/utils/enveomics/enveomics.R/man/enve.barplot.Rd +25 -17
  27. data/utils/enveomics/enveomics.R/man/enve.col.alpha.Rd +10 -0
  28. data/utils/enveomics/enveomics.R/man/enve.col2alpha.Rd +8 -2
  29. data/utils/enveomics/enveomics.R/man/enve.df2dist.Rd +14 -0
  30. data/utils/enveomics/enveomics.R/man/enve.df2dist.group.Rd +20 -1
  31. data/utils/enveomics/enveomics.R/man/enve.df2dist.list.Rd +2 -3
  32. data/utils/enveomics/enveomics.R/man/enve.growthcurve.Rd +5 -2
  33. data/utils/enveomics/enveomics.R/man/enve.recplot.Rd +50 -42
  34. data/utils/enveomics/enveomics.R/man/enve.recplot2.ANIr.Rd +5 -2
  35. data/utils/enveomics/enveomics.R/man/enve.recplot2.__counts.Rd +3 -0
  36. data/utils/enveomics/enveomics.R/man/enve.recplot2.__peakHist.Rd +3 -0
  37. data/utils/enveomics/enveomics.R/man/enve.recplot2.__whichClosestPeak.Rd +3 -0
  38. data/utils/enveomics/enveomics.R/man/enve.recplot2.changeCutoff.Rd +3 -0
  39. data/utils/enveomics/enveomics.R/man/enve.recplot2.compareIdentities.Rd +9 -4
  40. data/utils/enveomics/enveomics.R/man/enve.recplot2.corePeak.Rd +3 -0
  41. data/utils/enveomics/enveomics.R/man/enve.recplot2.extractWindows.Rd +3 -3
  42. data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.Rd +0 -2
  43. data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.__em_e.Rd +4 -0
  44. data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.__em_m.Rd +5 -0
  45. data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.__emauto_one.Rd +11 -7
  46. data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.__mow_one.Rd +5 -1
  47. data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.__mower.Rd +3 -0
  48. data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.mower.Rd +2 -2
  49. data/utils/enveomics/enveomics.R/man/enve.recplot2.windowDepthThreshold.Rd +3 -3
  50. data/utils/enveomics/enveomics.R/man/enve.tribs.Rd +2 -2
  51. data/utils/enveomics/enveomics.R/man/plot.enve.GrowthCurve.Rd +3 -0
  52. data/utils/enveomics/enveomics.R/man/plot.enve.TRIBS.Rd +3 -0
  53. data/utils/enveomics/enveomics.R/man/plot.enve.TRIBStest.Rd +6 -3
  54. data/utils/enveomics/enveomics.R/man/plot.enve.recplot2.Rd +2 -2
  55. data/utils/enveomics/enveomics.R/man/summary.enve.GrowthCurve.Rd +3 -0
  56. data/utils/enveomics/enveomics.R/man/summary.enve.TRIBS.Rd +3 -0
  57. data/utils/enveomics/enveomics.R/man/summary.enve.TRIBStest.Rd +3 -0
  58. metadata +3 -37
  59. data/utils/enveomics/Pipelines/assembly.pbs/CONFIG.mock.bash +0 -69
  60. data/utils/enveomics/Pipelines/assembly.pbs/FastA.N50.pl +0 -1
  61. data/utils/enveomics/Pipelines/assembly.pbs/FastA.filterN.pl +0 -1
  62. data/utils/enveomics/Pipelines/assembly.pbs/FastA.length.pl +0 -1
  63. data/utils/enveomics/Pipelines/assembly.pbs/README.md +0 -189
  64. data/utils/enveomics/Pipelines/assembly.pbs/RUNME-2.bash +0 -112
  65. data/utils/enveomics/Pipelines/assembly.pbs/RUNME-3.bash +0 -23
  66. data/utils/enveomics/Pipelines/assembly.pbs/RUNME-4.bash +0 -44
  67. data/utils/enveomics/Pipelines/assembly.pbs/RUNME.bash +0 -50
  68. data/utils/enveomics/Pipelines/assembly.pbs/kSelector.R +0 -37
  69. data/utils/enveomics/Pipelines/assembly.pbs/newbler.pbs +0 -68
  70. data/utils/enveomics/Pipelines/assembly.pbs/newbler_preparator.pl +0 -49
  71. data/utils/enveomics/Pipelines/assembly.pbs/soap.pbs +0 -80
  72. data/utils/enveomics/Pipelines/assembly.pbs/stats.pbs +0 -57
  73. data/utils/enveomics/Pipelines/assembly.pbs/velvet.pbs +0 -63
  74. data/utils/enveomics/Pipelines/blast.pbs/01.pbs.bash +0 -38
  75. data/utils/enveomics/Pipelines/blast.pbs/02.pbs.bash +0 -73
  76. data/utils/enveomics/Pipelines/blast.pbs/03.pbs.bash +0 -21
  77. data/utils/enveomics/Pipelines/blast.pbs/BlastTab.recover_job.pl +0 -72
  78. data/utils/enveomics/Pipelines/blast.pbs/CONFIG.mock.bash +0 -98
  79. data/utils/enveomics/Pipelines/blast.pbs/FastA.split.pl +0 -1
  80. data/utils/enveomics/Pipelines/blast.pbs/README.md +0 -127
  81. data/utils/enveomics/Pipelines/blast.pbs/RUNME.bash +0 -109
  82. data/utils/enveomics/Pipelines/blast.pbs/TASK.check.bash +0 -128
  83. data/utils/enveomics/Pipelines/blast.pbs/TASK.dry.bash +0 -16
  84. data/utils/enveomics/Pipelines/blast.pbs/TASK.eo.bash +0 -22
  85. data/utils/enveomics/Pipelines/blast.pbs/TASK.pause.bash +0 -26
  86. data/utils/enveomics/Pipelines/blast.pbs/TASK.run.bash +0 -89
  87. data/utils/enveomics/Pipelines/blast.pbs/sentinel.pbs.bash +0 -29
  88. data/utils/enveomics/Pipelines/idba.pbs/README.md +0 -49
  89. data/utils/enveomics/Pipelines/idba.pbs/RUNME.bash +0 -95
  90. data/utils/enveomics/Pipelines/idba.pbs/run.pbs +0 -56
  91. data/utils/enveomics/Pipelines/trim.pbs/README.md +0 -54
  92. data/utils/enveomics/Pipelines/trim.pbs/RUNME.bash +0 -70
  93. data/utils/enveomics/Pipelines/trim.pbs/run.pbs +0 -130
@@ -11,15 +11,28 @@
11
11
  #'
12
12
  #' @author Luis M. Rodriguez-R [aut, cre]
13
13
  #'
14
+ #' @examples
15
+ #' # Hexcode for a color by hexcode
16
+ #' enve.col.alpha("#009988", 3/4) # "#009988BF"
17
+ #'
18
+ #' # Hexcode for a color by name
19
+ #' enve.col.alpha("white", 1/4) # "#FFFFFF3F"
20
+ #'
21
+ #' # Hexcode for a color from other functions
22
+ #' enve.col.alpha(rainbow(3)) # "#FF00007F" "#00FF007F" "#0000FF7F"
14
23
  #' @export
15
24
 
16
- enve.col.alpha <- function
17
- (col,
18
- alpha=1/2
19
- ){
25
+ enve.col.alpha <- function(col, alpha = 1/2) {
20
26
  return(
21
- apply(col2rgb(col), 2,
22
- function(x) do.call(rgb, as.list(c(x[1:3]/256, alpha))) ) )
27
+ apply(
28
+ col2rgb(col), 2,
29
+ function(x)
30
+ do.call(
31
+ rgb,
32
+ list(x[1], x[2], x[3], alpha * 255, maxColorValue = 255)
33
+ )
34
+ )
35
+ )
23
36
  }
24
37
 
25
38
  #' Enveomics: Truncate
@@ -39,13 +52,9 @@ enve.col.alpha <- function
39
52
  #'
40
53
  #' @export
41
54
 
42
- enve.truncate <- function
43
- (x,
44
- f=0.95,
45
- FUN=mean
46
- ){
47
- n <- round(length(x)*(1-f)/2)
48
- y <- sort(x)[ -c(seq(1, n), seq(length(x)+1-n, length(x))) ]
55
+ enve.truncate <- function(x, f = 0.95, FUN = mean) {
56
+ n <- round(length(x) * (1 - f) / 2)
57
+ y <- sort(x)[-c(seq(1, n), seq(length(x) + 1 - n, length(x)))]
49
58
  return(FUN(y))
50
59
  }
51
60
 
@@ -65,16 +74,17 @@ enve.truncate <- function
65
74
 
66
75
  enve.selvector <- function(sel, dim.names) {
67
76
  if(is.logical(sel)) {
68
- if(length(sel) != length(dim.names))
69
- stop('sel is logical but differs in length from dim.names')
77
+ if (length(sel) != length(dim.names))
78
+ stop("sel is logical but differs in length from dim.names")
70
79
  sel
71
- } else if(is.numeric(sel)) {
72
- if(max(sel) > length(dim.names))
73
- stop('sel includes numeric index beyond the length of dim.names')
80
+ } else if (is.numeric(sel)) {
81
+ if (max(sel) > length(dim.names))
82
+ stop("sel includes numeric index beyond the length of dim.names")
74
83
  1:length(dim.names) %in% sel
75
84
  } else {
76
- if(any(!sel %in% dim.names))
77
- stop('sel includes character index missing from dim.names')
85
+ if (any(!sel %in% dim.names))
86
+ stop("sel includes character index missing from dim.names")
78
87
  dim.names %in% sel
79
88
  }
80
89
  }
90
+
@@ -13,9 +13,10 @@ without selection is trivial, since both the distances space and the
13
13
  selection occur in the same transformed space. However, it's useful to
14
14
  compare randomly subsampled sets against a selected set of objects. This
15
15
  is intended to identify overdispersion or overclustering (see
16
- \code{\link{enve.TRIBStest}}) of a subset against the entire collection of objects
17
- with minimum impact of sampling biases. This object can be produced by
18
- \code{\link{enve.tribs}} and supports S4 methods \code{plot} and \code{summary}.
16
+ \code{\link{enve.TRIBStest}}) of a subset against the entire collection of
17
+ objects with minimum impact of sampling biases. This object can be produced
18
+ by \code{\link{enve.tribs}} and supports S4 methods \code{plot} and
19
+ \code{summary}.
19
20
  }
20
21
  \section{Slots}{
21
22
 
@@ -15,8 +15,8 @@ enve.TRIBS.merge(x, y)
15
15
  Returns an \code{\link{enve.TRIBS}} object.
16
16
  }
17
17
  \description{
18
- Merges two \code{\link{enve.TRIBS}} objects generated from the same objects at
19
- different subsampling levels.
18
+ Merges two \code{\link{enve.TRIBS}} objects generated from the same objects
19
+ at different subsampling levels.
20
20
  }
21
21
  \author{
22
22
  Luis M. Rodriguez-R [aut, cre]
@@ -7,9 +7,9 @@
7
7
  \title{Enveomics: TRIBS Test S4 Class}
8
8
  \description{
9
9
  Test of significance of overclustering or overdispersion in a selected
10
- set of objects with respect to the entire set (see \code{\link{enve.TRIBS}}). This
11
- object can be produced by \code{\link{enve.tribs.test}} and supports S4 methods
12
- \code{plot} and \code{summary}.
10
+ set of objects with respect to the entire set (see \code{\link{enve.TRIBS}}).
11
+ This object can be produced by \code{\link{enve.tribs.test}} and supports S4
12
+ methods \code{plot} and \code{summary}.
13
13
  }
14
14
  \section{Slots}{
15
15
 
@@ -7,13 +7,16 @@
7
7
  enve.__prune.iter(t, dist, min_dist, quiet)
8
8
  }
9
9
  \arguments{
10
- \item{t}{A \strong{phylo} object}
10
+ \item{t}{A \strong{phylo} object.}
11
11
 
12
- \item{dist}{Cophenetic distance matrix}
12
+ \item{dist}{Cophenetic distance matrix.}
13
13
 
14
- \item{min_dist}{Minimum distance}
14
+ \item{min_dist}{Minimum distance.}
15
15
 
16
- \item{quiet}{If running quietly}
16
+ \item{quiet}{If running quietly.}
17
+ }
18
+ \value{
19
+ Returns a \strong{phylo} object.
17
20
  }
18
21
  \description{
19
22
  Internal function for \code{\link{enve.prune.dist}}.
@@ -7,13 +7,16 @@
7
7
  enve.__prune.reduce(t, nodes, min_dist, quiet)
8
8
  }
9
9
  \arguments{
10
- \item{t}{A \strong{phylo} object}
10
+ \item{t}{A \strong{phylo} object.}
11
11
 
12
- \item{nodes}{Vector of nodes}
12
+ \item{nodes}{Vector of nodes.}
13
13
 
14
- \item{min_dist}{Minimum distance}
14
+ \item{min_dist}{Minimum distance.}
15
15
 
16
- \item{quiet}{If running quietly}
16
+ \item{quiet}{If running quietly.}
17
+ }
18
+ \value{
19
+ A \strong{phylo} object.
17
20
  }
18
21
  \description{
19
22
  Internal function for \code{\link{enve.prune.dist}}.
@@ -32,6 +32,10 @@ enve.__tribs(
32
32
 
33
33
  \item{dist}{Distance}
34
34
  }
35
+ \value{
36
+ A numeric indicating the \code{summary.fx} value applied to the
37
+ distance matrix subset
38
+ }
35
39
  \description{
36
40
  Internal ancillary function (see \code{\link{enve.tribs}}).
37
41
  }
@@ -66,36 +66,44 @@ Any value above 100 indicates that no values are to be reported.}
66
66
 
67
67
  \item{order}{Controls how the rows should be ordered.
68
68
  \itemize{
69
- \item{If \code{NULL}
70
- (default), \code{sort.by} is applied per row and the results are
71
- sorted decreasingly.}
72
- \item{If \code{NA}, no sorting is performed, i.e., the original
73
- order is respected.}
74
- \item{If a vector is provided, it is assumed to be the
75
- custom order to be used (either by numeric index or by row names).}
76
- }}
69
+ \item{
70
+ If \code{NULL} (default), \code{sort.by} is applied per row and the
71
+ results are sorted decreasingly.
72
+ }
73
+ \item{
74
+ If \code{NA}, no sorting is performed, i.e., the original order is
75
+ respected.
76
+ }
77
+ \item{
78
+ If a vector is provided, it is assumed to be the custom order to be used
79
+ (either by numeric index or by row names).
80
+ }
81
+ }}
77
82
 
78
83
  \item{col}{Colors to use. If provided, overrides the variables \code{top}
79
84
  and \code{colors.per.group}, but \code{other.col} is still used if the
80
- vector is insufficient for all the rows. An additional palette is available with
81
- \code{col='coto'} (contributed by Luis (Coto) Orellana).}
85
+ vector is insufficient for all the rows. An additional palette is available
86
+ with \code{col='coto'} (contributed by Luis (Coto) Orellana).}
82
87
 
83
88
  \item{...}{Any additional parameters to be passed to barplot.}
84
89
  }
90
+ \value{
91
+ No return value
92
+ }
85
93
  \description{
86
94
  Creates nice barplots from tab-delimited tables.
87
95
  }
88
96
  \examples{
89
97
  # Load data
90
- data("phyla.counts", package="enveomics.R", envir=environment())
98
+ data("phyla.counts", package = "enveomics.R", envir = environment())
91
99
  # Create a barplot sorted by variance with organic trends
92
100
  enve.barplot(
93
- phyla.counts, # Counts of phyla in four sites
94
- sizes=c(250,100,75,200), # Total sizes of the datasets of each site
95
- bars.width=2, # Decrease from default, so the names are fully displayed
96
- organic.trend=TRUE, # Nice curvy background
97
- sort.by=var # Sort by variance across sites
98
- )
101
+ phyla.counts, # Counts of phyla in four sites
102
+ sizes = c(250,100,75,200), # Total sizes of the datasets of each site
103
+ bars.width = 2, # Decrease from default, so the names are fully displayed
104
+ organic.trend = TRUE, # Nice curvy background
105
+ sort.by = var # Sort by variance across sites
106
+ )
99
107
 
100
108
  }
101
109
  \author{
@@ -19,6 +19,16 @@ including \code{alpha}.
19
19
  \description{
20
20
  Modify alpha in a color (or vector of colors).
21
21
  }
22
+ \examples{
23
+ # Hexcode for a color by hexcode
24
+ enve.col.alpha("#009988", 3/4) # "#009988BF"
25
+
26
+ # Hexcode for a color by name
27
+ enve.col.alpha("white", 1/4) # "#FFFFFF3F"
28
+
29
+ # Hexcode for a color from other functions
30
+ enve.col.alpha(rainbow(3)) # "#FF00007F" "#00FF007F" "#0000FF7F"
31
+ }
22
32
  \author{
23
33
  Luis M. Rodriguez-R [aut, cre]
24
34
  }
@@ -2,18 +2,24 @@
2
2
  % Please edit documentation in R/growthcurve.R
3
3
  \name{enve.col2alpha}
4
4
  \alias{enve.col2alpha}
5
- \title{Enveomics: Color to Alpha}
5
+ \title{Enveomics: Color to Alpha (deprecated)}
6
6
  \usage{
7
7
  enve.col2alpha(x, alpha)
8
8
  }
9
9
  \arguments{
10
10
  \item{x}{A vector of any value base colors.}
11
11
 
12
- \item{alpha}{Alpha level to set (in the 0-1 range).}
12
+ \item{alpha}{Alpha level to set, in the [0, 1] range.}
13
+ }
14
+ \value{
15
+ A vector of colors with alpha set.
13
16
  }
14
17
  \description{
15
18
  Takes a vector of colors and sets the alpha.
16
19
  }
20
+ \details{
21
+ DEPRECATED: Use instead \code{\link{enve.col.alpha}}.
22
+ }
17
23
  \author{
18
24
  Luis M. Rodriguez-R [aut, cre]
19
25
  }
@@ -39,6 +39,20 @@ Returns a \strong{dist} object.
39
39
  \description{
40
40
  Transform a dataframe (or coercible object, like a table) into a
41
41
  \strong{dist} object.
42
+ }
43
+ \examples{
44
+ # A sparse matrix representation of similarities as data frame.
45
+ # The column "extra_data" is meaningless, only included to illustrate
46
+ # the use of the obj*.index parameters
47
+ sim <- data.frame(
48
+ extra_data = c(0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.5),
49
+ query = c("A", "A", "A", "B", "C", "C", "D"),
50
+ subject = c("A", "B", "C", "B", "C", "B", "A"),
51
+ similarity = c(100, 90, 60, 100, 100, 70, 10)
52
+ )
53
+ dist <- enve.df2dist(sim, "query", "subject", "similarity", max.sim = 100)
54
+ print(dist)
55
+
42
56
  }
43
57
  \author{
44
58
  Luis M. Rodriguez-R [aut, cre]
@@ -18,7 +18,8 @@ enve.df2dist.group(
18
18
  \enumerate{
19
19
  \item ID of the object 1,
20
20
  \item ID of the object 2, and
21
- \item distance between the two objects.}}
21
+ \item distance between the two objects.
22
+ }}
22
23
 
23
24
  \item{obj1.index}{Index of the column containing the ID of the object 1.}
24
25
 
@@ -38,6 +39,24 @@ Returns a \strong{dist} object.
38
39
  Transform a dataframe (or coercible object, like a table) into a
39
40
  \strong{dist} object, where there are 1 or more distances between each pair
40
41
  of objects.
42
+ }
43
+ \examples{
44
+ # A sparse matrix representation of distances as data frame.
45
+ # Note that some pairs are repeated.
46
+ dist.df <- data.frame(
47
+ query = c("A", "A", "A", "B", "C", "C", "B", "B", "B"),
48
+ subject = c("A", "B", "C", "B", "C", "B", "A", "C", "C"),
49
+ distance = c( 0, 0.1, 0.4, 0, 0, 0.4, 0.2, 0.2, 0.1)
50
+ )
51
+ dist <- enve.df2dist.group(dist.df)
52
+ print(dist)
53
+
54
+ # Use the mean of all repeated occurrences instead of the median.
55
+ dist <- enve.df2dist.group(dist.df, summary = mean)
56
+
57
+ # Simply use the first occurrence for any given pair.
58
+ dist <- enve.df2dist.group(dist.df, summary = function(x) head(x, n = 1))
59
+
41
60
  }
42
61
  \author{
43
62
  Luis M. Rodriguez-R [aut, cre]
@@ -32,15 +32,14 @@ and the values correspond to the group.}
32
32
 
33
33
  \item{empty.rm}{Remove incomplete matrices.}
34
34
 
35
- \item{...}{Any other parameters supported by
36
- \code{\link{enve.df2dist.group}}.}
35
+ \item{...}{Any other parameters supported by \code{\link{enve.df2dist}}.}
37
36
  }
38
37
  \value{
39
38
  Returns a \strong{list} of \strong{dist} objects.
40
39
  }
41
40
  \description{
42
41
  Transform a dataframe (or coercible object, like a table)
43
- into a \strong{dist} object.
42
+ into a \strong{list} of \strong{dist} objects, one per group.
44
43
  }
45
44
  \author{
46
45
  Luis M. Rodriguez-R [aut, cre]
@@ -63,9 +63,12 @@ Calculates growth curves using the logistic growth function.
63
63
  }
64
64
  \examples{
65
65
  # Load data
66
- data("growth.curves", package="enveomics.R", envir=environment())
66
+ data("growth.curves", package = "enveomics.R", envir = environment())
67
+
67
68
  # Generate growth curves with different colors
68
- g <- enve.growthcurve(growth.curves[,-1], growth.curves[,1], triplicates=TRUE)
69
+ g <- enve.growthcurve(growth.curves[, -1], growth.curves[, 1],
70
+ triplicates = TRUE)
71
+
69
72
  # Generate black-and-white growth curves with different symbols
70
73
  plot(g, pch=15:17, col="black", band.density=45, band.angle=c(-45,45,0))
71
74
 
@@ -40,29 +40,31 @@ identity. This value is a percentage.}
40
40
  \item{id.binsize}{Size of the identity bins (vertical histograms). By default, 0.1 for
41
41
  identity metrics and 5 for bit score.}
42
42
 
43
- \item{id.splines}{Smoothing parameter for the splines in the identity histogram. Zero (0) for no
44
- splines. A generally good value is 1/2. If non-zero, requires the \pkg{stats} package.}
43
+ \item{id.splines}{Smoothing parameter for the splines in the identity histogram. Zero (0) for
44
+ no splines. A generally good value is 1/2. If non-zero, requires the
45
+ \pkg{stats} package.}
45
46
 
46
- \item{id.metric}{Metric of identity to be used (Y-axis).
47
- It can be any unambiguous prefix of:
47
+ \item{id.metric}{Metric of identity to be used (Y-axis). It can be any unambiguous prefix of:
48
48
  \itemize{
49
- \item "identity"
50
- \item "corrected identity"
51
- \item "bit score"}}
49
+ \item "identity"
50
+ \item "corrected identity"
51
+ \item "bit score"
52
+ }}
52
53
 
53
- \item{id.summary}{Method used to build the identity histogram (Horizontal axis of the right panel).
54
- It can be any unambiguous prefix of:
54
+ \item{id.summary}{Method used to build the identity histogram (Horizontal axis of the right
55
+ panel). It can be any unambiguous prefix of:
55
56
  \itemize{
56
- \item "sum"
57
- \item "average"
58
- \item "median"
59
- \item "90\% lower bound"
60
- \item "90\% upper bound"
61
- \item "95\% lower bound"
62
- \item "95\% upper bound" }
57
+ \item "sum"
58
+ \item "average"
59
+ \item "median"
60
+ \item "90\% lower bound"
61
+ \item "90\% upper bound"
62
+ \item "95\% lower bound"
63
+ \item "95\% upper bound"
64
+ }
63
65
  The last four options
64
- correspond to the upper and lower boundaries of the 90\% and 95\% empirical confidence
65
- intervals.}
66
+ correspond to the upper and lower boundaries of the 90\% and 95\% empirical
67
+ confidence intervals.}
66
68
 
67
69
  \item{pos.min}{Minimum (leftmost) position in the reference (concatenated) genome (in bp).}
68
70
 
@@ -71,8 +73,8 @@ By default: Length of the genome.}
71
73
 
72
74
  \item{pos.binsize}{Size of the position bins (horizontal histograms) in bp.}
73
75
 
74
- \item{pos.splines}{Smoothing parameter for the splines in the position histogram. Zero (0) for no splines.
75
- If non-zero, requires the stats package.}
76
+ \item{pos.splines}{Smoothing parameter for the splines in the position histogram. Zero (0) for
77
+ no splines. If non-zero, requires the stats package.}
76
78
 
77
79
  \item{rec.col1}{Lightest color in the recruitment plot.}
78
80
 
@@ -89,13 +91,14 @@ If non-zero, requires the stats package.}
89
91
  \item{ret.mode}{Indicates if the mode of the identity is to be computed. It requires the
90
92
  \pkg{modeest} package.}
91
93
 
92
- \item{id.cutoff}{Minimum identity to consider an alignment as "top". By default, it is 0.95 for the
93
- identity metrics and 95\% of the best scoring alignment for bit score.}
94
+ \item{id.cutoff}{Minimum identity to consider an alignment as "top". By default, it is 0.95
95
+ for the identity metrics and 95\% of the best scoring alignment for bit
96
+ score.}
94
97
 
95
98
  \item{verbose}{Indicates if the function should report the advance.}
96
99
 
97
- \item{...}{Any additional graphic parameters to be passed to plot for all panels except the
98
- recruitment plot (lower-left).}
100
+ \item{...}{Any additional graphic parameters to be passed to plot for all panels except
101
+ the recruitment plot (lower-left).}
99
102
  }
100
103
  \value{
101
104
  Returns a list with the following elements:
@@ -104,31 +107,36 @@ Returns a list with the following elements:
104
107
  \item{\code{pos.marks}}{Midpoints of the position histogram.}
105
108
  \item{\code{id.matrix}}{Midpoints of the identity histogram.}
106
109
  \item{\code{recplot}}{Matrix containing the recruitment plot values
107
- (if \code{ret.recplot=TRUE}).}
110
+ (if \code{ret.recplot=TRUE}).}
108
111
  \item{\code{id.mean}}{Mean identity.}
109
112
  \item{\code{id.median}}{Median identity.}
110
- \item{\code{id.mode}}{Mode of the identity (if \code{ret.mode=TRUE}). Deprecated.}
111
- \item{\code{id.hist}}{Values of the identity histogram (if \code{ret.hist=TRUE}).}
112
- \item{\code{pos.hist.low}}{Values of the position histogram (depth) with "low"
113
- identity (i.e., below id.cutoff) (if \code{ret.hist=TRUE}).}
114
- \item{\code{pos.hist.top}}{Values of the position histogram (depth) with "top"
115
- identity (i.e., above id.cutoff) (if \code{ret.hist=TRUE}).}
113
+ \item{\code{id.mode}}{Mode of the identity (if \code{ret.mode=TRUE}).
114
+ Deprecated.}
115
+ \item{\code{id.hist}}{Values of the identity histogram
116
+ (if \code{ret.hist=TRUE}).}
117
+ \item{\code{pos.hist.low}}{Values of the position histogram (depth) with
118
+ "low" identity (i.e., below id.cutoff) (if \code{ret.hist=TRUE}).}
119
+ \item{\code{pos.hist.top}}{Values of the position histogram (depth) with
120
+ "top" identity (i.e., above id.cutoff) (if \code{ret.hist=TRUE}).}
116
121
  \item{\code{id.max}}{Value of \code{id.max}. This is returned because
117
- \code{id.max=NULL} may vary.}
122
+ \code{id.max=NULL} may vary.}
118
123
  \item{\code{id.cutoff}}{Value of \code{id.cutoff}.
119
- This is returned because \code{id.cutoff=NULL} may vary.}
124
+ This is returned because \code{id.cutoff=NULL} may vary.}
120
125
  \item{\code{seqdepth.mean.top}}{Average sequencing depth with identity above
121
- \code{id.cutoff}.}
126
+ \code{id.cutoff}.}
122
127
  \item{\code{seqdepth.mean.low}}{Average sequencing depth with identity below
123
- \code{id.cutoff}.}
124
- \item{\code{seqdepth.mean.all}}{Average sequencing depth without identity filtering.}
125
- \item{\code{seqdepth.median.top}}{Median sequencing depth with identity above
126
- \code{id.cutoff}.}
127
- \item{\code{seqdepth.median.low}}{Median sequencing depth with identity below
128
- \code{id.cutoff}.}
129
- \item{\code{seqdepth.median.all}}{Median sequencing depth without identity filtering.}
128
+ \code{id.cutoff}.}
129
+ \item{\code{seqdepth.mean.all}}{Average sequencing depth without identity
130
+ filtering.}
131
+ \item{\code{seqdepth.median.top}}{Median sequencing depth with identity above
132
+ \code{id.cutoff}.}
133
+ \item{\code{seqdepth.median.low}}{Median sequencing depth with identity below
134
+ \code{id.cutoff}.}
135
+ \item{\code{seqdepth.median.all}}{Median sequencing depth without identity
136
+ filtering.}
130
137
  \item{\code{id.metric}}{Full name of the used identity metric.}
131
- \item{\code{id.summary}}{Full name of the summary method used to build the identity plot.}}
138
+ \item{\code{id.summary}}{Full name of the summary method used to build the
139
+ identity plot.}}
132
140
  }
133
141
  \description{
134
142
  Produces recruitment plots provided that BlastTab.catsbj.pl has
@@ -12,8 +12,11 @@ enve.recplot2.ANIr(x, range = c(0, Inf))
12
12
  \item{range}{Range of identities to be considered. By default, the full range
13
13
  is used (note that the upper boundary is \code{Inf} and not 100 because
14
14
  recruitment plots can also be built with bit-scores). To use only
15
- intra-population matches (with identities), use c(95,100). To use only
16
- inter-population values, use c(0,95).}
15
+ intra-population matches (with identities), use \code{c(95, 100)}. To use
16
+ only inter-population values, use \code{c(0, 95)}.}
17
+ }
18
+ \value{
19
+ A numeric value indicating the ANIr (as percentage).
17
20
  }
18
21
  \description{
19
22
  Estimate the Average Nucleotide Identity from reads (ANIr) from a
@@ -15,6 +15,9 @@ enve.recplot2.__counts(x, pos.breaks, id.breaks, rec.idcol)
15
15
 
16
16
  \item{rec.idcol}{Identity column to use}
17
17
  }
18
+ \value{
19
+ 2-dimensional matrix of counts per identity and position bins.
20
+ }
18
21
  \description{
19
22
  Internal ancillary function (see \code{\link{enve.recplot2}}).
20
23
  }
@@ -13,6 +13,9 @@ enve.recplot2.__peakHist(x, mids, counts = TRUE)
13
13
 
14
14
  \item{counts}{Counts}
15
15
  }
16
+ \value{
17
+ A numeric vector of counts (histogram)
18
+ }
16
19
  \description{
17
20
  Internal ancillary function (see \code{\link{enve.RecPlot2.Peak}}).
18
21
  }
@@ -11,6 +11,9 @@ enve.recplot2.__whichClosestPeak(peak, peaks)
11
11
 
12
12
  \item{peaks}{list of \code{\link{enve.RecPlot2.Peak}} objects}
13
13
  }
14
+ \value{
15
+ A numeric index out of \code{peaks}.
16
+ }
14
17
  \description{
15
18
  Internal ancillary function (see \code{\link{enve.recplot2.findPeaks}}).
16
19
  }
@@ -11,6 +11,9 @@ enve.recplot2.changeCutoff(rp, new.cutoff = 98)
11
11
 
12
12
  \item{new.cutoff}{New cutoff to use.}
13
13
  }
14
+ \value{
15
+ The modified \code{\link{enve.RecPlot2}} object.
16
+ }
14
17
  \description{
15
18
  Change the intra-species cutoff of an existing recruitment plot.
16
19
  }
@@ -21,10 +21,12 @@ enve.recplot2.compareIdentities(
21
21
  \item{method}{Distance method to use. This should be (an unambiguous abbreviation of)
22
22
  one of:
23
23
  \itemize{
24
- \item{"hellinger" (\emph{Hellinger, 1090, doi:10.1515/crll.1909.136.210}),}
25
- \item{"bhattacharyya" (\emph{Bhattacharyya, 1943, Bull. Calcutta Math. Soc. 35}),}
26
- \item{"kl" or "kullback-leibler" (\emph{Kullback & Leibler, 1951,
27
- doi:10.1214/aoms/1177729694}), or}
24
+ \item{"hellinger"
25
+ (\emph{Hellinger, 1090, doi:10.1515/crll.1909.136.210}),}
26
+ \item{"bhattacharyya"
27
+ (\emph{Bhattacharyya, 1943, Bull. Calcutta Math. Soc. 35}),}
28
+ \item{"kl" or "kullback-leibler"
29
+ (\emph{Kullback & Leibler, 1951, doi:10.1214/aoms/1177729694}), or}
28
30
  \item{"euclidean"}
29
31
  }}
30
32
 
@@ -38,6 +40,9 @@ cross-validation (see \code{smooth.spline} parameter \code{spar}).}
38
40
  \item{max.deviation}{Maximum mean deviation between identity breaks tolerated (as percent
39
41
  identity). Difference in number of \code{id.breaks} is never tolerated.}
40
42
  }
43
+ \value{
44
+ A \strong{numeric} indicating the distance between the objects.
45
+ }
41
46
  \description{
42
47
  Compare the distribution of identities between two
43
48
  \code{\link{enve.RecPlot2}} objects.
@@ -9,6 +9,9 @@ enve.recplot2.corePeak(x)
9
9
  \arguments{
10
10
  \item{x}{\code{list} of \code{\link{enve.RecPlot2.Peak}} objects.}
11
11
  }
12
+ \value{
13
+ A \code{\link{enve.RecPlot2.Peak}} object.
14
+ }
12
15
  \description{
13
16
  Finds the peak in a list of peaks that is most likely to represent the
14
17
  "core genome" of a population.
@@ -15,9 +15,9 @@ enve.recplot2.extractWindows(
15
15
  \arguments{
16
16
  \item{rp}{Recruitment plot, a \code{\link{enve.RecPlot2}} object.}
17
17
 
18
- \item{peak}{Peak, an \code{\link{enve.RecPlot2.Peak}} object. If list, it is assumed to be a
19
- list of \code{\link{enve.RecPlot2.Peak}} objects, in which case the core peak is
20
- used (see \code{\link{enve.recplot2.corePeak}}).}
18
+ \item{peak}{Peak, an \code{\link{enve.RecPlot2.Peak}} object. If list, it is assumed to
19
+ be a list of \code{\link{enve.RecPlot2.Peak}} objects, in which case the core
20
+ peak is used (see \code{\link{enve.recplot2.corePeak}}).}
21
21
 
22
22
  \item{lower.tail}{If \code{FALSE}, it returns windows significantly above the peak in
23
23
  sequencing depth.}
@@ -31,6 +31,4 @@ sub-population mixtures.
31
31
  }
32
32
  \author{
33
33
  Luis M. Rodriguez-R [aut, cre]
34
-
35
- export
36
34
  }
@@ -11,6 +11,10 @@ enve.recplot2.findPeaks.__em_e(x, theta)
11
11
 
12
12
  \item{theta}{Parameters list}
13
13
  }
14
+ \value{
15
+ A list with components \code{ll} (numeric) the log-likelihood, and
16
+ \code{posterior} (numeric) the posterior probability.
17
+ }
14
18
  \description{
15
19
  Internal ancillary function (see \code{\link{enve.recplot2.findPeaks.em}}).
16
20
  }
@@ -11,6 +11,11 @@ enve.recplot2.findPeaks.__em_m(x, posterior)
11
11
 
12
12
  \item{posterior}{Posterior probability}
13
13
  }
14
+ \value{
15
+ A list with components \code{mu} (numeric) the estimated mean,
16
+ \code{sd} (numeric) the estimated standard deviation, and \code{alpha}
17
+ (numeric) the estimated alpha parameter.
18
+ }
14
19
  \description{
15
20
  Internal ancillary function (see \code{\link{enve.recplot2.findPeaks.em}}).
16
21
  }