diff --git a/src/find_interaction_cluster/community_figures/__main__.py b/src/find_interaction_cluster/community_figures/__main__.py index 7cef8dd4ac65fccb0d7296154482de8f1822c3dd..e01081b74bdc737a8ddba3584afa4dc77cfbe615 100644 --- a/src/find_interaction_cluster/community_figures/__main__.py +++ b/src/find_interaction_cluster/community_figures/__main__.py @@ -49,11 +49,11 @@ def load_and_check_table(table: str, feature: str, target_col: str): return df -@lp.parse(table="file", output="folder", test_type=["lm", "permutation"], - iteration="20 < iteration") +@lp.parse(table="file", test_type=["lm", "permutation"], + iteration="20 < iteration", sd_community = ["y", "n", "Y", "N"]) def create_community_figures(table: str, feature: str, target_col: str, output: str, outfile: str, test_type: str, - target_kind: str = "", + target_kind: str = "", sd_community: str = "y", iteration: int = 10000) -> None: """ Create a dataframe with a control community, save it as a table and \ @@ -73,13 +73,17 @@ def create_community_figures(table: str, feature: str, target_col: str, target_col. :param iteration: The number of sub samples to create. This parameter \ is only used if test_type = 'permutation' (default 10000). + :param sd_community: y to display the standard deviation for communities \ + false else. """ df = load_and_check_table(table, feature, target_col) if not outfile.endswith(".pdf"): raise FileNameError("The output figure must be in pdf format !") moutfile = Path(output) / outfile + sd_community = sd_community.lower() == 'y' create_community_fig(df, feature, target_col, moutfile, test_type, - target_kind=target_kind, iteration=iteration) + target_kind=target_kind, iteration=iteration, + sd_community=sd_community) if __name__ == "__main__":