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.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/miga/cli.rb +43 -223
  4. data/lib/miga/cli/action/add.rb +91 -62
  5. data/lib/miga/cli/action/classify_wf.rb +97 -0
  6. data/lib/miga/cli/action/daemon.rb +14 -10
  7. data/lib/miga/cli/action/derep_wf.rb +95 -0
  8. data/lib/miga/cli/action/doctor.rb +83 -55
  9. data/lib/miga/cli/action/get.rb +68 -52
  10. data/lib/miga/cli/action/get_db.rb +206 -0
  11. data/lib/miga/cli/action/index_wf.rb +31 -0
  12. data/lib/miga/cli/action/init.rb +115 -190
  13. data/lib/miga/cli/action/init/daemon_helper.rb +124 -0
  14. data/lib/miga/cli/action/ls.rb +20 -11
  15. data/lib/miga/cli/action/ncbi_get.rb +199 -157
  16. data/lib/miga/cli/action/preproc_wf.rb +46 -0
  17. data/lib/miga/cli/action/quality_wf.rb +45 -0
  18. data/lib/miga/cli/action/stats.rb +147 -99
  19. data/lib/miga/cli/action/summary.rb +10 -4
  20. data/lib/miga/cli/action/tax_dist.rb +61 -46
  21. data/lib/miga/cli/action/tax_test.rb +46 -39
  22. data/lib/miga/cli/action/wf.rb +178 -0
  23. data/lib/miga/cli/base.rb +11 -0
  24. data/lib/miga/cli/objects_helper.rb +88 -0
  25. data/lib/miga/cli/opt_helper.rb +160 -0
  26. data/lib/miga/daemon.rb +7 -4
  27. data/lib/miga/dataset/base.rb +5 -5
  28. data/lib/miga/project/base.rb +4 -4
  29. data/lib/miga/project/result.rb +2 -1
  30. data/lib/miga/remote_dataset/base.rb +5 -5
  31. data/lib/miga/remote_dataset/download.rb +1 -1
  32. data/lib/miga/version.rb +3 -3
  33. data/scripts/cds.bash +3 -1
  34. data/scripts/essential_genes.bash +1 -0
  35. data/scripts/stats.bash +1 -1
  36. data/scripts/trimmed_fasta.bash +5 -3
  37. data/utils/distance/runner.rb +3 -0
  38. data/utils/distance/temporal.rb +10 -1
  39. data/utils/enveomics/Manifest/Tasks/fasta.json +5 -0
  40. data/utils/enveomics/Manifest/Tasks/sequence-identity.json +7 -0
  41. data/utils/enveomics/Scripts/BlastTab.addlen.rb +33 -31
  42. data/utils/enveomics/Scripts/FastA.tag.rb +42 -41
  43. data/utils/enveomics/Scripts/HMM.essential.rb +85 -55
  44. data/utils/enveomics/Scripts/HMM.haai.rb +29 -20
  45. data/utils/enveomics/Scripts/SRA.download.bash +1 -1
  46. data/utils/enveomics/Scripts/aai.rb +163 -128
  47. data/utils/enveomics/build_enveomics_r.bash +11 -10
  48. data/utils/enveomics/enveomics.R/DESCRIPTION +3 -2
  49. data/utils/enveomics/enveomics.R/R/autoprune.R +141 -107
  50. data/utils/enveomics/enveomics.R/R/barplot.R +105 -86
  51. data/utils/enveomics/enveomics.R/R/cliopts.R +131 -115
  52. data/utils/enveomics/enveomics.R/R/df2dist.R +144 -106
  53. data/utils/enveomics/enveomics.R/R/growthcurve.R +201 -133
  54. data/utils/enveomics/enveomics.R/R/recplot.R +350 -315
  55. data/utils/enveomics/enveomics.R/R/recplot2.R +1334 -914
  56. data/utils/enveomics/enveomics.R/R/tribs.R +521 -361
  57. data/utils/enveomics/enveomics.R/R/utils.R +31 -15
  58. data/utils/enveomics/enveomics.R/README.md +7 -0
  59. data/utils/enveomics/enveomics.R/man/cash-enve.GrowthCurve-method.Rd +17 -0
  60. data/utils/enveomics/enveomics.R/man/cash-enve.RecPlot2-method.Rd +17 -0
  61. data/utils/enveomics/enveomics.R/man/cash-enve.RecPlot2.Peak-method.Rd +17 -0
  62. data/utils/enveomics/enveomics.R/man/enve.GrowthCurve-class.Rd +16 -21
  63. data/utils/enveomics/enveomics.R/man/enve.TRIBS-class.Rd +31 -28
  64. data/utils/enveomics/enveomics.R/man/enve.TRIBS.merge.Rd +23 -19
  65. data/utils/enveomics/enveomics.R/man/enve.TRIBStest-class.Rd +36 -26
  66. data/utils/enveomics/enveomics.R/man/enve.__prune.iter.Rd +23 -24
  67. data/utils/enveomics/enveomics.R/man/enve.__prune.reduce.Rd +23 -24
  68. data/utils/enveomics/enveomics.R/man/enve.__tribs.Rd +32 -33
  69. data/utils/enveomics/enveomics.R/man/enve.barplot.Rd +91 -64
  70. data/utils/enveomics/enveomics.R/man/enve.cliopts.Rd +57 -37
  71. data/utils/enveomics/enveomics.R/man/enve.col.alpha.Rd +24 -19
  72. data/utils/enveomics/enveomics.R/man/enve.col2alpha.Rd +19 -18
  73. data/utils/enveomics/enveomics.R/man/enve.df2dist.Rd +39 -26
  74. data/utils/enveomics/enveomics.R/man/enve.df2dist.group.Rd +38 -25
  75. data/utils/enveomics/enveomics.R/man/enve.df2dist.list.Rd +40 -26
  76. data/utils/enveomics/enveomics.R/man/enve.growthcurve.Rd +67 -49
  77. data/utils/enveomics/enveomics.R/man/enve.prune.dist.Rd +37 -28
  78. data/utils/enveomics/enveomics.R/man/enve.recplot.Rd +122 -97
  79. data/utils/enveomics/enveomics.R/man/enve.recplot2-class.Rd +35 -31
  80. data/utils/enveomics/enveomics.R/man/enve.recplot2.ANIr.Rd +24 -23
  81. data/utils/enveomics/enveomics.R/man/enve.recplot2.Rd +68 -51
  82. data/utils/enveomics/enveomics.R/man/enve.recplot2.__counts.Rd +25 -24
  83. data/utils/enveomics/enveomics.R/man/enve.recplot2.__peakHist.Rd +21 -22
  84. data/utils/enveomics/enveomics.R/man/enve.recplot2.__whichClosestPeak.Rd +19 -20
  85. data/utils/enveomics/enveomics.R/man/enve.recplot2.changeCutoff.Rd +19 -18
  86. data/utils/enveomics/enveomics.R/man/enve.recplot2.compareIdentities.Rd +41 -32
  87. data/utils/enveomics/enveomics.R/man/enve.recplot2.coordinates.Rd +29 -24
  88. data/utils/enveomics/enveomics.R/man/enve.recplot2.corePeak.Rd +18 -18
  89. data/utils/enveomics/enveomics.R/man/enve.recplot2.extractWindows.Rd +40 -34
  90. data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.Rd +36 -24
  91. data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.__em_e.Rd +19 -20
  92. data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.__em_m.Rd +19 -20
  93. data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.__emauto_one.Rd +27 -29
  94. data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.__mow_one.Rd +41 -42
  95. data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.__mower.Rd +17 -18
  96. data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.em.Rd +43 -33
  97. data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.emauto.Rd +36 -28
  98. data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.mower.Rd +74 -56
  99. data/utils/enveomics/enveomics.R/man/enve.recplot2.peak-class.Rd +44 -31
  100. data/utils/enveomics/enveomics.R/man/enve.recplot2.seqdepth.Rd +27 -22
  101. data/utils/enveomics/enveomics.R/man/enve.recplot2.windowDepthThreshold.Rd +32 -26
  102. data/utils/enveomics/enveomics.R/man/enve.tribs.Rd +59 -44
  103. data/utils/enveomics/enveomics.R/man/enve.tribs.test.Rd +28 -21
  104. data/utils/enveomics/enveomics.R/man/enve.truncate.Rd +27 -22
  105. data/utils/enveomics/enveomics.R/man/plot.enve.GrowthCurve.Rd +63 -43
  106. data/utils/enveomics/enveomics.R/man/plot.enve.TRIBS.Rd +38 -29
  107. data/utils/enveomics/enveomics.R/man/plot.enve.TRIBStest.Rd +38 -30
  108. data/utils/enveomics/enveomics.R/man/plot.enve.recplot2.Rd +111 -83
  109. data/utils/enveomics/enveomics.R/man/summary.enve.GrowthCurve.Rd +19 -18
  110. data/utils/enveomics/enveomics.R/man/summary.enve.TRIBS.Rd +19 -18
  111. data/utils/enveomics/enveomics.R/man/summary.enve.TRIBStest.Rd +19 -18
  112. data/utils/find-medoid.R +3 -2
  113. data/utils/representatives.rb +5 -3
  114. data/utils/subclade/pipeline.rb +22 -11
  115. data/utils/subclade/runner.rb +5 -1
  116. data/utils/subclades-compile.rb +1 -1
  117. data/utils/subclades.R +9 -3
  118. metadata +15 -4
  119. data/utils/enveomics/enveomics.R/man/enveomics.R-package.Rd +0 -15
  120. data/utils/enveomics/enveomics.R/man/z$-methods.Rd +0 -26
