Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakob Russel committed Feb 7, 2019
1 parent fbcd6d3 commit 5d4edd4
Show file tree
Hide file tree
Showing 19 changed files with 62 additions and 104 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
^.*\.Rproj$
^\.Rproj\.user$
.travis.yml
10 changes: 5 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Package: MicEco
Title: Various functions for microbial community data
Version: 0.9.2
Version: 0.9.3
Authors@R: person("Jakob", "Russel", email = "russel2620@gmail.com", role = c("aut", "cre"))
Description: What the title says.
Description: Collection of functions for microbiome analyses. E.g. fitting neutral models and standardized effect sizes of phylogenetic beta diversities, and much more.
Depends: R (>= 3.2.5)
Imports: phyloseq, foreach, doSNOW, picante, vegan, snow, bbmle, Hmisc, abind
License: GPL (>= 3)
Imports: stats, utils, phyloseq, foreach, doSNOW, picante, vegan, snow, bbmle, Hmisc, abind
License: GPL (>= 3) | file LICENSE
Encoding: UTF-8
LazyData: true
RoxygenNote: 6.0.1
RoxygenNote: 6.1.1
Remotes: bioc::release/phyloseq
14 changes: 13 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export(rarefy_rrna)
export(rarefy_rrna.matrix)
export(rarefy_rrna.phyloseq)
export(ses.UniFrac)
export(ses.bootstrap)
export(ses.comdist)
export(ses.comdist2)
export(ses.comdistnt)
Expand All @@ -26,3 +25,16 @@ import(phyloseq)
import(picante)
import(vegan)
importFrom(abind,abind)
importFrom(stats,as.dist)
importFrom(stats,cov)
importFrom(stats,dnorm)
importFrom(stats,p.adjust)
importFrom(stats,pbeta)
importFrom(stats,quantile)
importFrom(stats,sd)
importFrom(stats,var)
importFrom(stats,weighted.mean)
importFrom(utils,combn)
importFrom(utils,read.table)
importFrom(utils,setTxtProgressBar)
importFrom(utils,txtProgressBar)
3 changes: 3 additions & 0 deletions R/UniFrac.multi.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#' @return A distance object with the average \code{UniFrac} distances
#' @import foreach parallel doSNOW phyloseq
#' @importFrom abind abind
#' @importFrom stats as.dist cov dnorm p.adjust pbeta quantile sd var weighted.mean
#' @importFrom utils combn read.table setTxtProgressBar txtProgressBar
#' @export
UniFrac.multi <- function(physeq, R = 100, seed = 42, cores = 1, ...){

Expand All @@ -31,6 +33,7 @@ UniFrac.multi <- function(physeq, R = 100, seed = 42, cores = 1, ...){
opts <- list(progress = progress)

# UniFracs
i <- NULL
UFs <- foreach(i = 1:R, .packages = "phyloseq", .options.snow = opts) %dopar% {
set.seed(seeds[i])
UniFrac(physeq, ...)
Expand Down
3 changes: 2 additions & 1 deletion R/comdist.par.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ comdist.par <- function (comm, dis, abundance.weighted = FALSE, cores = 1, progr
cl <- makeCluster(cores)
registerDoSNOW(cl)
}


l <- NULL
comdist <- foreach(l = 1:(N - 1),.combine = cbind, .options.snow = opts) %dopar% {
comdist.sub <- as.numeric(rep(NA,N))
for (k in 2:N) {
Expand Down
1 change: 1 addition & 0 deletions R/comdistnt.par.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ comdistnt.par <- function (comm, dis, abundance.weighted = FALSE, exclude.conspe
registerDoSNOW(cl)
}

i <- NULL
comdisnt <- foreach (i = 1:(N-1),.combine = rbind, .options.snow = opts) %dopar% {

comdisnt.sub <- as.numeric(rep(NA,N))
Expand Down
7 changes: 7 additions & 0 deletions R/gg_13_5_16S.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#' 16S copy numbers for GreenGenes 13_5 database OTUs
#'
#' Precalculated for the PICRUSt pipeline (https://picrust.github.io/picrust/picrust_precalculated_files.html)
#' @name gg_13_5_16S
#' @docType data
#' @keywords data
NULL
2 changes: 2 additions & 0 deletions R/ses.UniFrac.R
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ ses.UniFrac <- function (physeq, method = "taxa.labels", fixedmar = "both", shuf
cl <- makeCluster(cores)
registerDoSNOW(cl)
}

i <- NULL
unifrac.rand <- foreach(i = 1:runs, .packages = "phyloseq", .options.snow = opts) %dopar% {

if(method == "taxa.labels"){
Expand Down
63 changes: 0 additions & 63 deletions R/ses.bootstrap.R

This file was deleted.

1 change: 1 addition & 0 deletions R/ses.comdistnt2.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#' @param burnin Number of null communities discarded before proper analysis in sequential ("swap", "tswap") methods.
#' @param thin Number of discarded permuted matrices between two evaluations in sequential ("swap", "tswap") methods.
#' @param abundance.weighted Should mean nearest taxon distances for each species be weighted by species abundance? (default = FALSE)
#' @param exclude.conspecifics Should conspecific taxa in different communities be exclude from MNTD calculations? (default = FALSE)
#' @param runs Number of randomizations
#' @param cores Number of cores to use for parallel computing
#' @details See permat (vegan) for detailed options
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[![Travis Build
Status](https://travis-ci.org/Russel88/MicEco.svg?branch=master)](https://travis-ci.org/Russel88/MicEco)

MicEco: Various functions for analysis for microbial community data
-------------------------------------------------------------------

Expand Down
1 change: 0 additions & 1 deletion data/data.readme.txt

This file was deleted.

10 changes: 10 additions & 0 deletions man/gg_13_5_16S.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/rarefy_rrna.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/ses.UniFrac.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 0 additions & 25 deletions man/ses.bootstrap.Rd

This file was deleted.

7 changes: 4 additions & 3 deletions man/ses.comdist.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions man/ses.comdistnt.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/ses.comdistnt2.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5d4edd4

Please sign in to comment.