Package MetaLonDA. R topics documented: January 22, Type Package

Similar documents
Package cattonum. R topics documented: May 2, Type Package Version Title Encode Categorical Features

Package GFD. January 4, 2018

Package geojsonsf. R topics documented: January 11, Type Package Title GeoJSON to Simple Feature Converter Version 1.3.

Package facerec. May 14, 2018

Package splithalf. March 17, 2018

Package spark. July 21, 2017

Package gtrendsr. October 19, 2017

Package WordR. September 7, 2017

Package datasets.load

Package omicplotr. March 15, 2019

Package BDMMAcorrect

Package fitbitscraper

Package omu. August 2, 2018

Package gtrendsr. August 4, 2018

Package ASICS. January 23, 2018

Package fastdummies. January 8, 2018

Package aop. December 5, 2016

Package SEMrushR. November 3, 2018

Package canvasxpress

Package states. May 4, 2018

Package BASiNET. October 2, 2018

Package mgc. April 13, 2018

Package balance. October 12, 2018

Package bisect. April 16, 2018

Package IATScore. January 10, 2018

Package queuecomputer

Package Tnseq. April 13, 2017

Package linkspotter. July 22, Type Package

Package preprosim. July 26, 2016

Package repec. August 31, 2018

Package validara. October 19, 2017

Package crossword.r. January 19, 2018

Package EvolutionaryGames

Package epitab. July 4, 2018

Package metaheur. June 30, 2016

Package kirby21.base

Package sigqc. June 13, 2018

Package statsdk. September 30, 2017

Package reval. May 26, 2015

Package MTLR. March 9, 2019

Package vinereg. August 10, 2018

Package projector. February 27, 2018

Package dyncorr. R topics documented: December 10, Title Dynamic Correlation Package Version Date

Package kdtools. April 26, 2018

Package effectr. January 17, 2018

Package weco. May 4, 2018

Package cosinor. February 19, 2015

Package TrajDataMining

Package auctestr. November 13, 2017

Package RNAseqNet. May 16, 2017

Package crossrun. October 8, 2018

Package mmpa. March 22, 2017

Package QCAtools. January 3, 2017

Package rzeit2. January 7, 2019

Package EMDomics. November 11, 2018

Package hypercube. December 15, 2017

Package EpiSignalDetection

Package DCD. September 12, 2017

Package tidylpa. March 28, 2018

Package ECctmc. May 1, 2018

Package docxtools. July 6, 2018

Package PathoStat. February 25, 2018

Package PDN. November 4, 2017

Package VSE. March 21, 2016

Package ggimage. R topics documented: December 5, Title Use Image in 'ggplot2' Version 0.1.0

Package prozor. July 26, 2018

Package gppm. July 5, 2018

Package robotstxt. November 12, 2017

Package calpassapi. August 25, 2018

Package CausalImpact

Package fitur. March 11, 2018

Package voxel. R topics documented: May 23, 2017

Package zebu. R topics documented: October 24, 2017

Package slickr. March 6, 2018

Package ipft. January 4, 2018

Package automl. September 13, 2018

Package dkanr. July 12, 2018

Package humanize. R topics documented: April 4, Version Title Create Values for Human Consumption

Package gggenes. R topics documented: November 7, Title Draw Gene Arrow Maps in 'ggplot2' Version 0.3.2

Package TrafficBDE. March 1, 2018

Package ggimage. R topics documented: November 1, Title Use Image in 'ggplot2' Version 0.0.7

Package shinyfeedback

Package jstree. October 24, 2017

Package nima. May 23, 2018

Package estprod. May 2, 2018

Package ClusterBootstrap

Package qualmap. R topics documented: September 12, Type Package

Package nngeo. September 29, 2018

Package AdhereR. June 15, 2018

Package rqt. November 21, 2017

Package NFP. November 21, 2016

Package PCADSC. April 19, 2017

Package NBLDA. July 1, 2018

Package Hapi. July 28, 2018

Package gifti. February 1, 2018

Package multihiccompare

Package SFtools. June 28, 2017

