Skip to contents

Use limma to perform an F-test to test the effect of training across time points. Analysis is performed separately for males and females.

Usage

atac_training_da(
  tissue,
  covariates = c("Sample_batch", "peak_enrich.frac_reads_in_peaks.macs2.frip"),
  outliers = data.table::data.table(MotrpacRatTraining6moData::OUTLIERS)[assay == "ATAC",
    viallabel],
  scratchdir = ".",
  rdata_outfile = NULL,
  overwrite = FALSE,
  verbose = TRUE,
  n_features = Inf
)

Arguments

tissue

character, tissue abbreviation, one of MotrpacRatTraining6moData::TISSUE_ABBREV

covariates

character vector of covariates that correspond to column names of MotrpacRatTraining6moData::ATAC_META. Defaults to covariates that were used for the manuscript.

outliers

vector of viallabels to exclude during differential analysis. Defaults to [MotrpacRatTraining6moData::OUTLIERS]$viallabel

scratchdir

character, local directory in which to download data from Google Cloud Storage. Current working directory by default.

rdata_outfile

NULL or path in which to save eBayes objects in an RData file

overwrite

boolean, whether to overwrite the file if rdata_outfile exists

verbose

boolean, whether to print messages

n_features

integer, number of peaks to perform differential analysis on. Useful for troubleshooting.

Value

data frame with one row per feature:

feature_ID

character, MoTrPAC feature identifier

assay

character, assay abbreviation, one of MotrpacRatTraining6moData::ASSAY_ABBREV

assay_code

character, assay code used in data release. See MotrpacBicQC::assay_codes.

tissue

character, tissue abbreviation, one of MotrpacRatTraining6moData::TISSUE_ABBREV

tissue_code

character, tissue code used in data release. See MotrpacBicQC::bic_animal_tissue_code.

removed_samples_male

character, comma-separated list of male outliers (vial labels) removed from differential analysis

removed_samples_female

character, comma-separated list of female outliers (vial labels) removed from differential analysis

fscore_male

double, F statistic for males

fscore_female

double, F statistic for females

p_value_male

double, nominal F-test p-value for males

p_value_female

double, nominal F-test p-value for females

full_model_male

character, full model used in F-test for males

full_model_female

character, full model used in F-test for females

reduced_model_male

character, reduced model used in F-test for males

reduced_model_female

character, reduced model used in F-test for females

p_value

double, combined male and female nominal p-value using the sum of logs

Examples


if (FALSE) { # \dontrun{
# Perform differential analysis for chromatin accessibility peaks in 
# brown adipose tissue with default parameters, 
# i.e., outliers and covariates used for the manuscript
da = atac_training_da("BAT")

# Same as above but save the [limma::eBayes] MArrayLM objects in an RData file 
da = atac_training_da("BAT", rdata_outfile = "/tmp/BAT_ATAC_training-da.RData", overwrite = TRUE)
} # }