Learn R Programming

XYomics (version 0.1.2)

identify_sex_specific_genes: Identify sex-specific and sex-dimorphic genes

Description

This function identifies truly sex-specific and sex-dimorphic genes by analyzing differential expression results from both sexes.

Usage

identify_sex_specific_genes(
  male_results,
  female_results,
  target_fdr = 0.05,
  exclude_fdr = 0.5
)

Value

A data frame with identified genes categorized as: - male-specific: significant in males, not significant in females - female-specific: significant in females, not significant in males - sex-dimorphic: significant in both sexes with opposite effects - sex-shared: significant in both sexes with same direction Including columns for gene IDs, logFC values, and FDR values for both sexes.

Arguments

male_results

Data frame of differential expression results for males (from differential_expression).

female_results

Data frame of differential expression results for females (from differential_expression).

target_fdr

Numeric. FDR threshold for significant differential expression (default: 0.05).

exclude_fdr

Numeric. FDR threshold for excluding effects in the opposite sex (default: 0.5).

Details

This function implements a two-step approach to identify sex-specific effects: 1. Identifies genes significantly affected in one sex (target_fdr) 2. Confirms lack of effect in the other sex (exclude_fdr) Additionally identifies genes with opposite (dimorphic) or same (shared) effects in both sexes.