Commit aedced90 authored by Yoann Dufresne's avatar Yoann Dufresne
Browse files

d2 simplification and add maxclique community detection as argument

parent 30776560
......@@ -35,33 +35,13 @@ rule d2_simplification:
"python3 deconvolution/d2_reduction.py -o {output.simplified_d2} {input.barcode_graph} {input.d2_raw}"
rule d2_generation_cliques:
rule d2_generation:
input:
barcode_graph=f"{WORKDIR}/{{file}}.gexf"
output:
d2_file=f"{WORKDIR}/{{file}}_d2_raw_maxclq.gexf"
d2_file=f"{WORKDIR}/{{file}}_d2_raw_{{method}}.gexf"
shell:
f"python3 deconvolution/to_d2_graph.py {{input.barcode_graph}} -o {WORKDIR}/{{wildcards.file}}_d2_raw_maxclq"
rule d2_generation_louvain:
input:
barcode_graph=f"{WORKDIR}/{{file}}.gexf"
output:
d2_file=f"{WORKDIR}/{{file}}_d2_raw_louvain.gexf"
shell:
f"python3 --version;"
f"python3 deconvolution/to_d2_graph.py {{input.barcode_graph}} --louvain -o {WORKDIR}/{{wildcards.file}}_d2_raw_louvain"
rule d2_generation_comtest:
input:
barcode_graph=f"{WORKDIR}/{{file}}.gexf"
output:
d2_file=f"{WORKDIR}/{{file}}_d2_raw_comtest.gexf"
shell:
f"python3 --version;"
f"python3 deconvolution/to_d2_graph.py {{input.barcode_graph}} --comtest -o {WORKDIR}/{{wildcards.file}}_d2_raw_comtest"
f"python3 deconvolution/to_d2_graph.py {{input.barcode_graph}} --{{wildcards.method}} -o {WORKDIR}/{{wildcards.file}}_d2_raw_{{wildcards.method}}"
rule setup_workdir:
......
......@@ -12,6 +12,7 @@ def parse_arguments():
parser.add_argument('barcode_graph', help='The barcode graph file. Must be a gefx formated file.')
parser.add_argument('--output_prefix', '-o', default="d2_graph", help="Output file prefix.")
parser.add_argument('--debug', '-d', action='store_true', help="Debug")
parser.add_argument('--maxclq', '-c', action='store_true', help="Enable max clique community detection (default behaviour)")
parser.add_argument('--louvain', '-l', action='store_true', help="Enable Louvain community detection instead of all max-cliques")
parser.add_argument('--comtest', '-k', action='store_true', help="Enable [placeholder] community detection algorithm instead of max-cliques")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment