Skip to content

Commit

Permalink
Merge pull request #51 from hydra-genetics/develop
Browse files Browse the repository at this point in the history
chore: dev to master
  • Loading branch information
Smeds authored Apr 8, 2022
2 parents bee599e + 530c359 commit f696e17
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .tests/integration/units.tsv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sample type platform machine flowcell lane barcode fastq1 fastq2 adapter
HD827sonic N NextSeq NDX550220 HKTG2BGXG lane1 ACGGAACA+ACGAGAAC fastq/HD827sonic_testing1_R1.fastq.gz fastq/HD827sonic_testing1_R2.fastq.gz AGATCGGAAGAGCACACGTCTGAACTCCAGTCA,AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGT
HD827sonic N NextSeq NDX550220 HKTG2BGXG lane2 ACGGAACA+ACGAGAAC fastq/HD827sonic_testing2_R1.fastq.gz fastq/HD827sonic_testing2_R2.fastq.gz AGATCGGAAGAGCACACGTCTGAACTCCAGTCA,AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGT
HD827sonic T NextSeq NDX550220 HKTG2BGXG lane3 ACGGAACA+ACGAGAAC fastq/HD827sonic_testing3_R1.fastq.gz fastq/HD827sonic_testing3_R2.fastq.gz AGATCGGAAGAGCACACGTCTGAACTCCAGTCA,AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGT
HD827sonic N NextSeq NDX550220 HKTG2BGXG L001 ACGGAACA+ACGAGAAC fastq/HD827sonic_testing1_R1.fastq.gz fastq/HD827sonic_testing1_R2.fastq.gz AGATCGGAAGAGCACACGTCTGAACTCCAGTCA,AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGT
HD827sonic N NextSeq NDX550220 HKTG2BGXG L001 ACGGAACA+ACGAGAAG fastq/HD827sonic_testing2_R1.fastq.gz fastq/HD827sonic_testing2_R2.fastq.gz AGATCGGAAGAGCACACGTCTGAACTCCAGTCA,AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGT
HD827sonic T NextSeq NDX550220 HKTG2BGXG L002 ACGGAACA+ACGAGAAT fastq/HD827sonic_testing3_R1.fastq.gz fastq/HD827sonic_testing3_R2.fastq.gz AGATCGGAAGAGCACACGTCTGAACTCCAGTCA,AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGT
7 changes: 5 additions & 2 deletions workflow/rules/common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ validate(units, schema="../schemas/units.schema.yaml")


wildcard_constraints:
barcode="[A-Z+]+",
flowcell="[A-Z0-9]+",
lane="L[0-9]+",
sample="|".join(get_samples(samples)),
unit="N|T|R",
read="fastq[1|2]",
Expand All @@ -55,8 +58,8 @@ wildcard_constraints:

if config.get("trimmer_software", None) == "fastp_pe":
merged_input = lambda wildcards: expand(
"prealignment/fastp_pe/{{sample}}_{flowcell_lane}_{{type}}_{{read}}.fastq.gz",
flowcell_lane=[
"prealignment/fastp_pe/{{sample}}_{flowcell_lane_barcode}_{{type}}_{{read}}.fastq.gz",
flowcell_lane_barcode=[
"{}_{}_{}".format(unit.flowcell, unit.lane, unit.barcode) for unit in get_units(units, wildcards, wildcards.type)
],
)
Expand Down
2 changes: 1 addition & 1 deletion workflow/rules/merged.smk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rule merged:
input:
fastq=merged_input,
output:
fastq="prealignment/merged/{sample}_{type}_{read}.fastq.gz",
fastq=temp("prealignment/merged/{sample}_{type}_{read}.fastq.gz"),
log:
"prealignment/merged/{sample}_{type}_{read}.fastq.gz.log",
benchmark:
Expand Down
1 change: 1 addition & 0 deletions workflow/schemas/units.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ properties:
lane:
type: string
description: lane number
pattern: "^L[0-9]+$"
fastq1:
type: string
description: absolute path to R1 fastq file
Expand Down

0 comments on commit f696e17

Please sign in to comment.