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

src/find_interaction_cluster/graph_figures/__main__.py: add a parameter iteration and community

parent 7fea9838
No related branches found
No related tags found
No related merge requests found
......@@ -12,11 +12,14 @@ from .graph_functions import create_graph_figure, create_many_graph_figures
@lp.parse(weight=range(1, 11), global_weight=range(11),
feature=('gene', 'exon'), reg=("reg", "down", "up"))
def launcher(sf_name: str, reg: str, weight: int,
def launcher(ps: int, sf_name: str, reg: str, weight: int,
global_weight: int, inflation: float, same_gene: bool = True,
cell_line: str = "ALL", project: str = 'GSM1018963_GSM1018964',
feature: str = "gene", threshold: float = 0.1, min_reg: int = 2):
feature: str = "gene", threshold: float = 0.1, min_reg: int = 2,
iteration: int = 0, min_community: int = 3):
"""
:param ps: The number of processes to create (only used if sf_name \
equals ALL).
:param project: A project name of interest. Used only if \
global_weight is 0 (default GSM1018963_GSM1018964)
:param weight: The weight of interaction to consider
......@@ -38,16 +41,22 @@ def launcher(sf_name: str, reg: str, weight: int,
(default 0.1)
:param min_reg: The minimum of regulated exon in a community to \
take it into account (default 2)
:param iteration: If this parameter is greater or equal to 20 then a \
permutation test is made to find the significantly enriched communities. \
Below 20, significant communities are found
:param min_community: The minimum number of enriched community \
required to produce a figure
"""
if feature == "gene" and not same_gene:
print("Warning: setting same_gene to True")
if sf_name != "ALL":
create_graph_figure(project, weight, global_weight, same_gene,
inflation, cell_line, feature, sf_name, reg,
threshold, min_reg)
threshold, min_reg, iteration, min_community)
else:
create_many_graph_figures(project, weight, global_weight, same_gene,
inflation, cell_line, feature, threshold,
min_reg)
create_many_graph_figures(ps, project, weight, global_weight,
same_gene, inflation, cell_line,
feature, threshold, min_reg, iteration,
min_community)
launcher()
\ No newline at end of file
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