Commit 4c83bd0b authored by MARIJON Pierre's avatar MARIJON Pierre

Search path only graph contains reads not map in middle of contigs

parent 3e5b4e82
......@@ -3,7 +3,7 @@ self_lookup = " --self-lookup" if config["self_lookup"] == True else ""
rule build_AGG:
input:
search = "{prefix}_knot/ext_search.csv",
ovl_graph = "{prefix}_knot/raw_reads_splited.gfa",
ovl_graph = "{prefix}_knot/raw_reads_splited_filtred.gfa",
read2asm = "{prefix}_knot/read2asm.paf",
asm_graph = "{prefix}_knot/contigs_graph.gfa",
tig2tig = "{prefix}_knot/contigs_filtred.gfa",
......@@ -16,20 +16,20 @@ rule build_AGG:
rule filter_contigs:
input:
"{prefix}.fasta"
"{prefix}contigs.fasta"
output:
"{prefix}_filtred.fasta"
"{prefix}contigs_filtred.fasta"
shell:
"knot.filter_tig {input} {output} -t " + str(config['min_contig_length'])
rule map_contigs2contigs:
input:
"{prefix}_filtred.fasta"
"{prefix}contigs_filtred.fasta"
output:
"{prefix}_filtred.paf"
"{prefix}contigs_filtred.paf"
threads:
8
......@@ -42,6 +42,7 @@ rule map_contigs2contigs:
">", "{output}"
])
rule map_read2contigs:
input:
asm = "{prefix}contigs_filtred.fasta",
......@@ -61,10 +62,23 @@ rule map_read2contigs:
">", "{output}"
])
rule filter_reads:
input:
mapping = "{prefix}read2asm.paf",
read = "{prefix}raw_reads_splited.fasta"
output:
"{prefix}raw_reads_splited_filtred.fasta"
shell:
"knot.sg_generation {input.mapping} {input.read} {output}"
rule find_extremity:
input:
read2asm = "{prefix}read2asm.paf",
read2read = "{prefix}raw_reads_splited.gfa"
read2read = "{prefix}raw_reads_splited_filtred.gfa"
output:
"{prefix}ext_search.csv"
......
......@@ -16,6 +16,7 @@ rule self_mapping:
">", "{output}"
])
rule spliting_reads:
input:
mapping = "{path}.paf",
......@@ -28,6 +29,7 @@ rule spliting_reads:
shell:
"yacrd chimeric -i {input.mapping} -s {input.reads} -o {output.yacrd}"
rule overlap2overlapgraph:
input:
"{path}.paf"
......
......@@ -48,8 +48,6 @@ def main(args = None):
args, unknow_arg = parser.parse_known_args(args)
args = vars(args)
print(args)
# Check parameter
## raw_reads or correct
if args["help_all"]:
......
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