Package messaging. May 27, 2018

Package pcr. November 20, 2017

Package catenary. May 4, 2018

Transcription:

Type Package Package MetaLonDA January 22, 2018 Title Metagenomics Longitudinal Differential Abundance Method Version 1.0.9 Date 2018-1-20 Author Ahmed Metwally, Yang Dai, Patricia Finn, David Perkins Maintainer Ahmed Metwally <ametwa2@uic.edu> Identify time intervals of differentially abundant metagenomics features in longitudinal studies <doi:10.1145/3107411.3107429>. License MIT + file LICENSE Depends R(>= 3.2.0) Imports ggplot2, gss, plyr, catools, parallel, doparallel, metagenomeseq, DESeq2, edger Suggests knitr, rmarkdown biocviews Repository CRAN NeedsCompilation no Encoding UTF-8 LazyData true RoxygenNote 6.0.1 Date/Publication 2018-01-21 23:30:02 UTC R topics documented: areapermutation....................................... 2 curvefitting......................................... 3 findsiginterval....................................... 4 intervalarea......................................... 4 metalonda.......................................... 5 metalondaall........................................ 6 metalonda_test_data.................................... 8 1

2 areapermutation normalize.......................................... 8 permutation......................................... 9 visualizearea........................................ 10 visualizearhistogram................................... 10 visualizefeature....................................... 11 visualizefeaturespline................................... 12 visualizetimeintervals................................... 12 Index 14 areapermutation Calculate Area Ratio (AR) of each feature s time interval for all permutations Fits longitudinal samples from the same group using negative binomial or LOWESS for all permutations areapermutation(perm) perm list has all the permutated models Value returns a list of all permutation area ratio data(metalonda_test_data) n.sample = 5 # sample size; n.timepoints = 10 # time point; n.perm = 3 n.group= 2 # number of group; Group = factor(c(rep(0,n.sample*n.timepoints), rep(1,n.sample*n.timepoints))) Time = rep(rep(1:n.timepoints, times = n.sample), 2) ID = factor(rep(1:(2*n.sample), each = n.timepoints)) points = seq(1, 10, length.out = 10) aggretage.df = data.frame(count = metalonda_test_data[1,], Time = Time, Group = Group, ID = ID) perm = permutation(aggretage.df, n.perm = 3, method = "nbinomial", points) areapermutation(perm)

curvefitting 3 curvefitting Fit longitudinal data Fits longitudinal samples from the same group using negative binomial smoothing splines or LOWESS curvefitting(df, method = "nbinomial", points) df method points dataframe has the Count, Group, ID, Time fitting method (negative binomial, LOWESS) points at which the prediction should happen Value returns the fitted model data(metalonda_test_data) n.sample = 5 n.timepoints = 10 n.group = 2 Group = factor(c(rep(0, n.sample*n.timepoints), rep(1, n.sample*n.timepoints))) Time = rep(rep(1:n.timepoints, times = n.sample), 2) ID = factor(rep(1:(2*n.sample), each = n.timepoints)) points = seq(1, 10, length.out = 10) aggretage.df = data.frame(count = metalonda_test_data[1,], Time = Time, Group = Group, ID = ID) cf = curvefitting(df = aggretage.df, method= "nbinomial", points)

4 intervalarea findsiginterval Find significant time intervals Identify significant time intervals findsiginterval(adjusted.pvalue, threshold = 0.05, sign) Value adjusted.pvalue vector of the adjusted p-value threshold sign p-value cut off vector hold area sign of each time interval returns a list of the start and end points of all significant time intervals p = c(0.04, 0.01, 0.02, 0.04, 0.06, 0.2, 0.06, 0.04) sign = c(1, 1, 1, 1, -1, -1, 1, 1) findsiginterval(p, threshold = 0.05, sign) intervalarea Calculate Area Ratio (AR) of each feature s time interval Calculate Area Ratio (AR) of each feature s time interval intervalarea(curve.fit.df) curve.fit.df gss data object of the fitted spline

