diff --git a/docs/usage/output.rst b/docs/usage/output.rst index 8bcd2f8f..f01cc3f5 100644 --- a/docs/usage/output.rst +++ b/docs/usage/output.rst @@ -58,7 +58,7 @@ Assembly Besides the `reports/assembly_report.html`_ this rule outputs the following files per sample: - - ``{sample}/{sample}_contigs.fasta`` + - ``Assembly/fasta/{sample}.fasta`` - ``{sample}/sequence_alignment/{sample}.bam`` - ``{sample}/assembly/contig_stats/final_contig_stats.txt`` diff --git a/workflow/rules/assemble.smk b/workflow/rules/assemble.smk index ea88f14c..db2bd69f 100644 --- a/workflow/rules/assemble.smk +++ b/workflow/rules/assemble.smk @@ -597,10 +597,11 @@ rule finalize_contigs: input: "{sample}/assembly/{sample}_final_contigs.fasta", output: - "{sample}/{sample}_contigs.fasta", + "Assembly/fasta/{sample}.fasta", threads: 1 - run: - os.symlink(os.path.relpath(input[0], os.path.dirname(output[0])), output[0]) + shell: + "cp {input} {output}" + rule calculate_contigs_stats: @@ -624,7 +625,7 @@ rule calculate_contigs_stats: rule align_reads_to_final_contigs: input: query=get_quality_controlled_reads, - target="{sample_contigs}/{sample_contigs}_contigs.fasta", + target="Assembly/fasta/{sample_contigs}.fasta", output: bam="{sample_contigs}/sequence_alignment/{sample}.bam", params: diff --git a/workflow/rules/patch.smk b/workflow/rules/patch.smk index 3daae3fd..3fe28e6e 100644 --- a/workflow/rules/patch.smk +++ b/workflow/rules/patch.smk @@ -2,11 +2,13 @@ localrules: move_qc_reads, copy_assembly # Rules that are usefull temporarily to update to new version of atlas + +ruleorder: move_qc_reads > qcreads rule move_qc_reads: input: "{sample}/sequence_quality_control/{sample}_clean_{fraction}.fastq.gz" output: - "QCreads/{sample}_{fraction}.fastq.gz" + "QC/reads/{sample}_{fraction}.fastq.gz" shell: "mv {input} {output}" diff --git a/workflow/rules/qc.smk b/workflow/rules/qc.smk index cd792ca3..10cf48ce 100644 --- a/workflow/rules/qc.smk +++ b/workflow/rules/qc.smk @@ -417,12 +417,9 @@ if not SKIP_QC: unpack(get_ribosomal_rna_input), output: expand( - "{{sample}}/sequence_quality_control/{{sample}}_{step}_{fraction}.fastq.gz", - step=PROCESSED_STEPS[-1], + "QC/reads/{{sample}}_{fraction}.fastq.gz", fraction=MULTIFILE_FRACTIONS, ), - params: - sample_table="samples.tsv", threads: 1 run: import shutil diff --git a/workflow/rules/sample_table.smk b/workflow/rules/sample_table.smk index ff0e05a3..cb3eb787 100644 --- a/workflow/rules/sample_table.smk +++ b/workflow/rules/sample_table.smk @@ -175,7 +175,7 @@ def get_quality_controlled_reads(wildcards, include_se=False): except FileNotInSampleTableException: # return files as named by atlas pipeline return expand( - "{sample}/sequence_quality_control/{sample}_QC_{fraction}.fastq.gz", + "QC/reads/{sample}_{fraction}.fastq.gz", fraction=Fractions, sample=wildcards.sample, ) @@ -194,5 +194,5 @@ def get_assembly(wildcards): except FileNotInSampleTableException: # return files as named by atlas pipeline - return "{sample}/{sample}_contigs.fasta".format(sample=wildcards.sample ) + return "Assembly/fasta/{sample}.fasta".format(sample=wildcards.sample )