@@ -1,25 +1,38 @@
1
- \name{enve.df2dist.group}
2
- \alias{enve.df2dist.group}
3
- \title{enve df2dist group}
4
- \description{Transform a dataframe (or coercible object, like a table) into a `dist` object, where
5
- there are 1 or more distances between each pair of objects.}
6
- \usage{enve.df2dist.group(x, obj1.index = 1, obj2.index = 2, dist.index = 3,
7
- summary = median, empty.rm = TRUE)}
8
- \arguments{
9
- \item{x}{A dataframe (or coercible object) with at least three columns: (1) ID of the object 1,
10
- (2) ID of the object 2, and (3) distance between the two objects.}
11
- \item{obj1.index}{Index of the column containing the ID of the object 1.}
12
- \item{obj2.index}{Index of the column containing the ID of the object 2.}
13
- \item{dist.index}{Index of the column containing the distance.}
14
- \item{summary}{Function summarizing the different distances between the two objects.}
15
- \item{empty.rm}{Remove rows with empty or NA groups}
16
- }
17
-
18
- \value{Returns a `dist` object.}
19
-
20
- \author{Luis M. Rodriguez-R [aut, cre]}
21
-
22
-
23
-
24
-
25
-
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/df2dist.R
3
+ \name{enve.df2dist.group}
4
+ \alias{enve.df2dist.group}
5
+ \title{Enveomics: Data Frame to Dist (Group)}
6
+ \usage{
7
+ enve.df2dist.group(x, obj1.index = 1, obj2.index = 2, dist.index = 3,
8
+ summary = median, empty.rm = TRUE)
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{summary}{Function summarizing the different distances between the
24
+ two objects.}
25
+
26
+ \item{empty.rm}{Remove rows with empty or \code{NA} groups.}
27
+ }
28
+ \value{
29
+ Returns a \strong{dist} object.
30
+ }
31
+ \description{
32
+ Transform a dataframe (or coercible object, like a table) into a
33
+ \strong{dist} object, where there are 1 or more distances between each pair
34
+ of objects.
35
+ }
36
+ \author{
37
+ Luis M. Rodriguez-R [aut, cre]
38
+ }
@@ -1,26 +1,40 @@
1
- \name{enve.df2dist.list}
2
- \alias{enve.df2dist.list}
3
- \title{enve df2dist list}
4
- \description{Transform a dataframe (or coercible object, like a table) into a `dist` object.}
5
- \usage{enve.df2dist.list(x, groups, obj1.index = 1, obj2.index = 2,
6
- dist.index = 3, empty.rm = TRUE, ...)}
7
- \arguments{
8
- \item{x}{A dataframe (or coercible object) with at least three columns: (1) ID of the object 1,
9
- (2) ID of the object 2, and (3) distance between the two objects.}
10
- \item{groups}{Named array where the IDs correspond to the object IDs, and the values correspond to
11
- the group.}
12
- \item{obj1.index}{Index of the column containing the ID of the object 1.}
13
- \item{obj2.index}{Index of the column containing the ID of the object 2.}
14
- \item{dist.index}{Index of the column containing the distance.}
15
- \item{empty.rm}{Remove incomplete matrices}
16
- \item{\dots}{Any other parameters supported by `enve.df2dist.group`.}
17
- }
18
-
19
- \value{Returns a `list` of `dist` object.}
20
-
21
- \author{Luis M. Rodriguez-R [aut, cre]}
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.list}
4
+ \alias{enve.df2dist.list}
5
+ \title{Enveomics: Data Frame to Dist (List)}
6
+ \usage{
7
+ enve.df2dist.list(x, groups, obj1.index = 1, obj2.index = 2,
8
+ dist.index = 3, empty.rm = TRUE, ...)
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{groups}{Named array where the IDs correspond to the object IDs,
18
+ and the values correspond to the group.}
19
+
20
+ \item{obj1.index}{Index of the column containing the ID of the object 1.}
21
+
22
+ \item{obj2.index}{Index of the column containing the ID of the object 2.}
23
+
24
+ \item{dist.index}{Index of the column containing the distance.}
25
+
26
+ \item{empty.rm}{Remove incomplete matrices.}
27
+
28
+ \item{...}{Any other parameters supported by
29
+ \code{\link{enve.df2dist.group}}.}
30
+ }
31
+ \value{
32
+ Returns a \strong{list} of \strong{dist} objects.
33
+ }
34
+ \description{
35
+ Transform a dataframe (or coercible object, like a table)
36
+ into a \strong{dist} object.
37
+ }
38
+ \author{
39
+ Luis M. Rodriguez-R [aut, cre]
40
+ }
@@ -1,49 +1,67 @@
1
- \name{enve.growthcurve}
2
- \alias{enve.growthcurve}
3
- \title{enve growthcurve}
4
- \description{Calculates growth curves using the logistic growth function.}
5
- \usage{enve.growthcurve(x, times = 1:nrow(x), triplicates = FALSE, design,
6
- new.times = seq(min(times), max(times), length.out = length(times) *
7
- 10), level = 0.95, interval = c("confidence", "prediction"),
8
- plot = TRUE, FUN = function(t, K, r, P0) K * P0 * exp(r *
9
- t)/(K + P0 * (exp(r * t) - 1)), nls.opt = list(), ...)}
10
- \arguments{
11
- \item{x}{Data frame (or coercible) containing the observed growth data (e.g.,
12
- O.D. values). Each column is an independent growth curve and each
13
- row is a time point. NA's are allowed.}
14
- \item{times}{Vector with the times at which each row was taken. By default, all
15
- rows are assumed to be part of constantly periodic measurements.}
16
- \item{triplicates}{If TRUE, the columns are assumed to be sorted by sample with three
17
- replicates by sample. It requires a number of columns multiple of 3.}
18
- \item{design}{Experimental design of the data. An `array` of mode list with sample
19
- names as index and the list of column names in each sample as the
20
- values. By default, each column is assumed to be an independent sample
21
- if `triplicates` is FALSE, or every three columns are assumed to be a
22
- sample if `triplicates` is TRUE. In the latter case, samples are
23
- simply numbered.}
24
- \item{new.times}{Values of time for the fitted curve.}
25
- \item{level}{Confidence (or prediction) interval in the fitted curve.}
26
- \item{interval}{Type of interval to be calculated for the fitted curve.}
27
- \item{plot}{Should the growth curve be plotted?}
28
- \item{FUN}{Function to fit. By default: logistic growth with paramenters `K`:
29
- carrying capacity, `r`: intrinsic growth rate, and `P0`: Initial
30
- population.}
31
- \item{nls.opt}{Any additional options passed to `nls`.}
32
- \item{\dots}{Any additional parameters to be passed to `plot.enve.GrowthCurve`.}
33
- }
34
-
35
- \value{Returns an `enve.GrowthCurve` object.}
36
-
37
- \author{Luis M. Rodriguez-R [aut, cre]}
38
-
39
-
40
-
41
-
42
- \examples{
43
- # Load data
44
- data("growth.curves", package="enveomics.R", envir=environment())
45
- # Generate growth curves with different colors
46
- g <- enve.growthcurve(growth.curves[,-1], growth.curves[,1], triplicates=TRUE)
47
- # Generate black-and-white growth curves with different symbols
48
- plot(g, pch=15:17, col="black", band.density=45, band.angle=c(-45,45,0))
49
- }
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/growthcurve.R
3
+ \name{enve.growthcurve}
4
+ \alias{enve.growthcurve}
5
+ \title{Enveomics: Growth Curve}
6
+ \usage{
7
+ enve.growthcurve(x, times = 1:nrow(x), triplicates = FALSE, design,
8
+ new.times = seq(min(times), max(times), length.out = length(times) *
9
+ 10), level = 0.95, interval = c("confidence", "prediction"),
10
+ plot = TRUE, FUN = function(t, K, r, P0) K * P0 * exp(r * t)/(K + P0
11
+ * (exp(r * t) - 1)), nls.opt = list(), ...)
12
+ }
13
+ \arguments{
14
+ \item{x}{Data frame (or coercible) containing the observed growth data
15
+ (e.g., O.D. values). Each column is an independent growth curve and each
16
+ row is a time point. \code{NA}'s are allowed.}
17
+
18
+ \item{times}{Vector with the times at which each row was taken. By default,
19
+ all rows are assumed to be part of constantly periodic measurements.}
20
+
21
+ \item{triplicates}{If \code{TRUE}, the columns are assumed to be sorted by
22
+ sample with three replicates by sample. It requires a number of columns
23
+ multiple of 3.}
24
+
25
+ \item{design}{Experimental design of the data. An \strong{array} of mode list
26
+ with sample names as index and the list of column names in each sample as
27
+ the values. By default, each column is assumed to be an independent sample
28
+ if \code{triplicates} is \code{FALSE}, or every three columns are assumed
29
+ to be a sample if \code{triplicates} is \code{TRUE}. In the latter case,
30
+ samples are simply numbered.}
31
+
32
+ \item{new.times}{Values of time for the fitted curve.}
33
+
34
+ \item{level}{Confidence (or prediction) interval in the fitted curve.}
35
+
36
+ \item{interval}{Type of interval to be calculated for the fitted curve.}
37
+
38
+ \item{plot}{Should the growth curve be plotted?}
39
+
40
+ \item{FUN}{Function to fit. By default: logistic growth with paramenters
41
+ \code{K}: carrying capacity,
42
+ \code{r}: intrinsic growth rate, and
43
+ \code{P0}: Initial population.}
44
+
45
+ \item{nls.opt}{Any additional options passed to \code{nls}.}
46
+
47
+ \item{...}{Any additional parameters to be passed to
48
+ \code{plot.enve.GrowthCurve}.}
49
+ }
50
+ \value{
51
+ Returns an \code{\link{enve.GrowthCurve}} object.
52
+ }
53
+ \description{
54
+ Calculates growth curves using the logistic growth function.
55
+ }
56
+ \examples{
57
+ # Load data
58
+ data("growth.curves", package="enveomics.R", envir=environment())
59
+ # Generate growth curves with different colors
60
+ g <- enve.growthcurve(growth.curves[,-1], growth.curves[,1], triplicates=TRUE)
61
+ # Generate black-and-white growth curves with different symbols
62
+ plot(g, pch=15:17, col="black", band.density=45, band.angle=c(-45,45,0))
63
+
64
+ }
65
+ \author{
66
+ Luis M. Rodriguez-R [aut, cre]
67
+ }
@@ -1,28 +1,37 @@
1
- \name{enve.prune.dist}
2
- \alias{enve.prune.dist}
3
- \title{enve prune dist}
4
- \description{Automatically prunes a tree, to keep representatives of each clade.}
5
- \usage{enve.prune.dist(t, dist.quantile = 0.25, min_dist, quiet = FALSE,
6
- max_iters = 100, min_nodes_random = 40000, random_nodes_frx = 1)}
7
- \arguments{
8
- \item{t}{A `phylo` object or a path to the Newick file.}
9
- \item{dist.quantile}{The quantile of edge lengths.}
10
- \item{min_dist}{The minimum distance to allow between two tips. If not set, dist.quantile is
11
- used instead to calculate it.}
12
- \item{quiet}{Boolean indicating if the function must run without output.}
13
- \item{max_iters}{Maximum number of iterations.}
14
- \item{min_nodes_random}{Minimum number of nodes to trigger "tip-pairs" nodes sampling. This sampling
15
- is less reproducible and more computationally expensive, but it's the only
16
- solution if the cophenetic matrix exceeds 2^31-1 entries; above that, it
17
- cannot be represented in R.}
18
- \item{random_nodes_frx}{Fraction of the nodes to be sampled if more than `min_nodes_random`.}
19
- }
20
-
21
- \value{Returns a pruned phylo object.}
22
-
23
- \author{Luis M. Rodriguez-R [aut, cre]}
24
-
25
-
26
-
27
-
28
-
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/autoprune.R
3
+ \name{enve.prune.dist}
4
+ \alias{enve.prune.dist}
5
+ \title{Enveomics: Prune Dist}
6
+ \usage{
7
+ enve.prune.dist(t, dist.quantile = 0.25, min_dist, quiet = FALSE,
8
+ max_iters = 100, min_nodes_random = 40000, random_nodes_frx = 1)
9
+ }
10
+ \arguments{
11
+ \item{t}{A \strong{phylo} object or a path to the Newick file.}
12
+
13
+ \item{dist.quantile}{The quantile of edge lengths.}
14
+
15
+ \item{min_dist}{The minimum distance to allow between two tips.
16
+ If not set, \code{dist.quantile} is used instead to calculate it.}
17
+
18
+ \item{quiet}{Boolean indicating if the function must run without output.}
19
+
20
+ \item{max_iters}{Maximum number of iterations.}
21
+
22
+ \item{min_nodes_random}{Minimum number of nodes to trigger \emph{tip-pairs} nodes sampling.
23
+ This sampling is less reproducible and more computationally expensive,
24
+ but it's the only solution if the cophenetic matrix exceeds \code{2^31-1}
25
+ entries; above that, it cannot be represented in R.}
26
+
27
+ \item{random_nodes_frx}{Fraction of the nodes to be sampled if more than \code{min_nodes_random}.}
28
+ }
29
+ \value{
30
+ Returns a pruned \strong{phylo} object.
31
+ }
32
+ \description{
33
+ Automatically prunes a tree, to keep representatives of each clade.
34
+ }
35
+ \author{
36
+ Luis M. Rodriguez-R [aut, cre]
37
+ }
@@ -1,97 +1,122 @@
1
- \name{enve.recplot}
2
- \alias{enve.recplot}
3
- \title{enve recplot}
4
- \description{Produces recruitment plots provided that BlastTab.catsbj.pl has
5
- been previously executed. Requires the gplots library.}
6
- \usage{enve.recplot(prefix, id.min = NULL, id.max = NULL, id.binsize = NULL,
7
- id.splines = 0, id.metric = "id", id.summary = "sum", pos.min = 1,
8
- pos.max = NULL, pos.binsize = 1000, pos.splines = 0, rec.col1 = "white",
9
- rec.col2 = "black", main = NULL, contig.col = grey(0.85),
10
- ret.recplot = FALSE, ret.hist = FALSE, ret.mode = FALSE,
11
- id.cutoff = NULL, verbose = TRUE, ...)}
12
- \arguments{
13
- \item{prefix}{Path to the prefix of the BlastTab.catsbj.pl output files. At
14
- least the files .rec and .lim must exist with this prefix.}
15
- \item{id.min}{Minimum identity to be considered. By default, the minimum detected
16
- identity. This value is a percentage.}
17
- \item{id.max}{Maximum identity to be considered. By default, 100.}
18
- \item{id.binsize}{Size of the identity bins (vertical histograms). By default, 0.1 for
19
- identity metrics and 5 for bit score.}
20
- \item{id.splines}{Smoothing parameter for the splines in the identity histogram. Zero (0) for no
21
- splines. A generally good value is 1/2. If non-zero, requires the stats package.}
22
- \item{id.metric}{Metric of identity to be used (Y-axis). It can be any unambiguous prefix
23
- of "identity", "corrected identity", or "bit score".}
24
- \item{id.summary}{Method used to build the identity histogram (Horizontal axis of the right panel).
25
- It can be any unambiguous prefix of "sum", "average", "median", "90\% lower bound",
26
- "90\% upper bound", "95\% lower bound", and "95\% upper bound". The last four options
27
- correspond to the upper and lower boundaries of the 90\% and 95\% empirical confidence
28
- intervals.}
29
- \item{pos.min}{Minimum (leftmost) position in the reference (concatenated) genome (in bp).}
30
- \item{pos.max}{Maximum (rightmost) position in the reference (concatenated) genome (in bp).
31
- By default: Length of the genome.}
32
- \item{pos.binsize}{Size of the position bins (horizontal histograms) in bp.}
33
- \item{pos.splines}{Smoothing parameter for the splines in the position histogram. Zero (0) for no splines.
34
- If non-zero, requires the stats package.}
35
- \item{rec.col1}{Lightest color in the recruitment plot.}
36
- \item{rec.col2}{Darkest color in the recruitment plot.}
37
- \item{main}{Title of the plot.}
38
- \item{contig.col}{Color of the Contig boundaries. Set to NA to ignore Contig boundaries.}
39
- \item{ret.recplot}{Indicates if the matrix of the recruitment plot is to be returned.}
40
- \item{ret.hist}{Ignored, for backwards compatibility.}
41
- \item{ret.mode}{Indicates if the mode of the identity is to be computed. It requires the modeest
42
- package.}
43
- \item{id.cutoff}{Minimum identity to consider an alignment as "top". By default, it is 0.95 for the
44
- identity metrics and 95\% of the best scoring alignment for bit score.}
45
- \item{verbose}{Indicates if the function should report the advance.}
46
- \item{\dots}{Any additional graphic parameters to be passed to plot for all panels except the
47
- recruitment plot (lower-left).}
48
- }
49
-
50
- \value{A list with the following elements:
51
-
52
- pos.marks: Midpoints of the position histogram.
53
-
54
- id.matrix: Midpoints of the identity histogram.
55
-
56
- recplot (if ret.recplot=TRUE): Matrix containing the recruitment plot values.
57
-
58
- id.mean: Mean identity.
59
-
60
- id.median: Median identity.
61
-
62
- id.mode (if ret.mode=TRUE): Mode of the identity. Deprecated.
63
-
64
- id.hist (if ret.hist=TRUE): Values of the identity histogram.
65
-
66
- pos.hist.low (if ret.hist=TRUE): Values of the position histogram (depth) with "low"
67
- identity (i.e., below id.cutoff).
68
-
69
- pos.hist.top (if ret.hist=TRUE): Values of the position histogram (depth) with "top"
70
- identity (i.e., above id.cutoff).
71
-
72
- id.max: Value of id.max. This is returned because id.max=NULL may vary.
73
-
74
- id.cutoff: Value of id.cutoff. This is returned because id.cutoff=NULL may vary.
75
-
76
- seqdepth.mean.top: Average sequencing depth with identity above id.cutoff.
77
-
78
- seqdepth.mean.low: Average sequencing depth with identity below id.cutoff.
79
-
80
- seqdepth.mean.all: Average sequencing depth without identity filtering.
81
-
82
- seqdepth.median.top: Median sequencing depth with identity above id.cutoff.
83
-
84
- seqdepth.median.low: Median sequencing depth with identity below id.cutoff.
85
-
86
- seqdepth.median.all: Median sequencing depth without identity filtering.
87
-
88
- id.metric: Full name of the used identity metric.
89
-
90
- id.summary: Full name of the summary method used to build the identity plot.}
91
-
92
- \author{Luis M. Rodriguez-R [aut, cre]}
93
-
94
-
95
-
96
-
97
-
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/recplot.R
3
+ \name{enve.recplot}
4
+ \alias{enve.recplot}
5
+ \title{Enveomics: Recruitment Plots}
6
+ \usage{
7
+ enve.recplot(prefix, id.min = NULL, id.max = NULL, id.binsize = NULL,
8
+ id.splines = 0, id.metric = "id", id.summary = "sum",
9
+ pos.min = 1, pos.max = NULL, pos.binsize = 1000, pos.splines = 0,
10
+ rec.col1 = "white", rec.col2 = "black", main = NULL,
11
+ contig.col = grey(0.85), ret.recplot = FALSE, ret.hist = FALSE,
12
+ ret.mode = FALSE, id.cutoff = NULL, verbose = TRUE, ...)
13
+ }
14
+ \arguments{
15
+ \item{prefix}{Path to the prefix of the BlastTab.catsbj.pl output files. At
16
+ least the files \strong{.rec} and \strong{.lim} must exist with this prefix.}
17
+
18
+ \item{id.min}{Minimum identity to be considered. By default, the minimum detected
19
+ identity. This value is a percentage.}
20
+
21
+ \item{id.max}{Maximum identity to be considered. By default, 100\%.}
22
+
23
+ \item{id.binsize}{Size of the identity bins (vertical histograms). By default, 0.1 for
24
+ identity metrics and 5 for bit score.}
25
+
26
+ \item{id.splines}{Smoothing parameter for the splines in the identity histogram. Zero (0) for no
27
+ splines. A generally good value is 1/2. If non-zero, requires the \pkg{stats} package.}
28
+
29
+ \item{id.metric}{Metric of identity to be used (Y-axis).
30
+ It can be any unambiguous prefix of:
31
+ \itemize{
32
+ \item "identity"
33
+ \item "corrected identity"
34
+ \item "bit score"}}
35
+
36
+ \item{id.summary}{Method used to build the identity histogram (Horizontal axis of the right panel).
37
+ It can be any unambiguous prefix of:
38
+ \itemize{
39
+ \item "sum"
40
+ \item "average"
41
+ \item "median"
42
+ \item "90\% lower bound"
43
+ \item "90\% upper bound"
44
+ \item "95\% lower bound"
45
+ \item "95\% upper bound" }
46
+ The last four options
47
+ correspond to the upper and lower boundaries of the 90\% and 95\% empirical confidence
48
+ intervals.}
49
+
50
+ \item{pos.min}{Minimum (leftmost) position in the reference (concatenated) genome (in bp).}
51
+
52
+ \item{pos.max}{Maximum (rightmost) position in the reference (concatenated) genome (in bp).
53
+ By default: Length of the genome.}
54
+
55
+ \item{pos.binsize}{Size of the position bins (horizontal histograms) in bp.}
56
+
57
+ \item{pos.splines}{Smoothing parameter for the splines in the position histogram. Zero (0) for no splines.
58
+ If non-zero, requires the stats package.}
59
+
60
+ \item{rec.col1}{Lightest color in the recruitment plot.}
61
+
62
+ \item{rec.col2}{Darkest color in the recruitment plot.}
63
+
64
+ \item{main}{Title of the plot.}
65
+
66
+ \item{contig.col}{Color of the Contig boundaries. Set to \code{NA} to ignore Contig boundaries.}
67
+
68
+ \item{ret.recplot}{Indicates if the matrix of the recruitment plot is to be returned.}
69
+
70
+ \item{ret.hist}{Ignored, for backwards compatibility.}
71
+
72
+ \item{ret.mode}{Indicates if the mode of the identity is to be computed. It requires the
73
+ \pkg{modeest} package.}
74
+
75
+ \item{id.cutoff}{Minimum identity to consider an alignment as "top". By default, it is 0.95 for the
76
+ identity metrics and 95\% of the best scoring alignment for bit score.}
77
+
78
+ \item{verbose}{Indicates if the function should report the advance.}
79
+
80
+ \item{...}{Any additional graphic parameters to be passed to plot for all panels except the
81
+ recruitment plot (lower-left).}
82
+ }
83
+ \value{
84
+ Returns a list with the following elements:
85
+
86
+ \describe{
87
+ \item{\code{pos.marks}}{Midpoints of the position histogram.}
88
+ \item{\code{id.matrix}}{Midpoints of the identity histogram.}
89
+ \item{\code{recplot}}{Matrix containing the recruitment plot values
90
+ (if \code{ret.recplot=TRUE}).}
91
+ \item{\code{id.mean}}{Mean identity.}
92
+ \item{\code{id.median}}{Median identity.}
93
+ \item{\code{id.mode}}{Mode of the identity (if \code{ret.mode=TRUE}). Deprecated.}
94
+ \item{\code{id.hist}}{Values of the identity histogram (if \code{ret.hist=TRUE}).}
95
+ \item{\code{pos.hist.low}}{Values of the position histogram (depth) with "low"
96
+ identity (i.e., below id.cutoff) (if \code{ret.hist=TRUE}).}
97
+ \item{\code{pos.hist.top}}{Values of the position histogram (depth) with "top"
98
+ identity (i.e., above id.cutoff) (if \code{ret.hist=TRUE}).}
99
+ \item{\code{id.max}}{Value of \code{id.max}. This is returned because
100
+ \code{id.max=NULL} may vary.}
101
+ \item{\code{id.cutoff}}{Value of \code{id.cutoff}.
102
+ This is returned because \code{id.cutoff=NULL} may vary.}
103
+ \item{\code{seqdepth.mean.top}}{Average sequencing depth with identity above
104
+ \code{id.cutoff}.}
105
+ \item{\code{seqdepth.mean.low}}{Average sequencing depth with identity below
106
+ \code{id.cutoff}.}
107
+ \item{\code{seqdepth.mean.all}}{Average sequencing depth without identity filtering.}
108
+ \item{\code{seqdepth.median.top}}{Median sequencing depth with identity above
109
+ \code{id.cutoff}.}
110
+ \item{\code{seqdepth.median.low}}{Median sequencing depth with identity below
111
+ \code{id.cutoff}.}
112
+ \item{\code{seqdepth.median.all}}{Median sequencing depth without identity filtering.}
113
+ \item{\code{id.metric}}{Full name of the used identity metric.}
114
+ \item{\code{id.summary}}{Full name of the summary method used to build the identity plot.}}
115
+ }
116
+ \description{
117
+ Produces recruitment plots provided that BlastTab.catsbj.pl has
118
+ been previously executed. Requires the \pkg{gplots} library.
119
+ }
120
+ \author{
121
+ Luis M. Rodriguez-R [aut, cre]
122
+ }