metalonda 5 Value returns the area ratio for all time intervals data(metalonda_test_data) n.sample = 5 n.timepoints = 10 n.group= 2 Group = factor(c(rep(0,n.sample*n.timepoints), rep(1,n.sample*n.timepoints))) Time = rep(rep(1:n.timepoints, times = n.sample), 2) ID = factor(rep(1:(2*n.sample), each = n.timepoints)) points = seq(1, 10, length.out = 10) aggregate.df = data.frame(count = metalonda_test_data[1,], Time = Time, Group = Group, ID = ID) model = curvefitting(df = aggregate.df, method= "nbinomial", points) intervalarea(model) metalonda Metagenomic Longitudinal Differential Abundance Analysis for one feature Find significant time intervals of the one feature metalonda(count, Time, Group, ID, n.perm = 500, fit.method = "nbinomial", points, text = 0, parall = FALSE, pvalue.threshold = 0.05, adjust.method = "BH", time.unit = "days") Count Time Group ID n.perm fit.method points text matrix has the number of reads that mapped to each feature in each sample. vector of the time label of each sample. vector of the group label of each sample. vector of the subject ID label of each sample. number of permutations. fitting method (NB, LOWESS). points at which the prediction should happen. Feature s name.

6 metalondaall parall boolean to indicate whether to use multicore. pvalue.threshold p-value threshold cutoff for identifing significant time intervals. adjust.method time.unit multiple testing correction method. time unit used in the Time vector (hours, days, weeks, months, etc.) Value returns a list of the significant time intervals for the tested feature. data(metalonda_test_data) n.sample = 5 n.timepoints = 10 n.group = 2 Group = factor(c(rep(0, n.sample*n.timepoints), rep(1,n.sample*n.timepoints))) Time = rep(rep(1:n.timepoints, times = n.sample), 2) ID = factor(rep(1:(2*n.sample), each = n.timepoints)) points = seq(1, 10, length.out = 10) ## Not run: output.nbinomial = metalonda(count = metalonda_test_data[1,], Time = Time, Group = Group, ID = ID, fit.method = "nbinomial", n.perm = 10, points = points, text = rownames(metalonda_test_data)[1], parall = FALSE, pvalue.threshold = 0.05, adjust.method = "BH") ## End(Not run) metalondaall Metagenomic Longitudinal Differential Abundance Analysis for all Features Identify significant features and their significant time interval metalondaall(count, Time, Group, ID, n.perm = 500, fit.method = "nbinomial", num.intervals = 100, parall = FALSE, pvalue.threshold = 0.05, adjust.method = "BH", time.unit = "days", norm.method = "none", prefix = "Output")

metalondaall 7 Count Time Group ID n.perm fit.method num.intervals parall Count matrix of all features Time label of all samples Group label of all samples individual ID label for samples number of permutations The fitting method (NB, LOWESS) The number of time intervals at which metalonda test differential abundance logic to indicate whether to use multicore pvalue.threshold p-value threshold cutoff adjust.method time.unit norm.method prefix Multiple testing correction methods time unit used in the Time vector (hours, days, weeks, months, etc.) normalization method to be used to normalize count matrix (CSS, median-ratio, etc.) prefix for the output figure Value Returns a list of the significant features a long with their significant time intervals ## Not run: data(metalonda_test_data) n.sample = 5 n.timepoints = 10 n.group = 2 Group = factor(c(rep(0, n.sample*n.timepoints), rep(1,n.sample*n.timepoints))) Time = rep(rep(1:n.timepoints, times = n.sample), 2) ID = factor(rep(1:(2*n.sample), each = n.timepoints)) points = seq(1, 10, length.out = 10) output.nbinomial = metalondaall(count = metalonda_test_data, Time = Time, Group = Group, ID = ID, n.perm = 10, fit.method = "nbinomial", num.intervals = 100, parall = FALSE, pvalue.threshold = 0.05, adjust.method = "BH", time.unit = "hours", norm.method = "none", prefix = "Test") ## End(Not run)

