Skip to content

Commit

Permalink
Merge pull request nf-core#459 from genomic-medicine-sweden/nextflow_val
Browse files Browse the repository at this point in the history
feat added specific values for some samplesheet params
  • Loading branch information
Lucpen authored Dec 22, 2023
2 parents e3160e5 + 5a2c55c commit 42f9d64
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
6 changes: 4 additions & 2 deletions assets/schema_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,17 @@
]
},
"sex": {
"type": "string",
"type": "integer",
"meta": ["sex"],
"pattern": "^\\S+$",
"enum": [0, 1, 2],
"errorMessage": "Sex must be provided and cannot contain spaces"
},
"phenotype": {
"type": "string",
"type": "integer",
"meta": ["phenotype"],
"pattern": "^\\S+$",
"enum": [0, 1, 2],
"errorMessage": "Phenotype must be provided and cannot contain spaces"
},
"paternal_id": {
Expand Down
2 changes: 1 addition & 1 deletion conf/modules/call_repeat_expansions.config
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ process {
}

withName: '.*CALL_REPEAT_EXPANSIONS:EXPANSIONHUNTER' {
ext.args = { ("${meta.sex}" == '1') ? '--sex male' : '--sex female' }
ext.args = { ("${meta.sex}" == 1) ? '--sex male' : '--sex female' }
ext.prefix = { "${meta.id}_exphunter" }
}

Expand Down
2 changes: 1 addition & 1 deletion conf/modules/generate_cytosure_files.config
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ process {

withName: '.*GENERATE_CYTOSURE_FILES:VCF2CYTOSURE' {
ext.args = { [
meta.sex.equals('1') ? '--sex male' : '--sex female',
meta.sex.equals(1) ? '--sex male' : '--sex female',
'--size 5000',
'--maxbnd 5000'
].join(' ') }
Expand Down
8 changes: 4 additions & 4 deletions workflows/raredisease.nf
Original file line number Diff line number Diff line change
Expand Up @@ -686,16 +686,16 @@ def create_case_channel(List rows) {
def mother = ""

for (item in rows) {
if (item.phenotype == "2") {
if (item.phenotype == 2) {
probands.add(item.sample)
}
if ( (item.paternal!="0") && (item.paternal!="") && (item.maternal!="0") && (item.maternal!="") ) {
if ( (item.paternal!=0) && (item.paternal!="") && (item.maternal!=0) && (item.maternal!="") ) {
upd_children.add(item.sample)
}
if ( (item.paternal!="0") && (item.paternal!="") ) {
if ( (item.paternal!=0) && (item.paternal!="") ) {
father = item.paternal
}
if ( (item.maternal!="0") && (item.maternal!="") ) {
if ( (item.maternal!=0) && (item.maternal!="") ) {
mother = item.maternal
}
}
Expand Down

0 comments on commit 42f9d64

Please sign in to comment.