Learn R Programming

XYomics (version 0.1.2)

sex_stratified_analysis_bulk: Perform differential expression analysis within each sex

Description

This function identifies differentially expressed genes between conditions separately for each sex using a linear modeling approach.

Usage

sex_stratified_analysis_bulk(
  x,
  phenotype,
  gender,
  analysis_type = c("male", "female")
)

Value

A data frame with differential expression statistics including logFC, AveExpr, t-statistic, P-value, and adjusted P-value.

Arguments

x

A numeric matrix of expression data (features × samples).

phenotype

A vector indicating condition labels for each sample.

gender

A vector indicating gender for each sample. Labels must start with "f" (female) and "m" (male).

analysis_type

Character. Type of analysis to perform: "dimorphic" (difference in differences), "female" (female condition effect), or "male" (male condition effect). Default is "dimorphic".

Details

This function performs differential expression analysis within each sex separately. For male analysis, it compares conditions within males. For female analysis, it compares conditions within females. For dimorphic analysis, it tests for difference in condition effects between sexes. Note: To identify truly sex-specific genes, use the output of this function as input for identify_sex_specific_genes().