Skip to content
Snippets Groups Projects
Commit fd031d72 authored by nfontrod's avatar nfontrod
Browse files

src/find_interaction_cluster/create_ppi_files.py: modification to call the new...

src/find_interaction_cluster/create_ppi_files.py: modification to call the new functions created in src/find_interaction_cluster/radomization_test_ppi.py
parent 93caebe1
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,7 @@ from .community_finder import create_graph, find_communities, \
write_cytoscape_graph
from doctest import testmod
from .radomization_test_ppi import get_ppi_community_gene, \
get_dna_community_gene, update_overlap_df
get_dna_community_gene, update_overlap_df,summary_randomisation_test
def get_community_dic_fom_community_file(mfile: Union[Path, pd.DataFrame],
......@@ -310,13 +310,23 @@ def ppi_stats_analysis(community_file: Path, fasterdb_ppi: Path,
ppi_gene = get_ppi_community_gene(pd.read_csv(ppi_outfile, sep="\t"))
dic_dna_gene = get_dna_community_gene(pd.read_csv(community_file,
sep="\t"))
df = update_overlap_df(df_overlap, dic_dna_gene, ppi_gene, iteration)
df, dic_values = update_overlap_df(df_overlap, dic_dna_gene, ppi_gene,
iteration)
outstat = ConfigGraph.get_community_file(project, weight, global_weight,
same_gene, "gene",
f"ppi_gene_table_{iteration}_"
f"stat.txt",
"community_gene_vs_protein")
df.to_csv(outstat, sep="\t", index=False)
final_df = summary_randomisation_test(df, dic_dna_gene, ppi_gene,
iteration, dic_values,
use_seed = False)
outstat = ConfigGraph.get_community_file(project, weight, global_weight,
same_gene, "gene",
f"ppi_gene_table_{iteration}_"
f"stat_recap.txt",
"community_gene_vs_protein")
final_df.to_csv(outstat, sep="\t", index=False)
def ppi_stat_launcher(ps: int, weights: List[int],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment