Analysis workflow2022

RNA-seq Differential Expression & Functional Enrichment

  • #RNAseq
  • #edgeR
  • #DifferentialExpression
  • #FunctionalEnrichment

I used R to prepare an expression matrix, define a two-group comparison and apply edgeR. I then carried selected gene records through identifier mapping and database-assisted functional enrichment.

Follow the workflow. Select a stage to inspect one real example run.

GitHub

Example run

One dataset · the same workflow

Counts + group definitions

Start from a gene-by-sample matrix and two explicit sample lists.

Input
Supplied matrix + sample lists
Output
Matched analysis columns
Matrix import · sample matching
Selected input genes and representative samples.Hover, focus or tap for details
Method notes & example context

Workflow scope and contribution. I applied an R matrix-based analysis and connected its selected gene list to a separate identifier and enrichment hand-off. The saved analysis script includes training-resource code; this portfolio describes the analysis I used, not a claim to have authored every component. Raw-read trimming, alignment, count generation and a packaged one-click enrichment pipeline are outside the demonstrated workflow.

Example context. The saved comparison uses five Sham and five FPI microglial samples at seven days after injury. Positive log2 fold change means higher expression in FPI relative to Sham. These labels identify one run, not the input scope of the workflow. The project year is 2022 from saved result dates; a later script copy does not change that date.

Input preparation. The supplied matrix has 39,017 integer-count rows and 38,803 unique symbols. Repeated symbols are averaged before retaining rows with mean expression greater than 5 across all ten input columns, yielding 13,663 tested rows. Averaging creates fractional values for 53 retained symbols; the workflow should not be described as preserving unaltered raw integer counts. The displayed filter replay uses the full-matrix means and only hides or reveals selected real rows.

Normalization and model. The code constructs an edgeR DGEList, applies calcNormFactors (TMM by default), estimates common and tagwise dispersion, and runs exactTest for the ordered control/treatment pair. An unused design matrix is present in the script, but no GLM or quasi-likelihood fit is performed. Normalization enters through library factors rather than a quantile transformation of expression values. The archived expression export contains edgeR pseudo-counts; it is not CPM, TPM or a general-purpose normalized matrix. This component does not display invented normalization factors or refit the statistical model.

Result selection and precision. The archived rule is strictly FDR < 0.05 and |logFC| > 2. The selected table contains 67 genes: 65 positive and two negative. Selected-result rows preserve their saved precision; non-retained examples come from the rounded full-table export and are labeled accordingly in the tooltip. Some identifiers in that full export resemble spreadsheet dates and are omitted from presentation, not silently repaired. The shown genes are examples, not the entire output or a claim of biological causation.

Identifier hand-off. Saved annotations and the actual external submission trace 59 unique stable IDs back to differential-expression symbols and coefficients. Eight selected symbols are not carried forward; the reason is not documented. The saved submission contains 59 unique IDs plus a header, while the log reports 60 entries. This component reports the 59 validated IDs, not 60 mapped genes. The identifier hand-off is not an automated mapping function inside the edgeR script. The component uses archived identifiers rather than refreshing mappings against a current database.

Functional enrichment. The separate saved KEGG run uses mouse annotations (recorded Ensembl version v104-51). Its annotated foreground is 39 genes and its annotated background is 9,221; these are not the same as the 59 submitted records or 67 selected symbols. The display uses overlap counts for three selected terms, not the globally top-ranked three. The exported ratio divides overlap by pathway background size, not by the foreground; it must not be relabeled conventional GeneRatio. The count/foreground ratio, if provided in details, is explicitly calculated for this display. The exported Up/Down fields are unsuitable for direction inference and are not used.

Interpretation and replay. Pathway membership and enrichment do not demonstrate activation, disease diagnosis or a mechanism. Changing a stage, a selection view or a pathway inspects saved example data; no enrichment service or edgeR fit runs in the browser. The full experiment-specific design, statistical rules and annotation limits remain here or in the hover/focus/tap details.