Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Friederike Hanssen <[email protected]>
  • Loading branch information
mirpedrol and FriederikeHanssen authored Jul 13, 2023
1 parent c18ea12 commit 6e3bb60
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion assets/schema_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
},
"status": {
"type": "integer",
"errorMessage": "Status can only be 0 or 1. Defaults to 0, if none is supplied.",
"errorMessage": "Status can only be 0 (normal) or 1 (tumor). Defaults to 0, if none is supplied.",
"meta": ["status"],
"default": 0,
"minimum": 0,
Expand Down
3 changes: 1 addition & 2 deletions workflows/sarek.nf
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,10 @@ ch_from_samplesheet
def flowcell = flowcellLaneFromFastq(fastq_1)
// Don't use a random element for ID, it breaks resuming
def read_group = "\"@RG\\tID:${flowcell}.${meta.sample}.${meta.lane}\\t${CN}PU:${meta.lane}\\tSM:${meta.patient}_${meta.sample}\\tLB:${meta.sample}\\tDS:${params.fasta}\\tPL:${params.seq_platform}\""
println "Number of lanes: $num_lanes"

meta = meta + [num_lanes: num_lanes.toInteger(), read_group: read_group.toString(), data_type: 'fastq', size: 1]

if (params.step == 'mapping') return [ meta - meta.subMap('lane'), [ fastq_1, fastq_2 ] ]
if (params.step == 'mapping') return [ meta, [ fastq_1, fastq_2 ] ]
else {
error("Samplesheet contains fastq files but step is `$params.step`. Please check your samplesheet or adjust the step parameter.\nhttps://nf-co.re/sarek/usage#input-samplesheet-configurations")
}
Expand Down

0 comments on commit 6e3bb60

Please sign in to comment.