You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cran-comments.md
+2-13Lines changed: 2 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
## Test environments
2
2
3
3
* local desktop: ubuntu 16.04 install, R 3.4.0
4
-
* on travis-ci: ubuntu 12.04.5 + R 3.4.0, devel[2017-05-22 r72718]
4
+
* on travis-ci: ubuntu 14.04.5 + R 3.4.2, devel, bioc-release [2018-01-04]
5
5
* win-builder
6
6
7
7
## R CMD check results
@@ -16,18 +16,7 @@ There were no ERRORs, WARNINGs or NOTEs.
16
16
17
17
### On winbuilder:
18
18
19
-
```
20
-
* checking whether package 'metacoder' can be installed ... WARNING
21
-
Found the following significant warnings:
22
-
Warning: Installed Rcpp (0.12.11) different from Rcpp used to build dplyr (0.12.10).
23
-
Warning: Installed R (R Under development (unstable) (2017-05-20 r72713)) different from R used to build dplyr (R Under development (unstable) (2017-05-20 r72708)).
24
-
See 'd:/RCompile/CRANguest/R-devel/metacoder.Rcheck/00install.out' for details.
25
-
```
26
-
27
-
I think this is because dplyr 0.6 will be released to CRAN soon, but not yet.
28
-
This version of metacoder is compatible with both the old and new versions of dplyr.
29
-
One of the major reasons for this update is to be compatible with dplyr 0.6.
See the full documentation at http://grunwaldlab.github.io/metacoder_documentation.
26
25
27
-
UNDER CONSTRUCTION
26
+
## Parsing
27
+
28
+
Many functions that used to be in `metacoder` have now been moved into the `taxa` package.
29
+
These include the flexible parsers and dplyr-like data-manipulation functions.
30
+
If you have an non-standard data format or want to use the more flexible `taxa` parsers, check out the intro to the taxa package [here](https://github.com/ropensci/taxa).
31
+
`Metacoder` now has functions for parsing specific file formats used in metagenomics research.
32
+
However, for this demonstration, we will be using a parser from the `taxa` package meant for tabular data.
33
+
34
+
35
+
Included in `metacoder` is an example dataset that is a subset of the Human Microbiome Project data.
36
+
This dataset has two parts:
37
+
38
+
* An abundance matrix called `hmp_otus`, with samples in columns and OTUs in rows
39
+
* A sample information table called `hmp_samples`, with samples as rows and columns of information describing the samples (e.g. gender).
40
+
41
+
This is the preferred way to encode this type of abundance information in `metacoder` and `taxa`.
42
+
Lets take a look at this data:
43
+
44
+
```{r}
45
+
library(metacoder)
46
+
print(hmp_otus)
47
+
print(hmp_samples)
48
+
```
49
+
50
+
We can parse the taxonomic information in the abundance matrix using a parser from `taxa`:
The `taxmap` class is designed to store any number of tables, lists, or vectors associated with taxonomic information and facilitate manipulating the data in a cohesive way.
61
+
Here is what that object looks like:
62
+
63
+
```{r}
64
+
print(obj)
65
+
```
66
+
67
+
## Abundance matrix manipulations
68
+
69
+
### Removing low-abundance counts
70
+
71
+
Low-abundance sequences might be the result of sequencing error, so typically we remove any counts/OTUs with less than some number of reads.
72
+
Lets set all counts with less than 5 reads to zero:
If we then look at the distribution of p-values, we can see that none are even close to significant:
194
+
195
+
```{r}
196
+
hist(obj$data$diff_table$wilcox_p_value)
197
+
```
198
+
199
+
There is no need to graph this, but if there still were some significant differences, we could set any difference that is not significant to zero and repeat the last `heat_tree` command.
200
+
201
+
### Comparing any number of treatments/groups
202
+
203
+
A single differential heat tree can compare two treatments, but what if you have more?
204
+
Then we can make a matrix of heat trees, one for each pairwise comparison of treatments like so:
There is a special function to plot this type of data called `heat_tree_matrix`:
214
+
215
+
```{r}
216
+
heat_tree_matrix(obj,
217
+
dataset = "diff_table",
218
+
node_size = n_obs,
219
+
node_label = taxon_names,
220
+
node_color = log2_median_ratio,
221
+
node_color_range = diverging_palette(),
222
+
node_color_trans = "linear",
223
+
node_color_interval = c(-3, 3),
224
+
edge_color_interval = c(-3, 3),
225
+
node_size_axis_label = "Number of OTUs",
226
+
node_color_axis_label = "Log2 ratio median proportions")
227
+
```
228
+
229
+
230
+
## More information
30
231
31
232
This document is only a short introduction to metacoder and there is much that is not covered.
32
233
For more information, see our website at http://grunwaldlab.github.io/metacoder_documentation/ and our github repository at https://github.com/grunwaldlab/metacoder.
234
+
There is also extensive help and examples in the function documentation that can be accessed by, for example, `?heat_tree`.
235
+
236
+
## Feedback
237
+
238
+
We welcome any kind of feedback!
239
+
Let us know if you run into problems by submitting an issue on our Github repo: https://github.com/grunwaldlab/metacoder
240
+
241
+
## Dependencies
242
+
243
+
The function that runs *in silico* PCR requires `primersearch` from the EMBOSS tool kit to be installed. This is not an R package, so it is not automatically installed. Type `?primersearch` after installing and loading metacoder for installation instructions.
244
+
245
+
## Citation
246
+
247
+
If you use metcoder in a publication, please cite our [article in PLOS Computational Biology](http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1005404):
248
+
249
+
Foster ZSL, Sharpton TJ, Grünwald NJ (2017) Metacoder: An R package for visualization and manipulation of community taxonomic diversity data. PLOS Computational Biology 13(2): e1005404. https://doi.org/10.1371/journal.pcbi.1005404
250
+
251
+
## License
252
+
253
+
This work is subject to the [MIT License](https://github.com/grunwaldlab/metacoder/blob/master/LICENSE).
254
+
255
+
## Acknowledgements
256
+
257
+
This package includes code from the R package [ggrepel](https://github.com/slowkow/ggrepel) to handle label overlap avoidance with permission from the author of [ggrepel](https://github.com/slowkow/ggrepel)[Kamil Slowikowski](https://github.com/slowkow).
258
+
We included the code instead of depending on `ggrepel` because we are using functions internal to `ggrepel` that might change in the future.
259
+
We thank Kamil Slowikowski for letting us use his code and would like to acknowledge his implementation of the label overlap avoidance used in metacoder.
0 commit comments