8 normalize metalonda_test_data Simulated data of OTU abundance for 2 phenotypes each has 5 subjects at 10 time-points The dataset is used for testing the MetaLonDA metalonda_test_data Format A data frame with 2 OTUs patterns normalize Normalize count matrix Normalize count matrix normalize(count, method = "css") count method count matrix normalization method

permutation 9 permutation Permute group labels Permutes the group label of the samples in order to construct the AR empirical distibution permutation(perm.dat, n.perm = 500, method = "nbinomial", points, lev) perm.dat n.perm method points lev dataframe has the Count, Group, ID, Time number of permutations The fitting method (negative binomial, LOWESS) The points at which the prediction should happen the two level s name Value returns the fitted model for all the permutations data(metalonda_test_data) n.sample = 5 n.timepoints = 10 n.perm = 3 n.group = 2 Group = factor(c(rep(0, n.sample*n.timepoints), rep(1, n.sample*n.timepoints))) Time = rep(rep(1:n.timepoints, times = n.sample), 2) ID = factor(rep(1:(2*n.sample), each = n.timepoints)) points = seq(1, 10, length.out = 10) aggregate.df = data.frame(count = metalonda_test_data[1,], Time = Time, Group = Group, ID = ID) prm = permutation(aggregate.df, n.perm = 3, method = "nbinomial", points)

10 visualizearhistogram visualizearea Visualize significant time interval Visualize significant time interval visualizearea(aggregate.df, model.ss, method, start, end, text, group.levels, unit = "days") aggregate.df model.ss method start end text group.levels unit Dataframe has the Count, Group, ID, Time The fitted model Fitting method (negative binomial or LOWESS) Vector of the start points of the time intervals Vector of the end points of the time intervals Feature name Level s name time unit used in the Time vector (hours, days, weeks, months, etc.) visualizearhistogram Visualize Area Ratio (AR) empirical distribution Visualize Area Ratio (AR) empirical distribution for each time interval visualizearhistogram(permuted, text, method) permuted text method Permutation of the permuted data Feature name fitting method

visualizefeature 11 visualizefeature Visualize Longitudinal Feature Visualize Longitudinal Feature visualizefeature(df, text, group.levels, unit = "days") df text group.levels unit dataframe has the Count, Group, ID, Time feature name The two level s name time interval unit data(metalonda_test_data) n.sample = 5 n.timepoints = 10 n.group = 2 Group = factor(c(rep(0, n.sample*n.timepoints), rep(1, n.sample*n.timepoints))) Time = rep(rep(1:n.timepoints, times = n.sample), 2) ID = factor(rep(1:(2*n.sample), each = n.timepoints)) points = seq(1, 10, length.out = 10) aggregate.df = data.frame(count = metalonda_test_data[1,], Time = Time, Group = Group, ID = ID) visualizefeature(aggregate.df, text = rownames(metalonda_test_data)[1], Group)

12 visualizetimeintervals visualizefeaturespline Visualize the feature trajectory with the fitted Splines Plot the longitudinal features along with the fitted splines visualizefeaturespline(df, model, method, text, group.levels, unit = "days") df model method text group.levels unit dataframe has the Count, Group, ID, Time the fitted model The fitting method (negative binomial, LOWESS) feature name The two level s name time unit used in the Time vector (hours, days, weeks, months, etc.) visualizetimeintervals Visualize all significant time intervals for all tested features Visualize all significant time intervals for all tested features visualizetimeintervals(interval.details, prefix = "MetaLonDA_timeline", unit = "days") interval.details Dataframe has infomation about significant interval (feature name, start, end, dominant, p-value) prefix unit prefix for the output figure time unit used in the Time vector (hours, days, weeks, months, etc.)

visualizetimeintervals 13

Index Topic datasets metalonda_test_data, 8 areapermutation, 2 curvefitting, 3 findsiginterval, 4 intervalarea, 4 metalonda, 5 metalonda_test_data, 8 metalondaall, 6 normalize, 8 permutation, 9 visualizearea, 10 visualizearhistogram, 10 visualizefeature, 11 visualizefeaturespline, 12 visualizetimeintervals, 12 14