NetAnalyzer 1.0.0__tar.gz → 1.1.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.
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/PKG-INFO +7 -3
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/setup.cfg +5 -2
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/src/NetAnalyzer/__init__.py +1 -1
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/src/NetAnalyzer/adv_mat_calc.py +0 -8
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/src/NetAnalyzer/cli_manager.py +115 -43
- netanalyzer-1.1.0/src/NetAnalyzer/graph2sim.py +338 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/src/NetAnalyzer/main_modules.py +224 -139
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/src/NetAnalyzer/net_parser.py +5 -5
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/src/NetAnalyzer/net_plotter.py +24 -6
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/src/NetAnalyzer/netanalyzer.py +206 -43
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/src/NetAnalyzer/ranker.py +109 -9
- netanalyzer-1.1.0/src/NetAnalyzer/templates/net_explorer.txt +117 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/src/NetAnalyzer.egg-info/PKG-INFO +7 -3
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/src/NetAnalyzer.egg-info/SOURCES.txt +41 -40
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/src/NetAnalyzer.egg-info/entry_points.txt +1 -1
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/src/NetAnalyzer.egg-info/requires.txt +4 -1
- netanalyzer-1.1.0/tests/data/input_scripts/netanalyzer/clustering/clusters_toy_subgroup.txt +13 -0
- netanalyzer-1.1.0/tests/data/input_scripts/netanalyzer/clustering/der_discovered_clusters_by_subgroup.txt +12 -0
- netanalyzer-1.1.0/tests/data/input_scripts/netanalyzer/dsl/filter_dsl +2 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/netanalyzer/dsl/jaccard_count_filter_dsl +1 -1
- netanalyzer-1.1.0/tests/data/input_scripts/netanalyzer/dsl/jaccard_dsl +1 -0
- netanalyzer-1.1.0/tests/data/input_scripts/netanalyzer/dsl/kernel_dsl +1 -0
- netanalyzer-1.1.0/tests/data/input_scripts/netanalyzer/dsl/similarity_dsl +1 -0
- netanalyzer-1.0.0/tests/data/input_scripts/netanalyzer/dsl/output/filter_cutoff → netanalyzer-1.1.0/tests/data/input_scripts/netanalyzer/filter/filter_by_ccomponent +2 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/randomize_clustering/random_minicluster.txt +2 -2
- netanalyzer-1.1.0/tests/data/input_scripts/randomize_network/random_net_same_seed.txt +4 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/ranker/ranker_cross_validation_by_seed_results_all_candidates +1 -7
- netanalyzer-1.1.0/tests/data/input_scripts/ranker/ranker_leave_one_out_by_seed_filter_results_all_candidates +1 -0
- netanalyzer-1.1.0/tests/demo_examples/group_nodes +31 -0
- netanalyzer-1.1.0/tests/demo_examples/launch_netexplorer.sh +7 -0
- netanalyzer-1.1.0/tests/demo_examples/mock_net +95 -0
- netanalyzer-1.1.0/tests/demo_examples/network_umap.html +7265 -0
- netanalyzer-1.1.0/tests/demo_examples/target_genes +1 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/test_cli_manager.py +42 -20
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/test_network.py +11 -13
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tox.ini +2 -0
- netanalyzer-1.0.0/src/NetAnalyzer/graph2sim.py +0 -106
- netanalyzer-1.0.0/src/NetAnalyzer/templates/net_explorer.txt +0 -83
- netanalyzer-1.0.0/tests/data/input_scripts/netanalyzer/dsl/filter_dsl +0 -2
- netanalyzer-1.0.0/tests/data/input_scripts/netanalyzer/dsl/jaccard_dsl +0 -1
- netanalyzer-1.0.0/tests/data/input_scripts/netanalyzer/dsl/kernel_dsl +0 -1
- netanalyzer-1.0.0/tests/data/input_scripts/netanalyzer/dsl/output/ct.npy +0 -0
- netanalyzer-1.0.0/tests/data/input_scripts/netanalyzer/dsl/output/ct_colIds +0 -10
- netanalyzer-1.0.0/tests/data/input_scripts/netanalyzer/dsl/output/ct_rowIds +0 -10
- netanalyzer-1.0.0/tests/data/input_scripts/netanalyzer/dsl/output/filter_with_count.npy +0 -0
- netanalyzer-1.0.0/tests/data/input_scripts/netanalyzer/dsl/output/filter_with_count_colIds +0 -5
- netanalyzer-1.0.0/tests/data/input_scripts/netanalyzer/dsl/output/filter_with_count_rowIds +0 -5
- netanalyzer-1.0.0/tests/data/input_scripts/netanalyzer/dsl/output/jaccard_results.txt +0 -15
- netanalyzer-1.0.0/tests/data/input_scripts/netanalyzer/dsl/similarity_dsl +0 -1
- netanalyzer-1.0.0/tests/data/input_scripts/randomize_network/random_net_same_seed.txt +0 -4
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/.coveragerc +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/.gitignore +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/.readthedocs.yml +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/AUTHORS.rst +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/CHANGELOG.rst +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/CONTRIBUTING.rst +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/LICENSE.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/MANIFEST.in +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/README.md +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/README.rst +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/docs/Makefile +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/docs/_static/.gitignore +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/docs/authors.rst +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/docs/changelog.rst +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/docs/conf.py +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/docs/contributing.rst +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/docs/index.rst +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/docs/license.rst +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/docs/readme.rst +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/docs/requirements.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/pyproject.toml +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/setup.py +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/src/NetAnalyzer/integration.py +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/src/NetAnalyzer/performancer.py +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/src/NetAnalyzer/seed_parser.py +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/src/NetAnalyzer/templates/network.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/src/NetAnalyzer.egg-info/dependency_links.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/src/NetAnalyzer.egg-info/not-zip-safe +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/src/NetAnalyzer.egg-info/top_level.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/__init__.py +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/conftest.py +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/bipartite_network_for_validating.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/clusters_network_for_validating.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/comunities_network_for_validating.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/cosine_results.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/counts_results.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/counts_results_with_deleted.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/csi_results.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_integrate/asym_kernel1.npy +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_integrate/asym_kernel2.npy +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_integrate/kernel1.lst +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_integrate/kernel1.npy +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_integrate/kernel2.lst +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_integrate/kernel2.npy +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_integrate/negative_kernel1.npy +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_integrate/negative_kernel2.npy +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_kernel/adj_mat.lst +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_kernel/adj_mat.npy +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_kernel/ct.npy +0 -0
- /netanalyzer-1.0.0/tests/data/data_kernel/ct_colIds → /netanalyzer-1.1.0/tests/data/data_kernel/ct_colIds.lst +0 -0
- /netanalyzer-1.0.0/tests/data/data_kernel/ct_rowIds → /netanalyzer-1.1.0/tests/data/data_kernel/ct_rowIds.lst +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_kernel/el.npy +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_kernel/get_kernels_refs.py +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_kernel/ka_normalized.npy +0 -0
- /netanalyzer-1.0.0/tests/data/data_kernel/ka_normalized_colIds → /netanalyzer-1.1.0/tests/data/data_kernel/ka_normalized_colIds.lst +0 -0
- /netanalyzer-1.0.0/tests/data/data_kernel/ka_normalized_rowIds → /netanalyzer-1.1.0/tests/data/data_kernel/ka_normalized_rowIds.lst +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_kernel/md1.npy +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_kernel/me.npy +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_kernel/node2vec.npy +0 -0
- /netanalyzer-1.0.0/tests/data/data_kernel/node2vec_colIds → /netanalyzer-1.1.0/tests/data/data_kernel/node2vec_colIds.lst +0 -0
- /netanalyzer-1.0.0/tests/data/data_kernel/node2vec_rowIds → /netanalyzer-1.1.0/tests/data/data_kernel/node2vec_rowIds.lst +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_kernel/rf.npy +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_kernel/rl0_5.npy +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_kernel/vn0_5.npy +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_ranker/bigseed +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_ranker/cross_validation_by_seedgene_results +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_ranker/filter_results +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_ranker/genes2filter_for_validating +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_ranker/kernel_for_validating +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_ranker/kernel_for_validating.lst +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_ranker/leave_one_out_by_seedgene_results +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_ranker/monopartite_network_weighted_for_validating.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_ranker/rank_by_seedgene_results +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_ranker/ranked_genes +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_ranker/seed_genes_for_validating +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_ranker/seed_genes_for_validating_withNotInkernels +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_ranker/seed_weighted_for_validating +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_ranker/tagged_file +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/data_ranker/top_results +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/geometric_results.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/hyi_results.txt +0 -0
- {netanalyzer-1.0.0/tests/data/input_scripts/integrate_kernels → netanalyzer-1.1.0/tests/data/input_scripts/embedding_integrator}/asym_kernel1.npy +0 -0
- {netanalyzer-1.0.0/tests/data/input_scripts/integrate_kernels → netanalyzer-1.1.0/tests/data/input_scripts/embedding_integrator}/asym_kernel2.npy +0 -0
- {netanalyzer-1.0.0/tests/data/input_scripts/integrate_kernels → netanalyzer-1.1.0/tests/data/input_scripts/embedding_integrator}/create_temporal_big_matrices.py +0 -0
- {netanalyzer-1.0.0/tests/data/input_scripts/integrate_kernels → netanalyzer-1.1.0/tests/data/input_scripts/embedding_integrator}/int_geometric_mean.lst +0 -0
- {netanalyzer-1.0.0/tests/data/input_scripts/integrate_kernels → netanalyzer-1.1.0/tests/data/input_scripts/embedding_integrator}/int_geometric_mean.npy +0 -0
- {netanalyzer-1.0.0/tests/data/input_scripts/integrate_kernels → netanalyzer-1.1.0/tests/data/input_scripts/embedding_integrator}/int_max.lst +0 -0
- {netanalyzer-1.0.0/tests/data/input_scripts/integrate_kernels → netanalyzer-1.1.0/tests/data/input_scripts/embedding_integrator}/int_max.npy +0 -0
- {netanalyzer-1.0.0/tests/data/input_scripts/integrate_kernels → netanalyzer-1.1.0/tests/data/input_scripts/embedding_integrator}/int_mean.lst +0 -0
- {netanalyzer-1.0.0/tests/data/input_scripts/integrate_kernels → netanalyzer-1.1.0/tests/data/input_scripts/embedding_integrator}/int_mean.npy +0 -0
- {netanalyzer-1.0.0/tests/data/input_scripts/integrate_kernels → netanalyzer-1.1.0/tests/data/input_scripts/embedding_integrator}/int_mean_asym.lst +0 -0
- {netanalyzer-1.0.0/tests/data/input_scripts/integrate_kernels → netanalyzer-1.1.0/tests/data/input_scripts/embedding_integrator}/int_mean_asym.npy +0 -0
- {netanalyzer-1.0.0/tests/data/input_scripts/integrate_kernels → netanalyzer-1.1.0/tests/data/input_scripts/embedding_integrator}/int_mean_by_presence.lst +0 -0
- {netanalyzer-1.0.0/tests/data/input_scripts/integrate_kernels → netanalyzer-1.1.0/tests/data/input_scripts/embedding_integrator}/int_mean_by_presence.npy +0 -0
- {netanalyzer-1.0.0/tests/data/input_scripts/integrate_kernels → netanalyzer-1.1.0/tests/data/input_scripts/embedding_integrator}/int_mean_by_presence_asym.lst +0 -0
- {netanalyzer-1.0.0/tests/data/input_scripts/integrate_kernels → netanalyzer-1.1.0/tests/data/input_scripts/embedding_integrator}/int_mean_by_presence_asym.npy +0 -0
- {netanalyzer-1.0.0/tests/data/input_scripts/integrate_kernels → netanalyzer-1.1.0/tests/data/input_scripts/embedding_integrator}/int_median.lst +0 -0
- {netanalyzer-1.0.0/tests/data/input_scripts/integrate_kernels → netanalyzer-1.1.0/tests/data/input_scripts/embedding_integrator}/int_median.npy +0 -0
- {netanalyzer-1.0.0/tests/data/input_scripts/integrate_kernels → netanalyzer-1.1.0/tests/data/input_scripts/embedding_integrator}/kernel1.lst +0 -0
- {netanalyzer-1.0.0/tests/data/input_scripts/integrate_kernels → netanalyzer-1.1.0/tests/data/input_scripts/embedding_integrator}/kernel1.npy +0 -0
- {netanalyzer-1.0.0/tests/data/input_scripts/integrate_kernels → netanalyzer-1.1.0/tests/data/input_scripts/embedding_integrator}/kernel2.lst +0 -0
- {netanalyzer-1.0.0/tests/data/input_scripts/integrate_kernels → netanalyzer-1.1.0/tests/data/input_scripts/embedding_integrator}/kernel2.npy +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/net_explorer/net1.lst +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/net_explorer/net1.npy +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/net_explorer/net2.lst +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/net_explorer/net2.npy +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/net_explorer/seeds +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/netanalyzer/attributes/graph_attributes.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/netanalyzer/attributes/node_attributes_nonsumm.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/netanalyzer/attributes/node_attributes_summ.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/netanalyzer/clustering/clusters_toy.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/netanalyzer/clustering/comparing_clusters.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/netanalyzer/clustering/der_discovered_clusters.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/netanalyzer/clustering/expand_clusters.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/netanalyzer/clustering/group_metrics.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/netanalyzer/clustering/group_metrics2.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/netanalyzer/clustering/group_metrics_non_connected.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/netanalyzer/clustering/group_metrics_summarized.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/netanalyzer/clustering/group_metrics_summarized2.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/netanalyzer/clustering/non_connected_network.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/netanalyzer/clustering/rber_pots_discovered_clusters.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/netanalyzer/dsl/ct.npy +0 -0
- /netanalyzer-1.0.0/tests/data/input_scripts/netanalyzer/dsl/ct_colIds → /netanalyzer-1.1.0/tests/data/input_scripts/netanalyzer/dsl/ct_colIds.lst +0 -0
- /netanalyzer-1.0.0/tests/data/input_scripts/netanalyzer/dsl/ct_rowIds → /netanalyzer-1.1.0/tests/data/input_scripts/netanalyzer/dsl/ct_rowIds.lst +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/netanalyzer/dsl/filter_cutoff +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/netanalyzer/dsl/filter_with_count.npy +0 -0
- /netanalyzer-1.0.0/tests/data/input_scripts/netanalyzer/dsl/filter_with_count_colIds → /netanalyzer-1.1.0/tests/data/input_scripts/netanalyzer/dsl/filter_with_count_colIds.lst +0 -0
- /netanalyzer-1.0.0/tests/data/input_scripts/netanalyzer/dsl/filter_with_count_rowIds → /netanalyzer-1.1.0/tests/data/input_scripts/netanalyzer/dsl/filter_with_count_rowIds.lst +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/netanalyzer/dsl/jaccard_results.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/randomize_clustering/random_clusters.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/ranker/output_ranker_discarded +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/ranker/ranker_by_seed_file_nonseeded_results_all_candidates +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/ranker/ranker_by_seed_file_results_all_candidates +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/ranker/ranker_by_seed_file_results_header_all_candidates +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/ranker/ranker_by_seed_file_results_tagged_all_candidates +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/ranker/ranker_by_seed_file_results_type_added_all_candidates +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/ranker/ranker_by_seed_file_results_type_added_header_all_candidates +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/ranker/ranker_by_seed_file_weighted_results_all_candidates +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/ranker/ranker_by_seed_string_results_all_candidates +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/ranker/ranker_cross_validation_all_by_seed_results_all_candidates +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/ranker/ranker_cross_validation_by_seed_results_bigseed_all_candidates +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/ranker/ranker_cross_validation_by_seed_results_remove_seed_all_candidates +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/ranker/ranker_filter_results_all_candidates +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/ranker/ranker_leave_one_out_by_seed_nonseed_results_all_candidates +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/ranker/ranker_leave_one_out_by_seed_results_all_candidates +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/ranker/ranker_leave_one_out_by_seed_results_bigseed_all_candidates +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/ranker/ranker_leave_one_out_by_seed_results_header_all_candidates +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/ranker/ranker_propagate_normalized_all_candidates +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/ranker/ranker_propagate_not_normalized_all_candidates +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/ranker/ranker_propagate_with_restart_all_candidates +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/ranker/ranker_top_results +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/ranker/ranker_whitelist_results_all_candidates +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/ranker/whitelist +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/text2binary_matrix/cutoff_binarizado.npy +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/text2binary_matrix/cutoff_no_binarizado.npy +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/text2binary_matrix/matrix_from_pairs +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/text2binary_matrix/matrix_from_pairs.lst +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/text2binary_matrix/set_diagonal_matrix.npy +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/text2binary_matrix/statistics_from_text2bin +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/text2binary_matrix/test_matrix +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/text2binary_matrix/test_matrix_bin.npy +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/text2binary_matrix/test_matrixfrommatrix +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/input_scripts/text2binary_matrix/test_pairs +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/jaccard_results.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/minicluster +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/monopartite_network_bin_matrix.npy +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/monopartite_network_for_validating.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/monopartite_network_matrix +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/monopartite_network_node_names.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/monopartite_network_weights_for_validating.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/monopartite_network_with_autorrelations.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/non_connected_network.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/pcc_results.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/simpson_results.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/transference_results.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/tripartite_network_for_validating.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/data/tripartite_network_weighted_for_validating.txt +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/test_integrate.py +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/test_kernel.py +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/test_netparser.py +0 -0
- {netanalyzer-1.0.0 → netanalyzer-1.1.0}/tests/test_ranker.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: NetAnalyzer
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.1.0
|
|
4
4
|
Summary: Python package for network analysis, operations and priorization.
|
|
5
5
|
Home-page: https://github.com/seoanezonjic/NetAnalyzer/
|
|
6
6
|
Author: seoanezonjic
|
|
@@ -15,7 +15,7 @@ License-File: LICENSE.txt
|
|
|
15
15
|
Requires-Dist: importlib-metadata; python_version < "3.8"
|
|
16
16
|
Requires-Dist: NetworkX
|
|
17
17
|
Requires-Dist: numpy
|
|
18
|
-
Requires-Dist: scipy==1.
|
|
18
|
+
Requires-Dist: scipy==1.13.1
|
|
19
19
|
Requires-Dist: statsmodels
|
|
20
20
|
Requires-Dist: graphviz
|
|
21
21
|
Requires-Dist: mako
|
|
@@ -25,15 +25,19 @@ Requires-Dist: scikit-learn
|
|
|
25
25
|
Requires-Dist: py_semtools
|
|
26
26
|
Requires-Dist: umap-learn
|
|
27
27
|
Requires-Dist: py_report_html
|
|
28
|
+
Requires-Dist: gensim==4.3.3
|
|
28
29
|
Requires-Dist: pecanpy
|
|
29
30
|
Requires-Dist: typing_extensions
|
|
30
31
|
Requires-Dist: py_cmdtabs
|
|
31
32
|
Requires-Dist: py_exp_calc
|
|
32
33
|
Requires-Dist: clusim
|
|
34
|
+
Requires-Dist: nodevectors
|
|
35
|
+
Requires-Dist: torch
|
|
33
36
|
Provides-Extra: testing
|
|
34
37
|
Requires-Dist: setuptools; extra == "testing"
|
|
35
38
|
Requires-Dist: pytest; extra == "testing"
|
|
36
39
|
Requires-Dist: pytest-cov; extra == "testing"
|
|
40
|
+
Dynamic: license-file
|
|
37
41
|
|
|
38
42
|
.. These are examples of badges you might want to add to your README:
|
|
39
43
|
please update the URLs accordingly
|
|
@@ -25,7 +25,7 @@ install_requires =
|
|
|
25
25
|
importlib-metadata; python_version<"3.8"
|
|
26
26
|
NetworkX
|
|
27
27
|
numpy
|
|
28
|
-
scipy==1.
|
|
28
|
+
scipy==1.13.1 #Version specified to be compatible with gensim (it allows a version lower than 1.14)
|
|
29
29
|
statsmodels
|
|
30
30
|
graphviz
|
|
31
31
|
mako
|
|
@@ -35,11 +35,14 @@ install_requires =
|
|
|
35
35
|
py_semtools
|
|
36
36
|
umap-learn
|
|
37
37
|
py_report_html
|
|
38
|
+
gensim==4.3.3 #Forcing to this version because it solves "triu" function importing error (it allows to be imported both from numpy and scipy)
|
|
38
39
|
pecanpy
|
|
39
40
|
typing_extensions
|
|
40
41
|
py_cmdtabs
|
|
41
42
|
py_exp_calc
|
|
42
43
|
clusim
|
|
44
|
+
nodevectors
|
|
45
|
+
torch
|
|
43
46
|
|
|
44
47
|
[options.packages.find]
|
|
45
48
|
where = src
|
|
@@ -55,7 +58,7 @@ testing =
|
|
|
55
58
|
[options.entry_points]
|
|
56
59
|
console_scripts =
|
|
57
60
|
netanalyzer = NetAnalyzer.cli_manager:netanalyzer
|
|
58
|
-
|
|
61
|
+
embedding_integrator = NetAnalyzer.cli_manager:embedding_integrator
|
|
59
62
|
randomize_clustering = NetAnalyzer.cli_manager:randomize_clustering
|
|
60
63
|
randomize_network = NetAnalyzer.cli_manager:randomize_network
|
|
61
64
|
ranker = NetAnalyzer.cli_manager:ranker
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from NetAnalyzer.netanalyzer import NetAnalyzer
|
|
2
2
|
from NetAnalyzer.net_parser import Net_parser
|
|
3
3
|
from NetAnalyzer.adv_mat_calc import Adv_mat_calc
|
|
4
|
-
from NetAnalyzer.graph2sim import Graph2sim
|
|
4
|
+
#from NetAnalyzer.graph2sim import Graph2sim
|
|
5
5
|
from NetAnalyzer.net_plotter import Net_plotter
|
|
6
6
|
from NetAnalyzer.ranker import Ranker
|
|
7
7
|
from NetAnalyzer.performancer import Performancer
|
|
@@ -2,17 +2,9 @@ import sys
|
|
|
2
2
|
import numpy as np
|
|
3
3
|
from scipy import linalg
|
|
4
4
|
import scipy.stats as stats
|
|
5
|
-
import umap
|
|
6
5
|
from warnings import warn
|
|
7
6
|
class Adv_mat_calc:
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
@staticmethod
|
|
11
|
-
def data2umap(data, n_neighbors = 15, min_dist = 0.1, n_components = 2, metric = 'euclidean', random_seed = None): #2exp?
|
|
12
|
-
reducer = umap.UMAP(n_neighbors=n_neighbors, min_dist=min_dist, n_components=n_components, metric=metric, random_state= random_seed)
|
|
13
|
-
umap_coords = reducer.fit_transform(data)
|
|
14
|
-
return umap_coords
|
|
15
|
-
|
|
16
8
|
# Alaimo 2014, doi: 10.3389/fbioe.2014.00071
|
|
17
9
|
@staticmethod
|
|
18
10
|
def tranference_resources(matrix1, matrix2, lambda_value1 = 0.5, lambda_value2 = 0.5): #2exp?
|
|
@@ -34,6 +34,33 @@ def group_nodes_parse(string):
|
|
|
34
34
|
|
|
35
35
|
return group_nodes
|
|
36
36
|
|
|
37
|
+
def reference_nodes_parse(string):
|
|
38
|
+
references_nodes = []
|
|
39
|
+
if os.path.isfile(string):
|
|
40
|
+
with open(string) as file:
|
|
41
|
+
for line in file:
|
|
42
|
+
node = line.strip()
|
|
43
|
+
references_nodes.append(node)
|
|
44
|
+
else:
|
|
45
|
+
references_nodes = single_split(string, sep=",")
|
|
46
|
+
return references_nodes
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def external_cluster_metadata(string):
|
|
50
|
+
metadata = loading_dic(string)
|
|
51
|
+
if metadata.get("sim"):
|
|
52
|
+
parsed_sim = {}
|
|
53
|
+
with open(metadata["sim"]) as file:
|
|
54
|
+
for line in file:
|
|
55
|
+
line = line.strip().split("\t")
|
|
56
|
+
parsed_sim[(line[0],line[1])] = float(line[2])
|
|
57
|
+
parsed_sim[(line[1],line[0])] = float(line[2])
|
|
58
|
+
metadata["sim"] = parsed_sim
|
|
59
|
+
if metadata.get("metadata_classify"):
|
|
60
|
+
metadata["metadata_classify"] = group_nodes_parse(metadata["metadata_classify"])
|
|
61
|
+
return metadata
|
|
62
|
+
|
|
63
|
+
|
|
37
64
|
def graph_options_parse(string):
|
|
38
65
|
graph_options = {}
|
|
39
66
|
for pair in string.split(','):
|
|
@@ -72,7 +99,7 @@ def add_output_flags(parser, default_opt={"output_file": "output_file"}):
|
|
|
72
99
|
def add_input_graph_flags(parser, multinet = False):
|
|
73
100
|
if multinet:
|
|
74
101
|
parser.add_argument("-i", "--input_file", dest="input_file", default= None, type = lambda string: loading_dic(string, sep1=";", sep2=","),
|
|
75
|
-
help="Input file to create networks for further analysis")
|
|
102
|
+
help="Input file to create networks for further analysis, specify NULL if no network needed")
|
|
76
103
|
parser.add_argument("-n","--node_names_file", dest="node_files", default=None, type = lambda string: loading_dic(string, sep1=";", sep2=","),
|
|
77
104
|
help="Files with node names corresponding to the input matrix, only use when -i is set to bin or matrix, could be two paths, indicating rows and cols, respectively. If just one path added, it is assumed to be for rows and cols")
|
|
78
105
|
# parser.add_argument("-l","--layers", dest="layers", default=[['layer', '-']], type= lambda x: double_split(x, sep1=";",sep2=","),
|
|
@@ -91,6 +118,14 @@ def add_input_graph_flags(parser, multinet = False):
|
|
|
91
118
|
parser.add_argument("--both_repre_formats", dest="load_both", default=False, action='store_true',
|
|
92
119
|
help="If we need to load the adjacency matrixes and the graph object")
|
|
93
120
|
|
|
121
|
+
def add_cluster_flags(parser):
|
|
122
|
+
parser.add_argument("-G","--group_nodes", dest="group_nodes", default=None,
|
|
123
|
+
help="File path or groups separated by ';' and group node ids comma separared")
|
|
124
|
+
parser.add_argument("--group_node_column", dest="group_node_index", default= 1, type=based_0,
|
|
125
|
+
help="Number of the nodes column")
|
|
126
|
+
parser.add_argument("--group_cluster_column", dest="group_cluster_index", default= 0, type=based_0,
|
|
127
|
+
help="Number of the clusters column")
|
|
128
|
+
|
|
94
129
|
def add_resources_flags(parser, default_opt={"threads": 1}):
|
|
95
130
|
parser.add_argument("-T", "--threads", dest="threads", default=default_opt["threads"], type=int,
|
|
96
131
|
help="Number of threads to use in computation.")
|
|
@@ -99,10 +134,16 @@ def add_resources_flags(parser, default_opt={"threads": 1}):
|
|
|
99
134
|
def add_common_relations_process(parser):
|
|
100
135
|
parser.add_argument("-N","--no_autorelations", dest="no_autorelations", default=False, action='store_true',
|
|
101
136
|
help="No processing autorelations")
|
|
137
|
+
|
|
138
|
+
def add_plotting_options(parser, default_opt={"graph_file": None}):
|
|
139
|
+
parser.add_argument("-g", "--graph_file", dest="graph_file", default=default_opt["graph_file"],
|
|
140
|
+
help="Build a graphic representation of the network")
|
|
141
|
+
parser.add_argument("--graph_options", dest="graph_options", default={'method': 'elgrapho', 'layout': 'forcedir', 'steps': '30'}, type= graph_options_parse,
|
|
142
|
+
help="Set graph parameters as 'NAME1=value1,NAME2=value2,...")
|
|
102
143
|
|
|
103
144
|
##############################################
|
|
104
145
|
|
|
105
|
-
def
|
|
146
|
+
def embedding_integrator(args=None):
|
|
106
147
|
parser = argparse.ArgumentParser(description='Integrate kernels or embedding in matrix format')
|
|
107
148
|
add_kernel_flags(parser, multiple = True)
|
|
108
149
|
add_output_flags(parser, default_opt={"output_file": "general_matrix"})
|
|
@@ -120,7 +161,7 @@ def integrate_kernels(args=None):
|
|
|
120
161
|
# Resources
|
|
121
162
|
add_resources_flags(parser=parser, default_opt={"threads": 8})
|
|
122
163
|
opts = parser.parse_args(args)
|
|
123
|
-
|
|
164
|
+
main_embedding_integrator(opts)
|
|
124
165
|
|
|
125
166
|
def netanalyzer(args=None):
|
|
126
167
|
parser = argparse.ArgumentParser(description='Perform Network analysis from NetAnalyzer package')
|
|
@@ -128,8 +169,12 @@ def netanalyzer(args=None):
|
|
|
128
169
|
add_input_graph_flags(parser)
|
|
129
170
|
add_output_flags(parser, default_opt={"output_file": "output_file"})
|
|
130
171
|
add_random_seed(parser, default_seed=None)
|
|
172
|
+
add_cluster_flags(parser)
|
|
131
173
|
parser.add_argument("-O", "--ontology", dest="ontologies", default=[], type=lambda x: double_split(x, sep1=";",sep2=","),
|
|
132
174
|
help="String that define which ontologies must be used with each layer. String definition:'layer_name1,path_to_obo_file1;layer_name2,path_to_obo_file2'")
|
|
175
|
+
# Filters
|
|
176
|
+
parser.add_argument("--filter_connected_components", dest="filter_connected_components", default=None, type= lambda x: int(x),
|
|
177
|
+
help= "Specify the minimim size of the connected component to be taken into account")
|
|
133
178
|
# Assoc
|
|
134
179
|
parser.add_argument("-P","--use_pairs", dest="use_pairs", default='conn',
|
|
135
180
|
help="Which pairs must be computed. 'all' means all posible pair node combinations and 'conn' means the pair are truly connected in the network. Default 'conn' ")
|
|
@@ -139,7 +184,7 @@ def netanalyzer(args=None):
|
|
|
139
184
|
help="Output file name for association values")
|
|
140
185
|
parser.add_argument("-p","--performance_file", dest="performance_file", default='perf_values.txt',
|
|
141
186
|
help="Output file name for performance values")
|
|
142
|
-
parser.add_argument("-u","--use_layers", dest="use_layers", default=[], type= lambda x: double_split(x, sep1=";",sep2=","),
|
|
187
|
+
parser.add_argument("-u","--use_layers", dest="use_layers", default=[['layer']], type= lambda x: double_split(x, sep1=";",sep2=","),
|
|
143
188
|
help="Set which layers must be used on association methods: layer1,layer2;layerA,layerB")
|
|
144
189
|
parser.add_argument("-c","--control_file", dest="control_file", default=None,
|
|
145
190
|
help="Control file name")
|
|
@@ -148,23 +193,33 @@ def netanalyzer(args=None):
|
|
|
148
193
|
help="Kernel operation to perform with the adjacency matrix")
|
|
149
194
|
parser.add_argument("--embedding_add_options", dest="embedding_add_options", default="",
|
|
150
195
|
help="Additional options for embedding kernel methods. It must be defines as '\"opt_name1\" : value1, \"opt_name2\" : value2,...' ")
|
|
196
|
+
parser.add_argument("--cluster_embedding", dest="cluster_embedding", default="", help="Generate clustering from network embedding")
|
|
197
|
+
parser.add_argument("--cluster_embedding_add_options", dest="cluster_embedding_add_options", default="", help="Select specific parameters for the clustering")
|
|
151
198
|
parser.add_argument("-z","--normalize_kernel_values", dest="normalize_kernel", default=False, action='store_true',
|
|
152
199
|
help="Apply cosine normalization to the obtained kernel")
|
|
153
200
|
parser.add_argument("--coords2sim_type", dest="coords2sim_type", default="dotProduct", help= "Select the type of transformation from coords to similarity: dotProduct, normalizedScaling, infinity and int or float numbers")
|
|
201
|
+
parser.add_argument("--embedding_coords", dest= "embedding_coords", default=False, action="store_true", help="Use this flag in case of obtaining the coordinates of the system")
|
|
154
202
|
parser.add_argument("-K","--kernel_file", dest="kernel_file", default='kernel_file',
|
|
155
203
|
help="Output file name for kernel values")
|
|
204
|
+
parser.add_argument("--external_embedding", dest="external_embedding", default=None, type = lambda x: single_split(x, sep=","),
|
|
205
|
+
help="Use this flag when an external embedding is needed for posterior analysis. Format: matrix_path,row_path,col_path. col_path just for kernel format")
|
|
156
206
|
# Plotting
|
|
157
|
-
parser
|
|
158
|
-
help="Build a graphic representation of the network")
|
|
159
|
-
parser.add_argument("--graph_options", dest="graph_options", default={'method': 'elgrapho', 'layout': 'forcedir', 'steps': '30'}, type= graph_options_parse,
|
|
160
|
-
help="Set graph parameters as 'NAME1=value1,NAME2=value2,...")
|
|
207
|
+
add_plotting_options(parser)
|
|
161
208
|
# Nodes states
|
|
162
|
-
parser.add_argument("-r","--reference_nodes", dest="reference_nodes", default=[], type= lambda x:
|
|
163
|
-
help="
|
|
164
|
-
parser.add_argument("
|
|
165
|
-
|
|
209
|
+
parser.add_argument("-r","--reference_nodes", dest="reference_nodes", default=[], type= lambda x: reference_nodes_parse(x),
|
|
210
|
+
help="Files to a column of nodes or node ids comma separared format in terminal")
|
|
211
|
+
parser.add_argument("--split_groups", dest="split_groups", default=False, action= "store_true",
|
|
212
|
+
help="Split groups in subgroups based on clustering methods")
|
|
166
213
|
parser.add_argument("-d","--delete", dest="delete_nodes", default=[], type= lambda x: single_split(x, sep=";"),
|
|
167
214
|
help="Remove nodes from file. If PATH;r then nodes not included in file are removed")
|
|
215
|
+
# Extract subgraph
|
|
216
|
+
parser.add_argument("--extract_subgraphs", dest="extract_subgraphs", default=False, action="store_true",
|
|
217
|
+
help="Add this flag in case you want to create subgraphs from different communities")
|
|
218
|
+
# parittion metric
|
|
219
|
+
parser.add_argument("--external_metadata_cluster", dest="external_metadata_cluster", default = None, type = lambda x: external_cluster_metadata(x),
|
|
220
|
+
help="Adding external metadata cluster to evaluate with external metrics. You can add similarity between nodes 'sim' or node classification 'metadata_classify' in a two level format with ; and ,")
|
|
221
|
+
parser.add_argument("--partition_metrics", dest="partition_metrics", default=False, action='store_true',
|
|
222
|
+
help="Select this option to obatin global partition metrics")
|
|
168
223
|
# Compare cluster
|
|
169
224
|
parser.add_argument("--overlapping_communities", dest ="overlapping_communities", default=False, action="store_true",
|
|
170
225
|
help=" This is needed to activate overlapping sensitive operations in communities analysis")
|
|
@@ -177,7 +232,7 @@ def netanalyzer(args=None):
|
|
|
177
232
|
help="Type of cluster algorithm")
|
|
178
233
|
parser.add_argument("-B", "--build_clusters_add_options", dest="build_clusters_add_options", default="",
|
|
179
234
|
help="Additional options for clustering methods. It must be defines as '\"opt_name1\" : value1, \"opt_name2\" : value2,...'")
|
|
180
|
-
parser.add_argument("--output_build_clusters", dest="output_build_clusters", default=
|
|
235
|
+
parser.add_argument("--output_build_clusters", dest="output_build_clusters", default="discovered_clusters.txt", help= "output name for discovered clusters")
|
|
181
236
|
# Expand cluster
|
|
182
237
|
parser.add_argument("-x","--expand_clusters", dest="expand_clusters", default=None,
|
|
183
238
|
help="Method to expand clusters Available methods: sht_path")
|
|
@@ -187,7 +242,7 @@ def netanalyzer(args=None):
|
|
|
187
242
|
# Cluster metrics
|
|
188
243
|
parser.add_argument("-M", "--group_metrics", dest="group_metrics", default=None, type= lambda x: single_split(x, sep=";"),
|
|
189
244
|
help="Perform group group_metrics")
|
|
190
|
-
parser.add_argument("--output_metrics_by_cluster", dest="output_metrics_by_cluster", default='group_metrics.txt', help= "output name for metrics by cluster file")
|
|
245
|
+
parser.add_argument("--output_metrics_by_cluster", dest="output_metrics_by_cluster", default='group_metrics.txt', help= "output name for metrics by cluster file, by default: group_metrics.txt")
|
|
191
246
|
parser.add_argument("-S", "--summarize_metrics", dest="summarize_metrics", default=None, type= lambda x: single_split(x, sep=";"),
|
|
192
247
|
help="Summarize metrics from groups")
|
|
193
248
|
parser.add_argument("--output_summarized_metrics", dest="output_summarized_metrics", default='group_metrics_summarized.txt', help= "output name for summarized metrics file")
|
|
@@ -200,27 +255,21 @@ def netanalyzer(args=None):
|
|
|
200
255
|
# DSL section
|
|
201
256
|
parser.add_argument("--dsl_script", dest="dsl_script", default=None,
|
|
202
257
|
help="Path to dsl script to perform complex analysis")
|
|
258
|
+
# output network
|
|
259
|
+
parser.add_argument("--output_network", dest="output_network", default=None,
|
|
260
|
+
help="Output of the network modified during process")
|
|
203
261
|
# Resources
|
|
204
262
|
add_resources_flags(parser=parser, default_opt={"threads": 2})
|
|
205
263
|
|
|
206
264
|
opts = parser.parse_args(args)
|
|
207
265
|
main_netanalyzer(opts)
|
|
208
|
-
|
|
266
|
+
|
|
209
267
|
def randomize_clustering(args=None):
|
|
210
268
|
parser = argparse.ArgumentParser(description='Perform clusters randomization')
|
|
211
269
|
add_output_flags(parser, default_opt={"output_file": "random_clusters.txt"})
|
|
212
|
-
parser
|
|
213
|
-
help="Input file to create networks for further analysis")
|
|
214
|
-
parser.add_argument("-S", "--split_char", dest="column_sep", default = "\t",
|
|
215
|
-
help="Character for splitting input file. Default: tab")
|
|
270
|
+
add_cluster_flags(parser)
|
|
216
271
|
parser.add_argument("-a", "--aggregate_sep", dest="aggregate_sep", default = None,
|
|
217
272
|
help="This option activates aggregation in output. Separator character must be provided")
|
|
218
|
-
parser.add_argument("-N", "--node_column", dest="node_index", default= 1, type=based_0,
|
|
219
|
-
help="Number of the nodes column")
|
|
220
|
-
parser.add_argument("-C", "--cluster_column", dest="cluster_index", default= 0, type=based_0,
|
|
221
|
-
help="Number of the clusters column")
|
|
222
|
-
parser.add_argument("-s", "--node_sep", dest="node_sep", default = None,
|
|
223
|
-
help="Node split character. This option must to be used when input file is aggregated")
|
|
224
273
|
# random conf
|
|
225
274
|
parser.add_argument("-r", "--random_type", dest="random_type", default = ["hard_fixed"], type = lambda x: single_split(x,sep=":"),
|
|
226
275
|
help="""Indicate random mode. First, the not custom randomization, where cluster size is the same:
|
|
@@ -278,7 +327,12 @@ def ranker(args=None):
|
|
|
278
327
|
help="File to save Top N genes")
|
|
279
328
|
parser.add_argument("--add_tags", dest="add_tags", default=None, help="Adding node attribute by seed: format seed\\tnode\\tattr")
|
|
280
329
|
parser.add_argument("--representation_seed_metric", dest = "representation_seed_metric", default = "mean",
|
|
281
|
-
help = "select the type of representation on seed, default mean, options: mean
|
|
330
|
+
help = "select the type of representation on seed, default mean, options: mean, max, bayesian, stouffer, fisher")
|
|
331
|
+
parser.add_argument("--score2pvalue", dest="score2pvalue", default=None, help="""Passing score matrix to pvalue matrix to use as new scores
|
|
332
|
+
, the modes to pass to pvalues are: znormalization, quantile, logistic. When using logistic systems would train a logistic regression model.""",)
|
|
333
|
+
parser.add_argument("--training_dataset", dest="training_dataset", default=None, help="""Path to training
|
|
334
|
+
dataset must be specified, where the format is: node1\\tnode2\\tP (Positive) or N (Negative)""")
|
|
335
|
+
parser.add_argument("--adj_matrix", dest="adj_matrix", default=None, help="""Path to the original adjacency matrix""")
|
|
282
336
|
# Resources
|
|
283
337
|
add_resources_flags(parser=parser, default_opt={"threads": 1})
|
|
284
338
|
opts = parser.parse_args(args)
|
|
@@ -289,42 +343,60 @@ def text2binary_matrix(args=None):
|
|
|
289
343
|
add_output_flags(parser, default_opt={"output_file": None})
|
|
290
344
|
parser.add_argument('-i', '--input_file', dest="input_file", default=None,
|
|
291
345
|
help="input file")
|
|
292
|
-
parser.add_argument(
|
|
293
|
-
|
|
346
|
+
parser.add_argument("-n","--node_names_file", dest="node_files", default=None, type = lambda x: single_split(x, sep=","),
|
|
347
|
+
help="Files with node names corresponding to the input matrix, only use when -i is set to bin or matrix, could be two paths, indicating rows and cols, respectively. If just one path added, it is assumed to be for rows and cols")
|
|
294
348
|
parser.add_argument('-t', '--input_type', dest="input_type", default='pair',
|
|
295
|
-
|
|
349
|
+
help='Set input format file. "pair", "matrix" or "bin"')
|
|
296
350
|
parser.add_argument('-O', '--output_type', dest="output_type", default='bin',
|
|
297
|
-
|
|
351
|
+
help='Set output format file. "bin" for binary (default) or "mat" for tabulated text file matrix')
|
|
298
352
|
# Process matrix
|
|
299
353
|
parser.add_argument('-d', '--set_diagonal', dest="set_diagonal", default=False, action='store_true',
|
|
300
|
-
|
|
354
|
+
help='Set to 1.0 the main diagonal')
|
|
301
355
|
parser.add_argument('-B', '--binarize', dest="binarize", default=None, type = float,
|
|
302
|
-
|
|
356
|
+
help='Binarize matrix changing x >= thr to one and any other to zero into matrix given')
|
|
303
357
|
parser.add_argument('-c', '--cutoff', dest="cutoff", default=None, type = float,
|
|
304
|
-
|
|
358
|
+
help='Cutoff matrix values keeping just x >= and setting any other to zero into matrix given')
|
|
305
359
|
# Get stats
|
|
306
360
|
parser.add_argument('-s', '--get_stats', dest="stats", default=None,
|
|
307
|
-
|
|
308
|
-
|
|
361
|
+
help='Get stats from the processed matrix')
|
|
362
|
+
parser.add_argument('--non_symmetric', dest="symmetric", default=True, action='store_false',
|
|
363
|
+
help='Set to use non symmetric matrix. By default is symmetric')
|
|
364
|
+
parser.add_argument('--coords2kernel', dest="coords2kernel",help="passing coordinates to kernel",default=None)
|
|
365
|
+
parser.add_argument('--umap', dest='umap', help="projects coords in umap",default=False, action="store_true")
|
|
366
|
+
parser.add_argument('--sparse_type', dest="sparse_type", default=None, help="""The type of sparse matrix for the output, this option is useful when output type is
|
|
367
|
+
set to bin. The options are: bsr, coo, csc, csr, dia, dok, lil""")
|
|
368
|
+
parser.add_argument("--round", dest="round", default=None, type=int, help="choose this to round in the i-th digit for all the values in the matrix or relations")
|
|
369
|
+
# normalize matrix
|
|
370
|
+
parser.add_argument("--normalize_by", dest="normalize_by", default=None, type=str, help="Type of normalization for matrix: cosine, rows_cols, min_max")
|
|
371
|
+
# order
|
|
372
|
+
parser.add_argument('--matrix_row_index', dest="rowids_index", default=None,
|
|
373
|
+
help='File with ROW names to use as index to build the matrix. Order is take into account')
|
|
374
|
+
parser.add_argument('--matrix_col_index', dest="colids_index", default=None,
|
|
375
|
+
help='File with COLUMN names to use as index to build the matrix. Order is take into account')
|
|
376
|
+
parser.add_argument('--init_matrix_type', dest="init_matrix_type", default="dense",
|
|
377
|
+
help='Select this to specify which is the matrix type during the intitialization of the matrix. Possible values: dense or an sparse type of scipy (bsr, coo, csc, csr, dia, dok, lil).')
|
|
378
|
+
parser.add_argument('--output_matrix_type', dest="output_matrix_type", default="dense",
|
|
379
|
+
help='Select this to specify which is the matrix type during the intitialization of the matrix. Possible values: dense or an sparse type of scipy (bsr, coo, csc, csr, dia, dok, lil).')
|
|
309
380
|
opts = parser.parse_args(args)
|
|
310
381
|
main_text2binary_matrix(opts)
|
|
311
382
|
|
|
312
383
|
def net_explorer(args=None, test=False):
|
|
313
|
-
parser = argparse.ArgumentParser(description="
|
|
384
|
+
parser = argparse.ArgumentParser(description="Exploring different networks attributes")
|
|
314
385
|
add_common_relations_process(parser) # Common relations options
|
|
315
386
|
add_input_graph_flags(parser, multinet = True) # Input graph
|
|
316
387
|
add_seed_flags(parser) # Adding seeds
|
|
317
|
-
|
|
388
|
+
add_cluster_flags(parser)
|
|
389
|
+
add_plotting_options(parser, default_opt={"graph_file": "output_file"})
|
|
390
|
+
add_resources_flags(parser)
|
|
391
|
+
add_random_seed(parser)
|
|
318
392
|
# layer processing
|
|
319
393
|
parser.add_argument('-c', '--layer_cutoff', dest="layer_cutoff", default={}, type = lambda string: loading_dic(string, sep1=";", sep2=","),
|
|
320
|
-
|
|
394
|
+
help='Cutoff to apply to every layer in the multiplexed one')
|
|
321
395
|
# Analysis options
|
|
322
|
-
parser.add_argument("
|
|
323
|
-
|
|
324
|
-
parser.add_argument("--plot_network_method", dest="plot_network_method", default="pyvis",
|
|
325
|
-
help="Defining the plot method used on report")
|
|
396
|
+
parser.add_argument("--neigh_level", dest="neigh_level", default={}, type = lambda string: loading_dic(string, sep1=";", sep2=","),
|
|
397
|
+
help="Defining the level of neighbourhood on the initial set of nodes")
|
|
326
398
|
parser.add_argument("--embedding_proj", dest="embedding_proj", default=None,
|
|
327
|
-
|
|
399
|
+
help="Select different projections methods: umap")
|
|
328
400
|
parser.add_argument("--compare_nets", dest="compare_nets", default=False, action="store_true")
|
|
329
401
|
opts = parser.parse_args(args)
|
|
330
402
|
to_test = main_net_explorer(opts, test)
|