From aa739d1bf69b2a6f8cb1e532a8f495fdde5a6809 Mon Sep 17 00:00:00 2001 From: LiaOb21 Date: Tue, 27 Feb 2024 21:42:45 +0000 Subject: [PATCH] modifying the rule to use /script/gfa_to_fasta --- workflow/rules/hifiasm.smk | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/workflow/rules/hifiasm.smk b/workflow/rules/hifiasm.smk index c5dce15..e6e823d 100644 --- a/workflow/rules/hifiasm.smk +++ b/workflow/rules/hifiasm.smk @@ -1,8 +1,6 @@ # This rule uses hifiasm to assemble the genome from the hifi reads # Following the instructions for obtaining primary/alternate assemblies: https://hifiasm.readthedocs.io/en/latest/pa-assembly.html#produce-primary-alternate-assemblies -GFA_TO_FASTA = r"""/^S/{print ">"$2;print $3}""" - rule run_hifiasm: input: "results/reads/hifi/hifi.fastq.gz", @@ -23,6 +21,6 @@ rule run_hifiasm: shell: """ hifiasm {input} -t {threads} -o results/hifiasm/hifiasm.asm --primary {params.optional_params} >> {log} 2>&1 - awk {GFA_TO_FASTA:q} {output.gfa} > {output.fasta} - awk {GFA_TO_FASTA:q} {output.gfa_alt} > {output.fasta_alt} + awk -f scripts/gfa_to_fasta.awk < {output.gfa} > {output.fasta} + awk -f scripts/gfa_to_fasta.awk < {output.gfa_alt} > {output.fasta_alt} """