Use limma to perform pairwise contrasts between each group of trained animals and the sex-matched control group for a single tissue. Analysis is performed separately for males and females.
Usage
atac_timewise_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
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
a data frame with one row per feature:
feature_ID
character, MoTrPAC feature identifier
sex
character, one of 'male' or 'female'
comparison_group
character, time point of trained animals compared to the sex-matched sedentary control animals, one of '1w', '2w', '4w', '8w'
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.
covariates
character, comma-separated list of adjustment variables
removed_samples
character, comma-separated list of outliers (vial labels) removed from differential analysis
logFC
double, log fold-change where the numerator is 'comparison_group', e.g., '1w', and the denominator is the group of sex-matched sedentary control animals
logFC_se
double, standard error of the log fold-change
tscore
double, t statistic
p_value
double, unadjusted p-value for the difference between 'comparison_group' and the group of sex-matched sedentary control animals