What happens
During an RNA-seq differential-expression analysis, the agent extracted "significant" DEGs from a DESeq2 results table with an awk filter of the form $7+0 < 0.05 (column 7 = padj). DESeq2 writes NA for genes filtered out by independent filtering / outlier detection. In awk, "NA"+0 evaluates to 0, and 0 < 0.05 is true -- so every gene with NA padj was silently counted as significant.
This badly inflates the DEG count. In one run, a contrast was first reported as 8,738 significant genes; re-doing the filter in Python while excluding NA padj gave 1,560. A second contrast dropped to 2,627. The bad counts then propagated into downstream shared-DEG and TF analyses before the user caught it.
Expected vs actual
- Expected: exclude
NA/missing padj before applying a significance threshold, and never coerce a missing value to a number (so NA can't become 0).
- Actual: the awk
$7+0 < 0.05 pattern treats NA as 0 and includes those rows as significant.
Why this matters
This is a silent scientific-correctness failure -- the wrong numbers look completely plausible and flow into figures/tables. It's the same class of guardrail gap as #318 (count invariants in summaries) and #220 (cross-assembly gene-ID guardrail): the brain should know DESeq2 emits NA padj and that naive numeric coercion is unsafe.
Suggested direction
When filtering a stats table on a p-value/padj column, the brain should prefer a method that drops non-numeric/NA rows explicitly (e.g. awk '$7!="NA" && $7+0<0.05', or just do it in Python/R with real NA handling) rather than bare $7+0 < 0.05. A note in the brain guidance about DESeq2 NA padj + the awk coercion trap would likely prevent the whole class.
What happens
During an RNA-seq differential-expression analysis, the agent extracted "significant" DEGs from a DESeq2 results table with an awk filter of the form
$7+0 < 0.05(column 7 =padj). DESeq2 writesNAfor genes filtered out by independent filtering / outlier detection. In awk,"NA"+0evaluates to0, and0 < 0.05is true -- so every gene withNApadj was silently counted as significant.This badly inflates the DEG count. In one run, a contrast was first reported as 8,738 significant genes; re-doing the filter in Python while excluding
NApadj gave 1,560. A second contrast dropped to 2,627. The bad counts then propagated into downstream shared-DEG and TF analyses before the user caught it.Expected vs actual
NA/missing padj before applying a significance threshold, and never coerce a missing value to a number (soNAcan't become0).$7+0 < 0.05pattern treatsNAas0and includes those rows as significant.Why this matters
This is a silent scientific-correctness failure -- the wrong numbers look completely plausible and flow into figures/tables. It's the same class of guardrail gap as #318 (count invariants in summaries) and #220 (cross-assembly gene-ID guardrail): the brain should know DESeq2 emits
NApadj and that naive numeric coercion is unsafe.Suggested direction
When filtering a stats table on a p-value/padj column, the brain should prefer a method that drops non-numeric/
NArows explicitly (e.g.awk '$7!="NA" && $7+0<0.05', or just do it in Python/R with real NA handling) rather than bare$7+0 < 0.05. A note in the brain guidance about DESeq2NApadj + the awk coercion trap would likely prevent the whole class.