gcen2 2.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gcen2-2.0.0/.gitignore +75 -0
- gcen2-2.0.0/CHANGELOG.md +291 -0
- gcen2-2.0.0/CITATION.cff +79 -0
- gcen2-2.0.0/CMakeLists.txt +102 -0
- gcen2-2.0.0/CODE_OF_CONDUCT.md +131 -0
- gcen2-2.0.0/CONTRIBUTING.md +113 -0
- gcen2-2.0.0/LICENSE +674 -0
- gcen2-2.0.0/PKG-INFO +215 -0
- gcen2-2.0.0/README.md +159 -0
- gcen2-2.0.0/data/example/README.md +80 -0
- gcen2-2.0.0/data/example/bulk/K2ko.tsv +40240 -0
- gcen2-2.0.0/data/example/bulk/background_gene.list +1000 -0
- gcen2-2.0.0/data/example/bulk/enrichment_gene.list +50 -0
- gcen2-2.0.0/data/example/bulk/gene_expr.tsv +32940 -0
- gcen2-2.0.0/data/example/bulk/gene_go.assoc.gz +0 -0
- gcen2-2.0.0/data/example/bulk/gene_kegg.assoc +9422 -0
- gcen2-2.0.0/data/example/bulk/gene_list.txt +20 -0
- gcen2-2.0.0/data/example/bulk/go-basic.obo.gz +0 -0
- gcen2-2.0.0/data/example/bulk/rwr_seed_genes.list +21 -0
- gcen2-2.0.0/data/example/single_cell/pbmc_subset.h5ad +0 -0
- gcen2-2.0.0/data/example/spatial/mouse_brain_anterior_subset.h5ad +0 -0
- gcen2-2.0.0/docs/api.rst +224 -0
- gcen2-2.0.0/docs/cli.rst +2570 -0
- gcen2-2.0.0/docs/conf.py +53 -0
- gcen2-2.0.0/docs/index.rst +60 -0
- gcen2-2.0.0/docs/migration.rst +263 -0
- gcen2-2.0.0/docs/quickstart.rst +167 -0
- gcen2-2.0.0/docs/tutorials/bulk.rst +136 -0
- gcen2-2.0.0/docs/tutorials/figures.rst +107 -0
- gcen2-2.0.0/docs/tutorials/single_cell.rst +134 -0
- gcen2-2.0.0/docs/tutorials/spatial.rst +89 -0
- gcen2-2.0.0/docs/tutorials/trajectory_multiomics.rst +101 -0
- gcen2-2.0.0/gcen2/__init__.py +91 -0
- gcen2-2.0.0/gcen2/_anndata.py +105 -0
- gcen2-2.0.0/gcen2/_build_file.py +147 -0
- gcen2-2.0.0/gcen2/_knn.py +61 -0
- gcen2-2.0.0/gcen2/_matrix_io.py +263 -0
- gcen2-2.0.0/gcen2/_rrng.py +113 -0
- gcen2-2.0.0/gcen2/annotation.py +838 -0
- gcen2-2.0.0/gcen2/cli/__init__.py +50 -0
- gcen2-2.0.0/gcen2/cli/__main__.py +5 -0
- gcen2-2.0.0/gcen2/cli/_common.py +159 -0
- gcen2-2.0.0/gcen2/cli/modules.py +291 -0
- gcen2-2.0.0/gcen2/cli/multilayer.py +93 -0
- gcen2-2.0.0/gcen2/cli/network.py +419 -0
- gcen2-2.0.0/gcen2/cli/plot.py +338 -0
- gcen2-2.0.0/gcen2/cli/report.py +111 -0
- gcen2-2.0.0/gcen2/cli/single_cell.py +224 -0
- gcen2-2.0.0/gcen2/cli/spatial.py +213 -0
- gcen2-2.0.0/gcen2/cli/trajectory.py +89 -0
- gcen2-2.0.0/gcen2/config.py +33 -0
- gcen2-2.0.0/gcen2/consensus.py +390 -0
- gcen2-2.0.0/gcen2/core/__init__.py +42 -0
- gcen2-2.0.0/gcen2/differential.py +320 -0
- gcen2-2.0.0/gcen2/exceptions.py +17 -0
- gcen2-2.0.0/gcen2/harmony.py +245 -0
- gcen2-2.0.0/gcen2/io.py +232 -0
- gcen2-2.0.0/gcen2/models.py +384 -0
- gcen2-2.0.0/gcen2/module.py +213 -0
- gcen2-2.0.0/gcen2/multilayer.py +596 -0
- gcen2-2.0.0/gcen2/network.py +602 -0
- gcen2-2.0.0/gcen2/plot/__init__.py +83 -0
- gcen2-2.0.0/gcen2/plot/_common.py +360 -0
- gcen2-2.0.0/gcen2/plot/_io.py +51 -0
- gcen2-2.0.0/gcen2/plot/_save.py +56 -0
- gcen2-2.0.0/gcen2/plot/_style.py +195 -0
- gcen2-2.0.0/gcen2/plot/_wgcna_colors.py +441 -0
- gcen2-2.0.0/gcen2/plot/diff.py +132 -0
- gcen2-2.0.0/gcen2/plot/enrichment.py +181 -0
- gcen2-2.0.0/gcen2/plot/function.py +112 -0
- gcen2-2.0.0/gcen2/plot/multiomics.py +53 -0
- gcen2-2.0.0/gcen2/plot/network.py +421 -0
- gcen2-2.0.0/gcen2/plot/qc.py +136 -0
- gcen2-2.0.0/gcen2/plot/single_cell.py +698 -0
- gcen2-2.0.0/gcen2/plot/trajectory.py +68 -0
- gcen2-2.0.0/gcen2/plot/wgcna.py +760 -0
- gcen2-2.0.0/gcen2/plotting.py +493 -0
- gcen2-2.0.0/gcen2/preprocessing.py +348 -0
- gcen2-2.0.0/gcen2/preservation.py +330 -0
- gcen2-2.0.0/gcen2/report.py +471 -0
- gcen2-2.0.0/gcen2/rwr.py +195 -0
- gcen2-2.0.0/gcen2/single_cell/__init__.py +30 -0
- gcen2-2.0.0/gcen2/single_cell/core.py +567 -0
- gcen2-2.0.0/gcen2/single_cell/dme.py +237 -0
- gcen2-2.0.0/gcen2/single_cell/metacell.py +365 -0
- gcen2-2.0.0/gcen2/single_cell/modules.py +603 -0
- gcen2-2.0.0/gcen2/single_cell/projection.py +134 -0
- gcen2-2.0.0/gcen2/spatial/__init__.py +29 -0
- gcen2-2.0.0/gcen2/spatial/core.py +403 -0
- gcen2-2.0.0/gcen2/spatial/modules.py +510 -0
- gcen2-2.0.0/gcen2/spatial/neighbors.py +85 -0
- gcen2-2.0.0/gcen2/templates/report_default.html.jinja2 +171 -0
- gcen2-2.0.0/gcen2/tom_modules.py +905 -0
- gcen2-2.0.0/gcen2/trajectory.py +380 -0
- gcen2-2.0.0/pyproject.toml +161 -0
- gcen2-2.0.0/src/bindings/binding_util.hpp +37 -0
- gcen2-2.0.0/src/bindings/correlation.cpp +455 -0
- gcen2-2.0.0/src/bindings/enrichment.cpp +260 -0
- gcen2-2.0.0/src/bindings/module.cpp +31 -0
- gcen2-2.0.0/src/bindings/module_identify.cpp +107 -0
- gcen2-2.0.0/src/bindings/network.cpp +519 -0
- gcen2-2.0.0/src/bindings/rwr.cpp +111 -0
- gcen2-2.0.0/src/bindings/tom_modules.cpp +142 -0
- gcen2-2.0.0/src/build_file.cpp +221 -0
- gcen2-2.0.0/src/build_file.hpp +33 -0
- gcen2-2.0.0/src/correlation.cpp +597 -0
- gcen2-2.0.0/src/correlation.hpp +164 -0
- gcen2-2.0.0/src/edge_files.cpp +463 -0
- gcen2-2.0.0/src/edge_files.hpp +60 -0
- gcen2-2.0.0/src/edge_format.hpp +82 -0
- gcen2-2.0.0/src/edge_shuffle.cpp +167 -0
- gcen2-2.0.0/src/edge_shuffle.hpp +71 -0
- gcen2-2.0.0/src/edge_table.cpp +325 -0
- gcen2-2.0.0/src/edge_table.hpp +44 -0
- gcen2-2.0.0/src/edge_text.hpp +136 -0
- gcen2-2.0.0/src/enrichment.cpp +341 -0
- gcen2-2.0.0/src/enrichment.hpp +73 -0
- gcen2-2.0.0/src/hclust.cpp +168 -0
- gcen2-2.0.0/src/hclust.hpp +26 -0
- gcen2-2.0.0/src/huge_buffer.hpp +54 -0
- gcen2-2.0.0/src/layer_file.cpp +132 -0
- gcen2-2.0.0/src/layer_file.hpp +37 -0
- gcen2-2.0.0/src/layer_fuse.cpp +236 -0
- gcen2-2.0.0/src/layer_fuse.hpp +51 -0
- gcen2-2.0.0/src/module_identify.cpp +292 -0
- gcen2-2.0.0/src/module_identify.hpp +66 -0
- gcen2-2.0.0/src/network_stats.cpp +110 -0
- gcen2-2.0.0/src/network_stats.hpp +20 -0
- gcen2-2.0.0/src/network_stream.cpp +381 -0
- gcen2-2.0.0/src/network_stream.hpp +103 -0
- gcen2-2.0.0/src/pcg64.hpp +129 -0
- gcen2-2.0.0/src/py_repr.hpp +63 -0
- gcen2-2.0.0/src/rwr.cpp +80 -0
- gcen2-2.0.0/src/rwr.hpp +48 -0
- gcen2-2.0.0/src/table_writer.cpp +90 -0
- gcen2-2.0.0/src/table_writer.hpp +30 -0
- gcen2-2.0.0/src/tom.cpp +507 -0
- gcen2-2.0.0/src/tom.hpp +113 -0
- gcen2-2.0.0/src/tom_gemm.cpp +45 -0
- gcen2-2.0.0/src/tom_gemm.hpp +23 -0
- gcen2-2.0.0/src/tom_gemm_avx.cpp +17 -0
- gcen2-2.0.0/src/tom_gemm_impl.hpp +174 -0
- gcen2-2.0.0/src/tom_gemm_includes.hpp +21 -0
- gcen2-2.0.0/src/util/parallel.hpp +106 -0
- gcen2-2.0.0/src/util/parse_double.hpp +30 -0
- gcen2-2.0.0/tests/__init__.py +0 -0
- gcen2-2.0.0/tests/conftest.py +49 -0
- gcen2-2.0.0/tests/data/hdwgcna_spatial/counts.tsv +394 -0
- gcen2-2.0.0/tests/data/hdwgcna_spatial/make_reference.R +82 -0
- gcen2-2.0.0/tests/data/hdwgcna_spatial/members.tsv +87 -0
- gcen2-2.0.0/tests/data/hdwgcna_spatial/metaspots.tsv +87 -0
- gcen2-2.0.0/tests/data/hdwgcna_spatial/spot_me.tsv +394 -0
- gcen2-2.0.0/tests/data/rwrmh/a.tsv +91 -0
- gcen2-2.0.0/tests/data/rwrmh/b.tsv +61 -0
- gcen2-2.0.0/tests/data/rwrmh/c.tsv +26 -0
- gcen2-2.0.0/tests/data/rwrmh/make_reference.R +20 -0
- gcen2-2.0.0/tests/data/rwrmh/seeds.txt +3 -0
- gcen2-2.0.0/tests/data/rwrmh/unweighted_delta0.2.tsv +45 -0
- gcen2-2.0.0/tests/data/rwrmh/unweighted_delta0.5.tsv +45 -0
- gcen2-2.0.0/tests/data/rwrmh/weighted_delta0.2.tsv +45 -0
- gcen2-2.0.0/tests/data/rwrmh/weighted_delta0.5.tsv +45 -0
- gcen2-2.0.0/tests/data/v1_annotate/README.md +10 -0
- gcen2-2.0.0/tests/data/v1_annotate/gene_go.assoc +35 -0
- gcen2-2.0.0/tests/data/v1_annotate/go.obo +69 -0
- gcen2-2.0.0/tests/data/v1_annotate/modules.txt +4 -0
- gcen2-2.0.0/tests/data/v1_annotate/net.network +240 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_module/module_0.go +11 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_module/module_0.txt +12 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_module/module_1.go +9 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_module/module_1.txt +10 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_module/module_2.go +10 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_module/module_2.txt +10 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_module/module_3.go +5 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_module/module_3.txt +10 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_network/G35.go +9 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_network/G36.go +9 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_network/G37.go +7 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_network/G38.go +8 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_network/G39.go +9 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_network/G40.go +9 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_network/G41.go +8 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_network/G42.go +7 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_network/G43.go +12 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_network/G44.go +6 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_network/G45.go +5 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_network/G46.go +12 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_network/G47.go +4 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_network/G48.go +7 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_network/G49.go +4 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_network/G50.go +5 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_network/G51.go +8 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_network/G52.go +12 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_network/G53.go +7 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_network/G54.go +10 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_network/G55.go +8 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_network/G56.go +7 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_network/G57.go +10 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_network/G58.go +12 -0
- gcen2-2.0.0/tests/data/v1_annotate/v1_network/G59.go +11 -0
- gcen2-2.0.0/tests/data/v1_util/S1.genes.results +7 -0
- gcen2-2.0.0/tests/data/v1_util/S1.gtf +17 -0
- gcen2-2.0.0/tests/data/v1_util/S2.genes.results +7 -0
- gcen2-2.0.0/tests/data/v1_util/S2.gtf +17 -0
- gcen2-2.0.0/tests/data/v1_util/S3.genes.results +7 -0
- gcen2-2.0.0/tests/data/v1_util/S3.gtf +17 -0
- gcen2-2.0.0/tests/data/v1_util/rsem_sample.txt +3 -0
- gcen2-2.0.0/tests/data/v1_util/stringtie_sample.txt +3 -0
- gcen2-2.0.0/tests/data/v1_util/v1_data_stat.txt +4 -0
- gcen2-2.0.0/tests/data/v1_util/v1_rsem_fpkm.tsv +7 -0
- gcen2-2.0.0/tests/data/v1_util/v1_rsem_tpm.tsv +7 -0
- gcen2-2.0.0/tests/data/v1_util/v1_stringtie_fpkm.tsv +5 -0
- gcen2-2.0.0/tests/data/v1_util/v1_stringtie_tpm.tsv +5 -0
- gcen2-2.0.0/tests/data/wgcna_tom/bicor.tsv +67 -0
- gcen2-2.0.0/tests/data/wgcna_tom/bicor_expr.tsv +67 -0
- gcen2-2.0.0/tests/data/wgcna_tom/cutree_signed.tsv +201 -0
- gcen2-2.0.0/tests/data/wgcna_tom/cutree_unsigned.tsv +201 -0
- gcen2-2.0.0/tests/data/wgcna_tom/diss_signed.tsv.gz +0 -0
- gcen2-2.0.0/tests/data/wgcna_tom/diss_unsigned.tsv.gz +0 -0
- gcen2-2.0.0/tests/data/wgcna_tom/expr.tsv +81 -0
- gcen2-2.0.0/tests/data/wgcna_tom/hclust_signed.tsv +200 -0
- gcen2-2.0.0/tests/data/wgcna_tom/hclust_unsigned.tsv +200 -0
- gcen2-2.0.0/tests/data/wgcna_tom/hdwgcna_modules.tsv +201 -0
- gcen2-2.0.0/tests/data/wgcna_tom/hdwgcna_power.txt +1 -0
- gcen2-2.0.0/tests/data/wgcna_tom/kme_signed.tsv +201 -0
- gcen2-2.0.0/tests/data/wgcna_tom/kme_unsigned.tsv +201 -0
- gcen2-2.0.0/tests/data/wgcna_tom/make_bicor_reference.R +29 -0
- gcen2-2.0.0/tests/data/wgcna_tom/make_downstream_reference.R +42 -0
- gcen2-2.0.0/tests/data/wgcna_tom/make_hdwgcna_reference.R +25 -0
- gcen2-2.0.0/tests/data/wgcna_tom/make_modules_reference.R +57 -0
- gcen2-2.0.0/tests/data/wgcna_tom/make_reference.R +30 -0
- gcen2-2.0.0/tests/data/wgcna_tom/me_signed.tsv +31 -0
- gcen2-2.0.0/tests/data/wgcna_tom/me_unsigned.tsv +31 -0
- gcen2-2.0.0/tests/data/wgcna_tom/modexpr.tsv +201 -0
- gcen2-2.0.0/tests/data/wgcna_tom/modules_signed.tsv +201 -0
- gcen2-2.0.0/tests/data/wgcna_tom/modules_unsigned.tsv +201 -0
- gcen2-2.0.0/tests/data/wgcna_tom/sft_bicor_signed.tsv +21 -0
- gcen2-2.0.0/tests/data/wgcna_tom/sft_signed.tsv +16 -0
- gcen2-2.0.0/tests/data/wgcna_tom/sft_unsigned.tsv +16 -0
- gcen2-2.0.0/tests/data/wgcna_tom/tom_signed.tsv +3161 -0
- gcen2-2.0.0/tests/data/wgcna_tom/tom_unsigned.tsv +3161 -0
- gcen2-2.0.0/tests/data/wgcna_tom/trait_signed.tsv +25 -0
- gcen2-2.0.0/tests/data/wgcna_tom/trait_unsigned.tsv +22 -0
- gcen2-2.0.0/tests/data/wgcna_tom/traits.tsv +31 -0
- gcen2-2.0.0/tests/data/wgcna_tom/varexp_signed.tsv +9 -0
- gcen2-2.0.0/tests/data/wgcna_tom/varexp_unsigned.tsv +8 -0
- gcen2-2.0.0/tests/golden/__init__.py +0 -0
- gcen2-2.0.0/tests/golden/cases.py +127 -0
- gcen2-2.0.0/tests/golden/expected/all.network.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/annot_m/module_0.go.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/annot_m/module_0.txt.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/annot_m/module_1.go.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/annot_m/module_1.txt.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/annot_m/module_2.go.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/annot_m/module_2.txt.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/annot_m/module_3.go.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/annot_m/module_3.txt.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/annot_n/ENSG00000034510.go.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/annot_n/ENSG00000075624.go.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/annot_n/ENSG00000100316.go.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/annot_n/ENSG00000122406.go.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/annot_n/ENSG00000136942.go.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/annot_n/ENSG00000142937.go.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/annot_n/ENSG00000166710.go.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/annot_n/ENSG00000184009.go.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/annot_n/ENSG00000198755.go.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/annot_n/ENSG00000198804.go.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/annot_n/ENSG00000198888.go.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/annot_n/ENSG00000231500.go.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/annot_n/ENSG00000234745.go.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/annot_n/ENSG00000254772.go.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/annot_n/ENSG00000265681.go.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/celltype/A.network.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/celltype/B.network.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/celltype/celltypes.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/celltype/diff/A__vs__B.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/celltype/diff/summary.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/consensus/dendrogram.json.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/consensus/eigengenes.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/consensus/hub_genes.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/consensus/kme.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/consensus/modules.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/consensus/set_eigengenes.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/consensus/sets.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/consensus/soft_power.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm/A/cell_eigengenes.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm/A/cell_harmonized_eigengenes.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm/A/cell_kme.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm/A/dendrogram.json.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm/A/dmes.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm/A/eigengenes.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm/A/hub_genes.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm/A/kme.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm/A/metacell_members.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm/A/metacells.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm/A/modules.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm/A/soft_power.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm/A/tom_hubs.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm/A/trait_cor.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm/B/cell_eigengenes.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm/B/cell_harmonized_eigengenes.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm/B/cell_kme.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm/B/dendrogram.json.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm/B/dmes.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm/B/eigengenes.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm/B/hub_genes.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm/B/kme.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm/B/metacell_members.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm/B/metacells.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm/B/modules.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm/B/soft_power.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm/B/tom_hubs.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm/B/trait_cor.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm/celltypes.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm_cons/A/cell_eigengenes.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm_cons/A/cell_kme.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm_cons/A/dendrogram.json.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm_cons/A/eigengenes.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm_cons/A/hub_genes.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm_cons/A/kme.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm_cons/A/metacell_members.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm_cons/A/modules.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm_cons/A/set_eigengenes.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm_cons/A/sets.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm_cons/A/soft_power.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm_cons/B/cell_eigengenes.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm_cons/B/cell_kme.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm_cons/B/dendrogram.json.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm_cons/B/eigengenes.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm_cons/B/hub_genes.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm_cons/B/kme.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm_cons/B/metacell_members.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm_cons/B/modules.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm_cons/B/set_eigengenes.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm_cons/B/sets.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm_cons/B/soft_power.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/ctm_cons/celltypes.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/diff.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/diff_spearman_fdr.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/enrich.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/filt.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/fused.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/gemm.network.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/hdwgcna_modules.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/jaccard.txt.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/manifest.json +230 -0
- gcen2-2.0.0/tests/golden/expected/merged.network.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/norm_deseq.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/norm_median.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/norm_tmm.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/norm_upqt.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/pear.network.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/preservation/preservation.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/preservation/preservation_Z.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/projected/projected_eigengenes.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/projected/projected_modules.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/rwr.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/rwr_multiplex.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/rwr_multiplex_layer.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/sc_A.network.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/shuf.network.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/sp_filtered.network.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/sp_moran.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/sp_moran_w.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/sp_regions/bottom.network.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/sp_regions/middle.network.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/sp_regions/top.network.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/sp_weighted.network.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/spear.network.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/spm/dendrogram.json.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/spm/eigengenes.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/spm/group_cor.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/spm/hub_genes.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/spm/kme.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/spm/metaspots.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/spm/modules.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/spm/soft_power.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/spm/spot_eigengenes.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/spm/spot_kme.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/spm/summary.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/stats.txt.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/sub.network.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/tom.network.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/trajectory/degree_dynamics.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/trajectory/edge_dynamics.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/trajectory/window_0.network.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/trajectory/window_1.network.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/trajectory/window_2.network.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/trajectory/window_3.network.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/trajectory/window_4.network.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/trajectory/window_5.network.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/trajectory/windows.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/wgcna_dendrogram.json.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/wgcna_gs.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/wgcna_hubs.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/wgcna_kme.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/wgcna_me.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/wgcna_modules.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/wgcna_soft_power.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/wgcna_tom_hubs.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/expected/wgcna_trait_cor.tsv.gz +0 -0
- gcen2-2.0.0/tests/golden/golden.py +143 -0
- gcen2-2.0.0/tests/golden/inputs/annot.network +255 -0
- gcen2-2.0.0/tests/golden/inputs/annot_modules.txt +4 -0
- gcen2-2.0.0/tests/golden/inputs/background.txt +300 -0
- gcen2-2.0.0/tests/golden/inputs/bulk.tsv +301 -0
- gcen2-2.0.0/tests/golden/inputs/bulk_small.tsv +61 -0
- gcen2-2.0.0/tests/golden/inputs/gene_go.assoc +240 -0
- gcen2-2.0.0/tests/golden/inputs/go.obo +1165 -0
- gcen2-2.0.0/tests/golden/inputs/query.txt +40 -0
- gcen2-2.0.0/tests/golden/inputs/sc.h5ad +0 -0
- gcen2-2.0.0/tests/golden/inputs/sc_query.h5ad +0 -0
- gcen2-2.0.0/tests/golden/inputs/seeds.txt +3 -0
- gcen2-2.0.0/tests/golden/inputs/set1.tsv +301 -0
- gcen2-2.0.0/tests/golden/inputs/set2.tsv +301 -0
- gcen2-2.0.0/tests/golden/inputs/sp.h5ad +0 -0
- gcen2-2.0.0/tests/golden/inputs/traits.tsv +16 -0
- gcen2-2.0.0/tests/golden/make_golden.py +176 -0
- gcen2-2.0.0/tests/reference.py +8 -0
- gcen2-2.0.0/tests/test_annotation.py +679 -0
- gcen2-2.0.0/tests/test_api_gaps.py +256 -0
- gcen2-2.0.0/tests/test_benchmark.py +134 -0
- gcen2-2.0.0/tests/test_benchmark_overview.py +18 -0
- gcen2-2.0.0/tests/test_build_file.py +245 -0
- gcen2-2.0.0/tests/test_celltype_modules.py +398 -0
- gcen2-2.0.0/tests/test_cli.py +475 -0
- gcen2-2.0.0/tests/test_cli_docs.py +34 -0
- gcen2-2.0.0/tests/test_consensus.py +161 -0
- gcen2-2.0.0/tests/test_correlation.py +165 -0
- gcen2-2.0.0/tests/test_differential.py +421 -0
- gcen2-2.0.0/tests/test_dme.py +87 -0
- gcen2-2.0.0/tests/test_dropout.py +187 -0
- gcen2-2.0.0/tests/test_enrichment.py +174 -0
- gcen2-2.0.0/tests/test_example_data.py +59 -0
- gcen2-2.0.0/tests/test_gemm_kernel.py +143 -0
- gcen2-2.0.0/tests/test_golden.py +51 -0
- gcen2-2.0.0/tests/test_integration.py +289 -0
- gcen2-2.0.0/tests/test_io.py +186 -0
- gcen2-2.0.0/tests/test_knn.py +49 -0
- gcen2-2.0.0/tests/test_metacell.py +439 -0
- gcen2-2.0.0/tests/test_migration_recipes.py +74 -0
- gcen2-2.0.0/tests/test_module.py +356 -0
- gcen2-2.0.0/tests/test_multilayer.py +531 -0
- gcen2-2.0.0/tests/test_network.py +821 -0
- gcen2-2.0.0/tests/test_plot_analyses.py +261 -0
- gcen2-2.0.0/tests/test_plot_base.py +90 -0
- gcen2-2.0.0/tests/test_plot_commands.py +113 -0
- gcen2-2.0.0/tests/test_plot_single_cell.py +142 -0
- gcen2-2.0.0/tests/test_plot_wgcna.py +136 -0
- gcen2-2.0.0/tests/test_plotting.py +105 -0
- gcen2-2.0.0/tests/test_preprocessing.py +89 -0
- gcen2-2.0.0/tests/test_preservation.py +138 -0
- gcen2-2.0.0/tests/test_report.py +347 -0
- gcen2-2.0.0/tests/test_rwr.py +242 -0
- gcen2-2.0.0/tests/test_single_cell.py +306 -0
- gcen2-2.0.0/tests/test_spatial.py +319 -0
- gcen2-2.0.0/tests/test_spatial_modules.py +332 -0
- gcen2-2.0.0/tests/test_tom.py +198 -0
- gcen2-2.0.0/tests/test_tom_modules.py +404 -0
- gcen2-2.0.0/tests/test_trajectory.py +223 -0
- gcen2-2.0.0/tools/check_doc_consistency.py +300 -0
- gcen2-2.0.0/tools/make_cli_docs.py +125 -0
- gcen2-2.0.0/tools/make_example_data.py +113 -0
gcen2-2.0.0/.gitignore
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
*.pyd
|
|
7
|
+
*.egg
|
|
8
|
+
*.egg-info/
|
|
9
|
+
dist/
|
|
10
|
+
build/
|
|
11
|
+
.eggs/
|
|
12
|
+
pip-wheel-metadata/
|
|
13
|
+
*.whl
|
|
14
|
+
|
|
15
|
+
# Virtual environments
|
|
16
|
+
.venv/
|
|
17
|
+
venv/
|
|
18
|
+
env/
|
|
19
|
+
.env
|
|
20
|
+
|
|
21
|
+
# C++ build artifacts
|
|
22
|
+
_skbuild/
|
|
23
|
+
_cmake_test_compile/
|
|
24
|
+
CMakeFiles/
|
|
25
|
+
CMakeCache.txt
|
|
26
|
+
cmake_install.cmake
|
|
27
|
+
Makefile
|
|
28
|
+
!docs/Makefile
|
|
29
|
+
*.o
|
|
30
|
+
*.a
|
|
31
|
+
|
|
32
|
+
# Testing / coverage
|
|
33
|
+
.pytest_cache/
|
|
34
|
+
.coverage
|
|
35
|
+
.coverage.*
|
|
36
|
+
htmlcov/
|
|
37
|
+
coverage.xml
|
|
38
|
+
*.lcov
|
|
39
|
+
|
|
40
|
+
# IDE / editor
|
|
41
|
+
.vscode/
|
|
42
|
+
.idea/
|
|
43
|
+
*.swp
|
|
44
|
+
*.swo
|
|
45
|
+
*~
|
|
46
|
+
.DS_Store
|
|
47
|
+
|
|
48
|
+
# Jupyter notebooks checkpoints
|
|
49
|
+
.ipynb_checkpoints/
|
|
50
|
+
|
|
51
|
+
# Sphinx docs
|
|
52
|
+
docs/_build/
|
|
53
|
+
docs/api/
|
|
54
|
+
|
|
55
|
+
# Distribution
|
|
56
|
+
MANIFEST
|
|
57
|
+
*.tar.gz
|
|
58
|
+
|
|
59
|
+
# OS
|
|
60
|
+
Thumbs.db
|
|
61
|
+
|
|
62
|
+
# Local Claude Code settings
|
|
63
|
+
.claude/settings.local.json
|
|
64
|
+
|
|
65
|
+
# Local data (e.g. the full GCEN v1 sample package in data/sample) is not part
|
|
66
|
+
# of the repository; the example data in data/example is.
|
|
67
|
+
data/*
|
|
68
|
+
!data/example/
|
|
69
|
+
!tests/data/
|
|
70
|
+
docs/*.docx
|
|
71
|
+
|
|
72
|
+
# Website build output and test screenshots
|
|
73
|
+
website/_site/
|
|
74
|
+
website/_doctrees/
|
|
75
|
+
website/tests/screenshots/
|
gcen2-2.0.0/CHANGELOG.md
ADDED
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to GCEN2. The format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions follow
|
|
5
|
+
[PEP 440](https://peps.python.org/pep-0440/).
|
|
6
|
+
|
|
7
|
+
## [2.0.0] — 2026-11-20
|
|
8
|
+
|
|
9
|
+
GCEN2 is a rewrite of [GCEN v1](https://github.com/wen-chen/GCEN) (C++
|
|
10
|
+
command-line tools) as a Python package with a C++ extension. It keeps every
|
|
11
|
+
v1 command and file format and adds WGCNA / hdWGCNA module analysis, single
|
|
12
|
+
cell, spatial, multi-omics and trajectory analyses, publication figures and
|
|
13
|
+
reports. Development history: `docs/development_log.md` and `git log` (earlier plans in
|
|
14
|
+
`docs/plans/archive/`); tests: `docs/test_report.md`; current state in
|
|
15
|
+
`docs/status.md`.
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
**GCEN v1 commands** (`gcen2 normalize`, `filter`, `build`, `module`,
|
|
20
|
+
`annotate`, `enrich`, `rwr`, `merge`, `extract`, `shuffle`, `stats`):
|
|
21
|
+
the same inputs and, where results are meant to agree, the same results as
|
|
22
|
+
GCEN v1 0.6.3 (identical edges and modules; see `docs/migration.rst`).
|
|
23
|
+
|
|
24
|
+
**Network construction**
|
|
25
|
+
- Pearson, Spearman, dropout-aware Pearson (`pearson_nonzero`,
|
|
26
|
+
`pearson_pairwise_complete`); p-values, Benjamini-Hochberg FDR; edges
|
|
27
|
+
streamed to the file block by block.
|
|
28
|
+
- A matrix-product (GEMM) correlation kernel for many samples
|
|
29
|
+
(`--kernel gemm`) besides v1's pairwise kernel.
|
|
30
|
+
- WGCNA topological overlap as an extra edge score (`build --tom`).
|
|
31
|
+
- AnnData (`.h5ad`) input for `build` and `module -e`.
|
|
32
|
+
|
|
33
|
+
**WGCNA / hdWGCNA modules**
|
|
34
|
+
- `gcen2 module -e`: WGCNA's blockwiseModules (soft power by
|
|
35
|
+
pickSoftThreshold, TOM, average-linkage tree, dynamic tree cut, eigengene
|
|
36
|
+
merging); `--preset hdwgcna` for hdWGCNA's ConstructNetwork; eigengenes,
|
|
37
|
+
kME, hub genes, module-trait correlations, gene significance, soft-power
|
|
38
|
+
table, dendrogram and hub TOM for figures.
|
|
39
|
+
- `gcen2 consensus-modules`: WGCNA consensus networks over several sets.
|
|
40
|
+
- `gcen2.preservation` / `gcen2 module-preservation`: WGCNA modulePreservation
|
|
41
|
+
(Zsummary, median rank) with R's random number generator, so the
|
|
42
|
+
permutations are those of R.
|
|
43
|
+
|
|
44
|
+
**Single cell**
|
|
45
|
+
- kNN metacells (hdWGCNA MetacellsByGroups); `gcen2 celltype` (one network
|
|
46
|
+
per cell type, metacell or pseudo-replicate samples) and
|
|
47
|
+
`gcen2 celltype-modules` (the hdWGCNA workflow per cell type: metacells,
|
|
48
|
+
modules, cell eigengenes and kME, reassignment of genes with negative kME,
|
|
49
|
+
hub genes; `--backed` for atlases, one cell type at a time).
|
|
50
|
+
- Consensus networks over samples or studies (`--consensus-by`), Harmony
|
|
51
|
+
integrated eigengenes (`--harmonize-by`, `gcen2.harmony`), differential
|
|
52
|
+
module eigengenes (`--dme-by`) and module-trait correlations (`--trait`).
|
|
53
|
+
- `gcen2 project-modules` (hdWGCNA ProjectModules).
|
|
54
|
+
- `metacell_members.tsv`: the cells of every metacell.
|
|
55
|
+
|
|
56
|
+
**Spatial**
|
|
57
|
+
- `gcen2 spatial-modules`: the hdWGCNA spatial workflow (Visium grid
|
|
58
|
+
metaspots, or kNN metaspots for Slide-seq, Visium HD and other platforms),
|
|
59
|
+
spot eigengenes, region correlations.
|
|
60
|
+
- `gcen2 spatial-build`: networks filtered by spatial autocorrelation,
|
|
61
|
+
on spatially smoothed expression, or per region; `--moran` writes every
|
|
62
|
+
gene's Moran's I (`gcen2.spatial.spatial_autocorrelation`).
|
|
63
|
+
|
|
64
|
+
**Other analyses**
|
|
65
|
+
- `gcen2 trajectory`: networks in sliding windows along pseudotime, edge and
|
|
66
|
+
degree dynamics.
|
|
67
|
+
- `gcen2 fuse` (weighted fusion of network layers, e.g. co-expression, PPI,
|
|
68
|
+
regulation) and `gcen2 rwr-multiplex` (random walk on a multiplex network).
|
|
69
|
+
- `gcen2 diff`: differential co-expression (Fisher's z) between two networks,
|
|
70
|
+
with Benjamini-Hochberg FDR (`fdr` column; `-f` calls changed edges by FDR)
|
|
71
|
+
and Spearman's variance 1.06 / (n − 3) (`-m spearman`), as DGCA.
|
|
72
|
+
|
|
73
|
+
**Figures and reports**
|
|
74
|
+
- `gcen2.plot` / `gcen2 plot` (43 commands): figures for every analysis in one
|
|
75
|
+
style (journal widths, editable text in PDF / SVG, one colour per module in
|
|
76
|
+
every figure, WGCNA colour names or Okabe-Ito); PDF, PNG and SVG.
|
|
77
|
+
- `gcen2 report`: HTML or PDF report with vector figures and numbered
|
|
78
|
+
captions; WGCNA sections, cell-type overview and metacells (`--coords`),
|
|
79
|
+
merged / extracted networks, Moran's I; `--figures-dir` saves every figure.
|
|
80
|
+
- `gcen2.plotting`: the earlier plotting API, kept for compatibility.
|
|
81
|
+
|
|
82
|
+
**Python API**: every command is a function (`gcen2.network.build`,
|
|
83
|
+
`gcen2.module.identify`, `gcen2.tom_modules`, `gcen2.single_cell`,
|
|
84
|
+
`gcen2.spatial`, ...); `Network.to_adjacency()` returns the weighted
|
|
85
|
+
adjacency matrix (`weight=`, `absolute=`, `genes=`).
|
|
86
|
+
|
|
87
|
+
**Data, tests, packaging**
|
|
88
|
+
- `data/example/`: the GCEN v1 sample data, a PBMC 10k subset and a Visium
|
|
89
|
+
mouse brain section (27 MB); `tools/make_example_data.py` rebuilds them.
|
|
90
|
+
- GO, association and gene-list files may be gzip-compressed.
|
|
91
|
+
- Golden-output regression tests (`tests/golden/`): every command on fixed
|
|
92
|
+
inputs, outputs frozen; tests for every command, plot command and public
|
|
93
|
+
function.
|
|
94
|
+
- Benchmarks against GCEN v1, WGCNA, hdWGCNA, DGCA and RandomWalkRestartMH
|
|
95
|
+
(`benchmarks/`), reproducible
|
|
96
|
+
elsewhere: environments (`benchmarks/environment-r.yml`,
|
|
97
|
+
`requirements-python.txt`), downloads with checksums in each README, no
|
|
98
|
+
fixed paths in the scripts.
|
|
99
|
+
- Supported: Python 3.9 to 3.14; numpy ≥ 1.24, pandas ≥ 2.0, scipy ≥ 1.10,
|
|
100
|
+
anndata ≥ 0.10, matplotlib ≥ 3.7, typer ≥ 0.9 (the oldest versions tested).
|
|
101
|
+
- `LICENSE` (GPL-3.0-or-later), `CITATION.cff`, `CONTRIBUTING.md`,
|
|
102
|
+
`CODE_OF_CONDUCT.md` (Contributor Covenant 2.1), issue and pull request
|
|
103
|
+
templates; `.readthedocs.yaml` for the documentation.
|
|
104
|
+
- The source distribution includes the example data, so its tests run
|
|
105
|
+
(verified: built from the sdist in a clean environment, 912 passed, 1 skipped).
|
|
106
|
+
- `docs/development_log.md` (development by phase) and `docs/test_report.md`.
|
|
107
|
+
- Benchmarks against DGCA 1.0.3 (`diff`, `benchmarks/dgca_gtex`),
|
|
108
|
+
RandomWalkRestartMH (`rwr-multiplex`) and R implementations of the fusion
|
|
109
|
+
(`benchmarks/multilayer_string`) and of the networks along pseudotime
|
|
110
|
+
(`benchmarks/trajectory_paul15`); `tests/data/rwrmh/` holds
|
|
111
|
+
RandomWalkRestartMH reference scores.
|
|
112
|
+
- A biological case study on GTEx whole blood (`benchmarks/case_gtex_blood`):
|
|
113
|
+
GO enrichment, hub genes and donor-trait correlations of the WGCNA-style
|
|
114
|
+
modules (checked in two halves of the donors), and cross-validated RWR
|
|
115
|
+
function prediction against neighbour voting, a degree-preserving shuffle
|
|
116
|
+
and node degree.
|
|
117
|
+
- Thread scaling and parameter sensitivity (`benchmarks/scaling`): `-t` 1–16
|
|
118
|
+
for `build`, `module -e`, `diff` and `celltype-modules`; the correlation
|
|
119
|
+
cutoff, GCEN module similarity and WGCNA module parameters against STRING.
|
|
120
|
+
- PyWGCNA 2.2.1 against WGCNA (`benchmarks/pywgcna_gtex`): the same soft
|
|
121
|
+
power, TOM and gene tree, but different modules (ARI 0.30–0.44 with WGCNA's
|
|
122
|
+
step-by-step pipeline on the corrected data), traced to its dynamic tree cut.
|
|
123
|
+
- Cells as correlation samples (`benchmarks/hdwgcna_pbmc/09_strategies.py`):
|
|
124
|
+
metacells against random pseudo-replicates, single cells and MAGIC
|
|
125
|
+
imputation, with null genes for false edges, STRING and split halves.
|
|
126
|
+
- `spatial-build` on DLPFC (`benchmarks/hdwgcna_spatial/07_spatial_build.py`):
|
|
127
|
+
the filtered, weighted and regions modes against the plain network.
|
|
128
|
+
|
|
129
|
+
### Changed
|
|
130
|
+
|
|
131
|
+
- `spatial-build -m filtered` keeps the edges between genes with significant
|
|
132
|
+
positive spatial autocorrelation: Moran's I > 0 and a Benjamini–Hochberg
|
|
133
|
+
FDR <= `--moran-fdr` (default 0.05) of a one-sided test under
|
|
134
|
+
randomisation, instead of I > 0 alone (`--moran-fdr 1`). The `--moran`
|
|
135
|
+
table gains `pval` and `fdr` columns.
|
|
136
|
+
- `gcen2 celltype` (`build_by_celltype`) tests every gene pair of a metacell
|
|
137
|
+
network on its own effective sample size: each gene gets M / s(y), with
|
|
138
|
+
s(y) = y'Cy / y'y and C the metacells' shared cells / k
|
|
139
|
+
(`metacell_effective_samples`); a pair takes the smaller of its two genes'
|
|
140
|
+
values. The former fixed n_cells // k (`--effective-samples cells`) was
|
|
141
|
+
too strict for most genes and too lenient for the smoothest cell-state
|
|
142
|
+
genes; the new sizes match null-gene correlations on PBMCs
|
|
143
|
+
(`benchmarks/hdwgcna_pbmc/10_effective_samples.py`). Networks change:
|
|
144
|
+
1.0–5.6 times as many edges on PBMCs, most in the small cell types.
|
|
145
|
+
- `gcen2 celltype` (`build_by_celltype(fdr=True)`) applies the
|
|
146
|
+
Benjamini-Hochberg FDR over all gene pairs by default, `-p` applying to it
|
|
147
|
+
(`--no-fdr` for the former behaviour). With calibrated p-values, p <= 0.001
|
|
148
|
+
alone kept about 0.1% of a cell type's 30–40 million pairs as chance edges,
|
|
149
|
+
which made up most networks and modules of small cell types. PBMC networks:
|
|
150
|
+
355–122,020 edges instead of 23,245–302,654.
|
|
151
|
+
- Log-normalisation (`spatial-build`, metacells of `celltype` /
|
|
152
|
+
`celltype-modules`, cell eigengenes) computes x · 10,000 / library with one
|
|
153
|
+
rounding, so mathematically equal ratios give equal values. Spearman
|
|
154
|
+
networks of normalised data no longer depend on the CPU: on CI runners with
|
|
155
|
+
AVX-512, NumPy's `log1p` differs in the last bit and reordered near-equal
|
|
156
|
+
values (correlations then differed in the sixth decimal). Values change in
|
|
157
|
+
the last bits.
|
|
158
|
+
- C++ builds with Apple's libc++ (no floating-point `std::from_chars`) and
|
|
159
|
+
with MSVC (a missing `<iterator>`; `1.0 / 0.0` replaced by
|
|
160
|
+
`numeric_limits::infinity()`).
|
|
161
|
+
- Text files are read and written as UTF-8 on every platform (Windows
|
|
162
|
+
defaulted to its ANSI code page): the network report of `plot network
|
|
163
|
+
--interactive` (pyvis wrote it in the default encoding), tree and seed files
|
|
164
|
+
of `gcen2 plot`, and the developer tools.
|
|
165
|
+
- Output files have `\n` line endings on every platform: every `to_csv` call
|
|
166
|
+
passes `lineterminator="\n"` and text files are opened with `newline="\n"`
|
|
167
|
+
(pandas and Python wrote `\r\n` on Windows, so files differed from Linux
|
|
168
|
+
and from the C++ writers).
|
|
169
|
+
- k nearest neighbours (spatial graphs of `spatial-build` and Moran's I, kNN
|
|
170
|
+
metaspots, metacells) break ties of equal distance by index
|
|
171
|
+
(`gcen2._knn.knn_indices`). `cKDTree` orders equidistant points differently
|
|
172
|
+
on different platforms, and grids of spots or bins have many, so macOS gave
|
|
173
|
+
other neighbours than Linux. Results on grids can change where ties were
|
|
174
|
+
broken differently.
|
|
175
|
+
- `differential.compare` without `n_a` / `n_b` takes each network's p-value
|
|
176
|
+
sample size from its metadata: the per-gene effective samples of a metacell
|
|
177
|
+
network, else `p_value_samples`, else `n_samples`. Before, a metacell
|
|
178
|
+
network from `build_by_celltype` was tested on its number of metacells
|
|
179
|
+
(the quick start's example did this).
|
|
180
|
+
- The migration guide covers GCEN v1's four remaining utilities: Python
|
|
181
|
+
functions for `data_stat`, `generate_expr_matrix_from_rsem` and
|
|
182
|
+
`generate_expr_matrix_from_stringtie` that give v1's values (tested against
|
|
183
|
+
v1 0.6.3 in `tests/test_migration_recipes.py`, which runs the guide's own
|
|
184
|
+
code), and what `calculate_accuracy` computed (no counterpart).
|
|
185
|
+
- Reading a header-less GCEN v1 CSV matrix whose first gene name is a quoted
|
|
186
|
+
field holding a comma no longer takes that line for a header (the header
|
|
187
|
+
check now splits the line with quotes, as the reader does). The migration
|
|
188
|
+
guide now says that GCEN2 has no `csv_to_tsv` / `tsv_to_csv` commands and
|
|
189
|
+
converts in Python (`gcen2.io.read_csv` + `write_tsv`).
|
|
190
|
+
- `gcen2 celltype --diff` tests every shared edge on the effective sample
|
|
191
|
+
sizes of the networks' own p-values (the smaller of its two genes' in each
|
|
192
|
+
cell type) instead of n_cells // k: on random halves of PBMC cell types
|
|
193
|
+
4.1–4.9% of the pairs have p <= 0.05, against 0.26–0.76% before
|
|
194
|
+
(`benchmarks/hdwgcna_pbmc/11_diff_calibration.py`). `differential.compare`
|
|
195
|
+
and `compare_files` accept mappings gene → samples for `n_a` / `n_b`.
|
|
196
|
+
`celltypes.tsv`'s `effective_samples` and the diff summary's `n_a` / `n_b`
|
|
197
|
+
are now the median gene's.
|
|
198
|
+
- `gcen2 celltype --strategy pseudo_replicates` is deprecated (FutureWarning):
|
|
199
|
+
random groups of cells rank gene pairs at chance level.
|
|
200
|
+
- `build_dropout_aware(zero_handling="impute")` warns that the p-values of
|
|
201
|
+
MAGIC-imputed cells are not valid.
|
|
202
|
+
|
|
203
|
+
- `gcen2 annotate` and `gcen2 enrich` (and `gcen2.annotation.enrich` /
|
|
204
|
+
`annotate_go` / `annotate_kegg`) add an `fdr` column: the Benjamini-Hochberg
|
|
205
|
+
adjusted p-value of each term over every term annotated in the background
|
|
206
|
+
(as R's `p.adjust(method = "BH")`), computed exactly in the same C++ pass
|
|
207
|
+
as the counts and p-values; `-p` still filters on the p-value. The other
|
|
208
|
+
columns are unchanged (golden outputs regenerated for the new column).
|
|
209
|
+
|
|
210
|
+
- The command line is a package (`gcen2/cli/`, one module per group of
|
|
211
|
+
commands) and `gcen2 --help` lists the commands by group (GCEN v1
|
|
212
|
+
commands, WGCNA modules, single cell, spatial, trajectory, multi-omics,
|
|
213
|
+
report, plot). Every command reports errors the same way (`ERROR: ...`,
|
|
214
|
+
exit code 1, no traceback; e.g. a missing input file of `spatial-build`
|
|
215
|
+
or `trajectory`) and prints warnings as `WARNING: ...`.
|
|
216
|
+
- The options `gcen2 --threads / --seed / --verbose` before the command are
|
|
217
|
+
gone: they were never used (each command has its own `-t` and `--seed`,
|
|
218
|
+
as the documentation says).
|
|
219
|
+
- A missing input file of a `gcen2.plot` function raises `GCENIOError` (as
|
|
220
|
+
everywhere else; it was `GCENInputError`).
|
|
221
|
+
- `single_cell.build_by_celltype(max_genes_per_chunk=...)` no longer splits
|
|
222
|
+
the genes (the argument is accepted and ignored): the correlation kernel
|
|
223
|
+
already works through the gene pairs in blocks, and with `fdr=True` the
|
|
224
|
+
split adjusted the p-values within each block instead of over all pairs.
|
|
225
|
+
- Eigen is no longer bundled (the kernels stopped using it) and OpenMP is no
|
|
226
|
+
longer linked (the kernels use `std::thread`): clone without `--recursive`,
|
|
227
|
+
no third-party C++ library besides pybind11.
|
|
228
|
+
- `gcen2 rwr-multiplex` / `multilayer.rwr_multiplex` column-normalise the
|
|
229
|
+
whole supra-adjacency matrix by default, as RandomWalkRestartMH (the
|
|
230
|
+
RWR-M authors' implementation), and give its scores (`--transition supra`;
|
|
231
|
+
weighted layers divided by their largest weight, as it does). The previous
|
|
232
|
+
per-layer normalisation, where every gene jumps with probability `delta`,
|
|
233
|
+
is `--transition layer` (unchanged results). Default scores change.
|
|
234
|
+
- `gcen2 diff` / `differential.compare` write an `fdr` column (Benjamini-
|
|
235
|
+
Hochberg over the tested pairs) before `category`; `-f / --fdr` calls
|
|
236
|
+
`shared_changed` by FDR, `-m spearman` uses Spearman's variance
|
|
237
|
+
1.06 / (n − 3). `gcen2 celltype --diff` uses that variance when both
|
|
238
|
+
networks are Spearman networks (the default), so fewer edges are called
|
|
239
|
+
changed.
|
|
240
|
+
|
|
241
|
+
### Changed (from GCEN v1)
|
|
242
|
+
|
|
243
|
+
Deliberate differences; details and how to reproduce v1 output in
|
|
244
|
+
`docs/migration.rst`.
|
|
245
|
+
- `build -f` also drops edges with FDR > p cutoff (v1 only adds the column).
|
|
246
|
+
- RWR: seed vector normalised (values are probabilities), seeds not listed,
|
|
247
|
+
`>=` cutoff, `|r|` as edge weight; ties ranked by gene name.
|
|
248
|
+
- Enrichment: one-sided hypergeometric test (v1: two-sided Fisher), fold
|
|
249
|
+
enrichment column; v1's p-values are reproduced from GCEN2's counts.
|
|
250
|
+
- Output files have header lines; `module` writes one `module gene` pair per
|
|
251
|
+
line; `merge` writes the direction as its own column.
|
|
252
|
+
- `filter` uses the sample standard deviation (ddof = 1).
|
|
253
|
+
|
|
254
|
+
### Performance
|
|
255
|
+
|
|
256
|
+
C++ kernels for correlation (pairwise and GEMM), TOM, FDR, module
|
|
257
|
+
identification, enrichment, RWR, network statistics, edge shuffling, merge,
|
|
258
|
+
extract, diff and fusion; most commands read and write files without pandas.
|
|
259
|
+
Against GCEN v1, WGCNA and hdWGCNA GCEN2 was 1.1× to 89× faster, against DGCA
|
|
260
|
+
(Pearson, Spearman) 2.6× and 185× and RandomWalkRestartMH 58×
|
|
261
|
+
(`benchmarks/README.md`, measured on an idle machine on 2026-11-17).
|
|
262
|
+
|
|
263
|
+
- `gcen2 diff -t` (default 2): the edge files are parsed, sorted and written
|
|
264
|
+
by several threads and the FDR is sorted in parallel (12.5M pairs: 13.6 s
|
|
265
|
+
→ 5.5 s with 8 threads); the output does not depend on the thread count.
|
|
266
|
+
`celltype --diff` uses the command's `-t`.
|
|
267
|
+
|
|
268
|
+
### Fixed
|
|
269
|
+
|
|
270
|
+
- GCEN v1's `merge` appended the direction to the correlation string.
|
|
271
|
+
- On Python 3.9 no `gcen2` command ran (annotations that typer evaluates).
|
|
272
|
+
- With typer < 0.12, list options left out (e.g. `--group`) selected nothing.
|
|
273
|
+
- R's random number generator failed with numpy 1.x.
|
|
274
|
+
- TIFF / EPS figures failed with matplotlib < 3.9.
|
|
275
|
+
- Example and test `.h5ad` files were unreadable for anndata < 0.11.
|
|
276
|
+
- RWR ranked tied genes differently with numpy 1 and 2.
|
|
277
|
+
- `gcen2.plotting.network_interactive` failed with matplotlib ≥ 3.9 and wrote
|
|
278
|
+
pyvis's `lib/` into the working directory.
|
|
279
|
+
- A missing output directory raised a traceback; it is now created.
|
|
280
|
+
- Clear errors for a missing report template and for weasyprint without its
|
|
281
|
+
system libraries.
|
|
282
|
+
- The BLAS thread limit (`-t`) missed scipy's own OpenBLAS when it was first
|
|
283
|
+
loaded inside the limit: `gcen2 module -e` computed the eigengenes on every
|
|
284
|
+
logical CPU (GTEx, 5,000 genes: 3.3 → 1.7 s; the same modules).
|
|
285
|
+
- `gcen2 plot enrich-dot` and `enrich-heatmap` labelled the colour bar
|
|
286
|
+
"−log10 p" when the tables are coloured by an adjusted column (`fdr`,
|
|
287
|
+
`p_adj`); the label now names the column used, as `enrich-bar` does.
|
|
288
|
+
|
|
289
|
+
Found while benchmarking: hdWGCNA pairs the soft powers with the wrong sets in
|
|
290
|
+
a consensus network unless the sets come in sorted order
|
|
291
|
+
(`benchmarks/hdwgcna_consensus/README.md`).
|
gcen2-2.0.0/CITATION.cff
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: >-
|
|
3
|
+
If you use GCEN2, please cite it as below. GCEN2 reimplements methods of
|
|
4
|
+
GCEN, WGCNA and hdWGCNA; please also cite the papers of the methods you use.
|
|
5
|
+
title: "GCEN2: a toolkit for gene co-expression network analysis with single-cell resolution"
|
|
6
|
+
type: software
|
|
7
|
+
authors:
|
|
8
|
+
- given-names: Wen Harold
|
|
9
|
+
family-names: Chen
|
|
10
|
+
affiliation: Hunan University of Chinese Medicine
|
|
11
|
+
version: 2.0.0
|
|
12
|
+
date-released: "2026-11-20"
|
|
13
|
+
license: GPL-3.0-or-later
|
|
14
|
+
url: "https://www.biochen.org/gcen2/"
|
|
15
|
+
repository-code: "https://github.com/wen-chen/GCEN2"
|
|
16
|
+
keywords:
|
|
17
|
+
- gene co-expression network
|
|
18
|
+
- WGCNA
|
|
19
|
+
- single-cell RNA-seq
|
|
20
|
+
- spatial transcriptomics
|
|
21
|
+
- bioinformatics
|
|
22
|
+
references:
|
|
23
|
+
- type: article
|
|
24
|
+
title: "GCEN: An Easy-to-Use Toolkit for Gene Co-Expression Network Analysis and lncRNAs Annotation"
|
|
25
|
+
authors:
|
|
26
|
+
- family-names: Chen
|
|
27
|
+
given-names: Wen
|
|
28
|
+
- family-names: Li
|
|
29
|
+
given-names: Jing
|
|
30
|
+
- family-names: Huang
|
|
31
|
+
given-names: Shulan
|
|
32
|
+
- family-names: Li
|
|
33
|
+
given-names: Xiaodeng
|
|
34
|
+
- family-names: Zhang
|
|
35
|
+
given-names: Xuan
|
|
36
|
+
- family-names: Hu
|
|
37
|
+
given-names: Xiang
|
|
38
|
+
- family-names: Xiang
|
|
39
|
+
given-names: Shuanglin
|
|
40
|
+
- family-names: Liu
|
|
41
|
+
given-names: Changning
|
|
42
|
+
journal: Current Issues in Molecular Biology
|
|
43
|
+
year: 2022
|
|
44
|
+
volume: 44
|
|
45
|
+
issue: 4
|
|
46
|
+
start: 1479
|
|
47
|
+
end: 1487
|
|
48
|
+
doi: 10.3390/cimb44040100
|
|
49
|
+
- type: article
|
|
50
|
+
title: "WGCNA: an R package for weighted correlation network analysis"
|
|
51
|
+
authors:
|
|
52
|
+
- family-names: Langfelder
|
|
53
|
+
given-names: Peter
|
|
54
|
+
- family-names: Horvath
|
|
55
|
+
given-names: Steve
|
|
56
|
+
journal: BMC Bioinformatics
|
|
57
|
+
year: 2008
|
|
58
|
+
volume: 9
|
|
59
|
+
start: 559
|
|
60
|
+
doi: 10.1186/1471-2105-9-559
|
|
61
|
+
- type: article
|
|
62
|
+
title: "hdWGCNA identifies co-expression networks in high-dimensional transcriptomics data"
|
|
63
|
+
authors:
|
|
64
|
+
- family-names: Morabito
|
|
65
|
+
given-names: Samuel
|
|
66
|
+
- family-names: Reese
|
|
67
|
+
given-names: Fairlie
|
|
68
|
+
- family-names: Rahimzadeh
|
|
69
|
+
given-names: Negin
|
|
70
|
+
- family-names: Miyoshi
|
|
71
|
+
given-names: Emily
|
|
72
|
+
- family-names: Swarup
|
|
73
|
+
given-names: Vivek
|
|
74
|
+
journal: Cell Reports Methods
|
|
75
|
+
year: 2023
|
|
76
|
+
volume: 3
|
|
77
|
+
issue: 6
|
|
78
|
+
start: 100498
|
|
79
|
+
doi: 10.1016/j.crmeth.2023.100498
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.18)
|
|
2
|
+
project(gcen2_core CXX)
|
|
3
|
+
|
|
4
|
+
set(CMAKE_CXX_STANDARD 17)
|
|
5
|
+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
6
|
+
|
|
7
|
+
# ── Python + pybind11 ──────────────────────────────────────────────────────
|
|
8
|
+
find_package(Python REQUIRED COMPONENTS Interpreter Development.Module)
|
|
9
|
+
find_package(pybind11 CONFIG REQUIRED)
|
|
10
|
+
|
|
11
|
+
# ── Compiler flags ─────────────────────────────────────────────────────────
|
|
12
|
+
if(MSVC)
|
|
13
|
+
add_compile_options(/W3 /O2)
|
|
14
|
+
else()
|
|
15
|
+
# -ffp-contract=off everywhere: no a*b+c fused into an FMA, so results do
|
|
16
|
+
# not depend on the target (AArch64 GCC and -march=native contract by
|
|
17
|
+
# default) and the C++ paths stay bit-identical to their numpy versions
|
|
18
|
+
add_compile_options(-Wall -Wextra -O3 -ffp-contract=off)
|
|
19
|
+
# -march=native gives ~10-15% speedup but produces non-portable binaries;
|
|
20
|
+
# disable for wheel builds, enable for local dev via:
|
|
21
|
+
# cmake -DGCEN2_NATIVE=ON ..
|
|
22
|
+
option(GCEN2_NATIVE "Enable -march=native" OFF)
|
|
23
|
+
if(GCEN2_NATIVE)
|
|
24
|
+
add_compile_options(-march=native)
|
|
25
|
+
endif()
|
|
26
|
+
endif()
|
|
27
|
+
|
|
28
|
+
# ── Include paths ──────────────────────────────────────────────────────────
|
|
29
|
+
include_directories(
|
|
30
|
+
${CMAKE_SOURCE_DIR}/src # correlation.hpp, enrichment.hpp, ...
|
|
31
|
+
${CMAKE_SOURCE_DIR}/src/util # parallel.hpp
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
# ── Single shared extension: _gcen_core ───────────────────────────────────
|
|
35
|
+
pybind11_add_module(_gcen_core
|
|
36
|
+
# pybind11 entry point
|
|
37
|
+
src/bindings/module.cpp
|
|
38
|
+
|
|
39
|
+
# Per-submodule bindings
|
|
40
|
+
src/bindings/correlation.cpp
|
|
41
|
+
src/bindings/enrichment.cpp
|
|
42
|
+
src/bindings/module_identify.cpp
|
|
43
|
+
src/bindings/network.cpp
|
|
44
|
+
src/bindings/rwr.cpp
|
|
45
|
+
src/bindings/tom_modules.cpp
|
|
46
|
+
|
|
47
|
+
# Implementation files
|
|
48
|
+
src/build_file.cpp
|
|
49
|
+
src/correlation.cpp
|
|
50
|
+
src/edge_shuffle.cpp
|
|
51
|
+
src/enrichment.cpp
|
|
52
|
+
src/module_identify.cpp
|
|
53
|
+
src/network_stats.cpp
|
|
54
|
+
src/edge_files.cpp
|
|
55
|
+
src/edge_table.cpp
|
|
56
|
+
src/rwr.cpp
|
|
57
|
+
src/table_writer.cpp
|
|
58
|
+
src/layer_file.cpp
|
|
59
|
+
src/layer_fuse.cpp
|
|
60
|
+
src/network_stream.cpp
|
|
61
|
+
src/tom.cpp
|
|
62
|
+
src/tom_gemm.cpp
|
|
63
|
+
src/hclust.cpp
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
# TOM products: an AVX build of the kernel, picked at run time when the CPU
|
|
67
|
+
# has AVX (same results as the baseline kernel: see src/tom_gemm.hpp). Only
|
|
68
|
+
# for an x86 target: with CMAKE_OSX_ARCHITECTURES it must be x86_64 alone (a
|
|
69
|
+
# universal2 build compiles every file for arm64 too, and uses the baseline
|
|
70
|
+
# kernel: SSE2 / NEON per slice).
|
|
71
|
+
set(GCEN2_AVX_KERNEL OFF)
|
|
72
|
+
if(NOT MSVC)
|
|
73
|
+
if(CMAKE_OSX_ARCHITECTURES)
|
|
74
|
+
if(CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64")
|
|
75
|
+
set(GCEN2_AVX_KERNEL ON)
|
|
76
|
+
endif()
|
|
77
|
+
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64|AMD64|amd64|i[3-6]86)$")
|
|
78
|
+
set(GCEN2_AVX_KERNEL ON)
|
|
79
|
+
endif()
|
|
80
|
+
endif()
|
|
81
|
+
if(GCEN2_AVX_KERNEL)
|
|
82
|
+
include(CheckCXXCompilerFlag)
|
|
83
|
+
check_cxx_compiler_flag(-mavx GCEN2_HAVE_MAVX)
|
|
84
|
+
if(NOT GCEN2_HAVE_MAVX)
|
|
85
|
+
set(GCEN2_AVX_KERNEL OFF)
|
|
86
|
+
endif()
|
|
87
|
+
endif()
|
|
88
|
+
message(STATUS "GCEN2: AVX kernel for the TOM products: ${GCEN2_AVX_KERNEL}")
|
|
89
|
+
if(GCEN2_AVX_KERNEL)
|
|
90
|
+
target_sources(_gcen_core PRIVATE src/tom_gemm_avx.cpp)
|
|
91
|
+
set_source_files_properties(src/tom_gemm_avx.cpp PROPERTIES COMPILE_OPTIONS
|
|
92
|
+
"-mavx")
|
|
93
|
+
set_source_files_properties(src/tom_gemm.cpp PROPERTIES COMPILE_DEFINITIONS GCEN2_AVX_KERNEL)
|
|
94
|
+
endif()
|
|
95
|
+
|
|
96
|
+
target_include_directories(_gcen_core PRIVATE
|
|
97
|
+
${CMAKE_SOURCE_DIR}/src
|
|
98
|
+
${CMAKE_SOURCE_DIR}/src/util
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
# ── Install ────────────────────────────────────────────────────────────────
|
|
102
|
+
install(TARGETS _gcen_core DESTINATION gcen2/core COMPONENT python)
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, caste, color, religion, or sexual
|
|
10
|
+
identity and orientation.
|
|
11
|
+
|
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
+
diverse, inclusive, and healthy community.
|
|
14
|
+
|
|
15
|
+
## Our Standards
|
|
16
|
+
|
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
|
18
|
+
community include:
|
|
19
|
+
|
|
20
|
+
* Demonstrating empathy and kindness toward other people
|
|
21
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
+
* Giving and gracefully accepting constructive feedback
|
|
23
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
+
and learning from the experience
|
|
25
|
+
* Focusing on what is best not just for us as individuals, but for the overall
|
|
26
|
+
community
|
|
27
|
+
|
|
28
|
+
Examples of unacceptable behavior include:
|
|
29
|
+
|
|
30
|
+
* The use of sexualized language or imagery, and sexual attention or advances of
|
|
31
|
+
any kind
|
|
32
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
+
* Public or private harassment
|
|
34
|
+
* Publishing others' private information, such as a physical or email address,
|
|
35
|
+
without their explicit permission
|
|
36
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
+
professional setting
|
|
38
|
+
|
|
39
|
+
## Enforcement Responsibilities
|
|
40
|
+
|
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
+
or harmful.
|
|
45
|
+
|
|
46
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
|
47
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
48
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
49
|
+
decisions when appropriate.
|
|
50
|
+
|
|
51
|
+
## Scope
|
|
52
|
+
|
|
53
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
54
|
+
an individual is officially representing the community in public spaces.
|
|
55
|
+
Examples of representing our community include using an official email address,
|
|
56
|
+
posting via an official social media account, or acting as an appointed
|
|
57
|
+
representative at an online or offline event.
|
|
58
|
+
|
|
59
|
+
## Enforcement
|
|
60
|
+
|
|
61
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
62
|
+
reported to the maintainer at chenwen@biochen.org. All complaints will be
|
|
63
|
+
reviewed and investigated promptly and fairly.
|
|
64
|
+
|
|
65
|
+
All community leaders are obligated to respect the privacy and security of the
|
|
66
|
+
reporter of any incident.
|
|
67
|
+
|
|
68
|
+
## Enforcement Guidelines
|
|
69
|
+
|
|
70
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
|
71
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
|
72
|
+
|
|
73
|
+
### 1. Correction
|
|
74
|
+
|
|
75
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
76
|
+
unprofessional or unwelcome in the community.
|
|
77
|
+
|
|
78
|
+
**Consequence**: A private, written warning from community leaders, providing
|
|
79
|
+
clarity around the nature of the violation and an explanation of why the
|
|
80
|
+
behavior was inappropriate. A public apology may be requested.
|
|
81
|
+
|
|
82
|
+
### 2. Warning
|
|
83
|
+
|
|
84
|
+
**Community Impact**: A violation through a single incident or series of
|
|
85
|
+
actions.
|
|
86
|
+
|
|
87
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
|
88
|
+
interaction with the people involved, including unsolicited interaction with
|
|
89
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
|
90
|
+
includes avoiding interactions in community spaces as well as external channels
|
|
91
|
+
like social media. Violating these terms may lead to a temporary or permanent
|
|
92
|
+
ban.
|
|
93
|
+
|
|
94
|
+
### 3. Temporary Ban
|
|
95
|
+
|
|
96
|
+
**Community Impact**: A serious violation of community standards, including
|
|
97
|
+
sustained inappropriate behavior.
|
|
98
|
+
|
|
99
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
|
100
|
+
communication with the community for a specified period of time. No public or
|
|
101
|
+
private interaction with the people involved, including unsolicited interaction
|
|
102
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
|
103
|
+
Violating these terms may lead to a permanent ban.
|
|
104
|
+
|
|
105
|
+
### 4. Permanent Ban
|
|
106
|
+
|
|
107
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
|
108
|
+
standards, including sustained inappropriate behavior, harassment of an
|
|
109
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
|
110
|
+
|
|
111
|
+
**Consequence**: A permanent ban from any sort of public interaction within the
|
|
112
|
+
community.
|
|
113
|
+
|
|
114
|
+
## Attribution
|
|
115
|
+
|
|
116
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
117
|
+
version 2.1, available at
|
|
118
|
+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
119
|
+
|
|
120
|
+
Community Impact Guidelines were inspired by
|
|
121
|
+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
|
122
|
+
|
|
123
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
|
124
|
+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
|
125
|
+
[https://www.contributor-covenant.org/translations][translations].
|
|
126
|
+
|
|
127
|
+
[homepage]: https://www.contributor-covenant.org
|
|
128
|
+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
|
129
|
+
[Mozilla CoC]: https://github.com/mozilla/diversity
|
|
130
|
+
[FAQ]: https://www.contributor-covenant.org/faq
|
|
131
|
+
[translations]: https://www.contributor-covenant.org/translations
|