WGCNA 模块-性状热图改用 BH 校正 p 值,并支持 job 置顶与优先级排序
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
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
|
||||
Reference in New Issue
Block a user