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

src/nt_composition/__main__.py: addition of parameter community_size to limit...

src/nt_composition/__main__.py: addition of parameter community_size to limit nt frequency analysis to only exons located in large community of co-regulated exons. This parameter can be set to -1 for using the old behavior
parent 1db24ea1
No related branches found
No related tags found
No related merge requests found
...@@ -21,6 +21,7 @@ import lazyparser as lp ...@@ -21,6 +21,7 @@ import lazyparser as lp
def launcher(weight: int = 1, global_weight: int = 0, ft_type: str = 'nt', def launcher(weight: int = 1, global_weight: int = 0, ft_type: str = 'nt',
same_gene: bool = False, compute_mean: bool = True, same_gene: bool = False, compute_mean: bool = True,
iteration: int = 10000, kind: str = 'density', iteration: int = 10000, kind: str = 'density',
community_size: int = -1,
logging_level: str = "DISABLE"): logging_level: str = "DISABLE"):
""" """
Launch the creation of density file. Launch the creation of density file.
...@@ -42,13 +43,18 @@ def launcher(weight: int = 1, global_weight: int = 0, ft_type: str = 'nt', ...@@ -42,13 +43,18 @@ def launcher(weight: int = 1, global_weight: int = 0, ft_type: str = 'nt',
correlation figure between the feature frequency of an exon and the \ correlation figure between the feature frequency of an exon and the \
frequency of the same feature for other co-localized exons. 'distance' \ frequency of the same feature for other co-localized exons. 'distance' \
to check if the frequencies of co-localized exon are closer than \ to check if the frequencies of co-localized exon are closer than \
randomly expected. (default : 'density'). randomly expected. (default : 'density').*
:param community_size: consider only exons within communities bigger
than community size. if community_size = -1. This option is deactivated.
:param logging_level: The level of data to display (default 'DISABLE') :param logging_level: The level of data to display (default 'DISABLE')
""" """
get_interactions_number(weight, same_gene, logging_level) get_interactions_number(weight, same_gene, logging_level)
if community_size == -1:
community_size = None
if kind == "density": if kind == "density":
create_all_frequency_figures(ConfigNt.cpu, weight, global_weight, create_all_frequency_figures(ConfigNt.cpu, weight, global_weight,
ft_type, same_gene, compute_mean, ft_type, same_gene, compute_mean,
community_size,
logging_level) logging_level)
else: else:
create_all_distance_figures(ConfigNt.cpu, weight, global_weight, create_all_distance_figures(ConfigNt.cpu, weight, global_weight,
......
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