diff --git a/src/find_interaction_cluster/clip_figures/clip_analyser.py b/src/find_interaction_cluster/clip_figures/clip_analyser.py index 230f64b97e15bbe6cfe90a38409855040d9004c9..66762f6eb21bd0cb148f78b0441d5c9bab824912 100644 --- a/src/find_interaction_cluster/clip_figures/clip_analyser.py +++ b/src/find_interaction_cluster/clip_figures/clip_analyser.py @@ -50,7 +50,7 @@ def bedtools_intersect(gene_bed: Path, clip_bed: Path, """ res = sp.check_output(f"bedtools intersect -a {gene_bed} " - f"-b {clip_bed} -c", shell=True) + f"-b {clip_bed} -c -s", shell=True) res = StringIO(str(res, "utf-8")) id_col = f"id_{feature}" columns = ["chr", "start", "end", id_col, "name", "strand", "clip_peak"] @@ -182,7 +182,7 @@ def create_table(feature: str, clip_file: Path, :param com_file: A file containing communities :return: The final dataframe that can be used to create clip figures - >>> cf = find_or_create_community("", 3, 3, True, 1.5, "gene") + >>> cf = find_or_create_community("", 3, 3, True, 1.5, "ALL", "gene") >>> create_table("gene", ConfigClip.test_clip_bed, ... ConfigClip.test_gene_bed, cf) id_gene clip_peak peak_density community community_size @@ -407,6 +407,7 @@ def clip_folder_analysis(clip_folder: Path, project: str, weight: int, processes.append(pool.apply_async(create_figure, args)) [p.get(timeout=None) for p in processes] + if __name__ == "__main__": import doctest doctest.testmod() \ No newline at end of file