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

src/find_interaction_cluster/clip_figures/__main__.py: changes in...

src/find_interaction_cluster/clip_figures/__main__.py: changes in clip_analysis to be able to make community figure showing the precentage of gene in each community regulated by a splicing factor
parent 9a8acca2
No related branches found
No related tags found
No related merge requests found
......@@ -38,9 +38,10 @@ def clip_analysis(clip_folder: str, weight: int = -1,
:param cell_line: Interactions are only selected from projects made on \
a specific cell line (ALL to disable this filter). (default ALL)
:param feature: The feature we want to analyse (default 'exon')
:param clip_folder: A folder containing clip file
:param clip_folder: A folder containing clip file or a string \
corresponding to a splicing factor followed by a regulation
:param test_type: The kind of test to perform for frequency analysis. \
(default 'lm') (choose from 'lm', 'permutation')
(default 'permutation') (choose from 'lm', 'permutation')
:param iteration: The number of iteration
:param display_size: True to display the size of the community. \
False to display nothing. (default False)
......@@ -56,11 +57,15 @@ def clip_analysis(clip_folder: str, weight: int = -1,
if (weight == -1 or global_weight == -1) and community_file == "":
raise ValueError(f"Global weight or weight can't be equal to one if "
f"community_file is not defined !")
clip_folder = Path(clip_folder)
if "_up" not in clip_folder and "_down" not in clip_folder:
clip_folder = Path(clip_folder)
if not clip_folder.is_dir():
raise NotADirectoryError(
f"{clip_folder} is not an existing directory")
else:
clip_folder = clip_folder.rsplit("_", 1)
if test_type == "lm":
raise NotImplementedError("test_type for lm is not implemented !")
if not clip_folder.is_dir():
raise NotADirectoryError(f"{clip_folder} is not an existing directory")
clip_folder_analysis(clip_folder, project, weight, global_weight,
same_gene, inflation, cell_line, feature, test_type,
iteration, display_size, community_file, sl_reg, ps,
......
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