write_report: Write a report

Description Usage Arguments Details Value Author(s)

View source: R/report.R

Description

write_report Write a report

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
write_report(outputdir, filename, author,
  title = "Power calculation report for microbiome data",
  datatype = c("species", "metagenomics_pathways",
  "metatranscriptomics_pathways"), N_sample = c(200, 200, 200),
  N_feature = c(300, 300, 300), N_covariate = c(5, 5, 5), N_repeat = c(1,
  1, 1), contin = c(TRUE, TRUE, TRUE), conti_prop = c(0.5, 0.5, 0.5),
  pos_prop = c(0.2, 0.2, 0.2), increment = 0.005, q_cutoff = 0.05,
  target_power = 0.9, target_fpr = 0.05,
  mean_distribution_bugs = ref_dat$mean_distribution_bugs,
  mean_distribution_pathway_dna = ref_dat$mean_distribution_pathway_dna,
  mean_distribution_pathway_rna = ref_dat$mean_distribution_pathway_rna,
  sd_quartile_bugs_common = ref_dat$sd_quartile_bugs[1, ],
  sd_quartile_bugs_rare = ref_dat$sd_quartile_bugs[2, ],
  sd_quartile_pathway_dna_common = ref_dat$sd_quartile_pathway_dna[1, ],
  sd_quartile_pathway_dna_rare = ref_dat$sd_quartile_pathway_dna[2, ],
  sd_quartile_pathway_rna_common = ref_dat$sd_quartile_pathway_rna[1, ],
  sd_quartile_pathway_rna_rare = ref_dat$sd_quartile_pathway_rna[2, ],
  source = c("STAR project", "STAR project", "STAR project"))

Arguments

outputdir

Output directory of the report. String. Default is current working directory.

filename

Filename of the report. String. Default is "report".

author

Author of the report. String. Default is "".

title

Title of the report. String. Default is "Power calculation report for microbiome data".

datatype

Data type needed in the report. Vector. Default is c("species", "metagenomics_pathways","metatranscriptomics_pathways").

N_sample

Number of samples in each data set. Vector. Default is c(200,200,200).

N_feature

Number of features in each data set. Vector. Default is c(300,300,300).

N_covariate

Number of covariates in the study. Number. Default is 5.

N_repeat

Number of repeat measurements for each data set. Vector. Default is c(2,2,2).

contin

The type of covariate we are interested. The type includeds "continous", "discrete" and "inter" (interaction). Strint. Default is c("continuous","continuous","continuous").

pos_prop

The proportion of features correlated with the variable we are interested in. Vector. Default is c(0.2,0.2,0.2)

increment

A small number to adjust the smoothness of the power curve. The smaller, the more smooth. Default is 0.005.

q_cutoff

The threshold for q value (p value after BH adjustment). A number in (0,1). Default is 0.05.

target_power

The least power the study wants to reach. A number in (0,1). Default is 0.9.

target_fpr

The highest false positive rate of the study. A number in (0,1). Default is 0.05.

contin_prop

The proportion of continuous covariates. Vector. Default is c(0.5,0.5,0.5)

Details

Generate a .Rnw file and a .pdf file.

Value

Generate a .Rnw file and a .pdf file.

Author(s)

Liu Cao


xyomics/bugpower documentation built on May 20, 2019, 5:08 p.m.