Skip to contents

Use DESeq2 to perform a likelihood ratio test to test the effect of training across time points. Analysis is performed separately for males and females.

Usage

transcript_training_da(
  tissue,
  covariates = c("pct_globin", "RIN", "pct_umi_dup", "median_5_3_bias"),
  outliers = na.omit(MotrpacRatTraining6moData::OUTLIERS$viallabel),
  rdata_outfile = NULL,
  overwrite = FALSE,
  verbose = FALSE
)

Arguments

tissue

character, tissue abbreviation, one of MotrpacRatTraining6moData::TISSUE_ABBREV

covariates

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

outliers

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

rdata_outfile

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

overwrite

boolean, whether to overwrite the file if rdata_outfile exists

verbose

boolean, whether to print messages

Value

a data frame with one row per gene:

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

lrt_male

double, likelihood ratio test statistic for males

lrt_female

double, likelihood ratio test statistic for females

p_value_male

double, nominal LRT p-value for males

p_value_female

double, nominal LRT p-value for females

full_model_male

character, full model used in LRT for males

full_model_female

character, full model used in LRT for females

reduced_model_male

character, reduced model used in LRT for males

reduced_model_female

character, reduced model used in LRT 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 expressed genes in brown adipose tissue 
# with default parameters, i.e., outliers and covariates used for the manuscript
da = transcript_training_da("BAT")

# Same as above but save the [DESeq2::DESeq2()] DESeqResults objects in an RData file 
da = transcript_training_da("BAT", 
                            rdata_outfile = "~/test/BAT_RNA_training-da.RData", 
                            overwrite = TRUE)
} # }