Skip to content

Commit

Permalink
new names for reads and assembly
Browse files Browse the repository at this point in the history
  • Loading branch information
SilasK committed Sep 21, 2023
1 parent 4692d2e commit 36d76dd
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/usage/output.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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``

Expand Down
9 changes: 5 additions & 4 deletions workflow/rules/assemble.smk
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
4 changes: 3 additions & 1 deletion workflow/rules/patch.smk
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down
5 changes: 1 addition & 4 deletions workflow/rules/qc.smk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions workflow/rules/sample_table.smk
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand All @@ -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 )

0 comments on commit 36d76dd

Please sign in to comment.