17 lines
661 B
Python
17 lines
661 B
Python
from pathlib import Path
|
|
|
|
from apps.cli.run_rnaseq_wgcna import write_r_script
|
|
|
|
|
|
def test_wgcna_heatmap_uses_bh_adjusted_pvalues(tmp_path: Path) -> None:
|
|
script_path = tmp_path / "run_wgcna.R"
|
|
write_r_script(script_path, threads=2)
|
|
script = script_path.read_text(encoding="utf-8")
|
|
|
|
assert 'p.adjust(as.vector(moduleTraitPvalue), method = "BH")' in script
|
|
assert '".module_trait_pvalue.tsv"' in script
|
|
assert '".module_trait_padj.tsv"' in script
|
|
assert '"\\n(FDR ", signif(moduleTraitPadj, 2)' in script
|
|
assert "Module-trait relationships (BH-adjusted P values)" in script
|
|
assert "moduleTraitPadj = moduleTraitPadj" in script
|