Skip to content

Commit

Permalink
Merge pull request #220 from jonasscheid/fix_lost_vcfgz_support
Browse files Browse the repository at this point in the history
Switch to nf-validation
  • Loading branch information
jonasscheid authored Dec 19, 2023
2 parents ee311d9 + 693bd50 commit ce8c16d
Show file tree
Hide file tree
Showing 13 changed files with 104 additions and 463 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### `Changed`

- [#220](https://github.com/nf-core/epitopeprediction/pull/220) - Switch to nf-validation to parse samplesheet
- [#213](https://github.com/nf-core/epitopeprediction/pull/203) - Rename param `genome_version` to `genome_reference`, add functionality to handle BioMart archive urls
- [#213](https://github.com/nf-core/epitopeprediction/pull/203) - Update to nf-core template `2.10`
- [#203](https://github.com/nf-core/epitopeprediction/pull/203) - Update to nf-core template `2.9`
Expand Down
22 changes: 17 additions & 5 deletions assets/schema_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,32 @@
},
{
"type": "string",
"pattern": "(^[A-Z][*][0-9][0-9][:][0-9][0-9])$"
"pattern": "^([A-E]{1}[*][0-9]{2}[:][0-9]{2})(;[A-E]{1}[*][0-9]{2}[:][0-9]{2})*$"
},
{
"type": "string",
"pattern": "^((DR|DP|DQ)[AB][0-9][*][0-9]{2}[:][0-9]{2})(;(DR|DP|DQ)[AB][0-9][*][0-9]{2}[:][0-9]{2})*$"
},
{
"type": "string",
"pattern": "^((DR|DP|DQ)[AB][0-9][*][0-9]{2}[:][0-9]{2}[-](DR|DP|DQ)[AB][0-9][*][0-9]{2}[:][0-9]{2})(;((DR|DP|DQ)[AB][0-9][*][0-9]{2}[:][0-9]{2}[-](DR|DP|DQ)[AB][0-9][*][0-9]{2}[:][0-9]{2}))*$"
},
{
"type": "string",
"pattern": "^[H][-][2][-][A-Za-z]{2,3}$"
}
],
"errorMessage": "Alleles must be provided as string or file with extension '.txt''"
"errorMessage": "Alleles must be provided as string or file with extension '.txt'. Please check the documentation for more information."
},
"mhc_class": {
"type": "string",
"pattern": "^(I|II|H-2)$",
"errorMessage": "The MHC class must be provided. Valid values: "
"errorMessage": "The MHC class must be provided. Valid values: 'I', 'II' or 'H-2'"
},
"filename": {
"type": "string",
"pattern": "^\\S+\\.(vcf|tsv|fasta|fa|txt)$",
"errorMessage": "Variants/proteins/peptides for sample must be provided and have one of the following extensions: '.vcf', '.tsv', '.fasta', '.fa', '.txt'"
"pattern": "^\\S+\\.(vcf|vcf.gz|tsv|fasta|fa)$",
"errorMessage": "Variants/proteins/peptides for sample must be provided and have one of the following extensions: '.vcf', '.vcf.gz', '.tsv', '.fasta', '.fa'"
}
},
"required": ["sample", "alleles", "mhc_class", "filename"]
Expand Down
2 changes: 1 addition & 1 deletion bin/check_requested_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def __main__():
"Write out information about supported models by epytope for installed predictor tool versions."
)
parser.add_argument("-p", "--peptides", help="File with one peptide per line")
parser.add_argument("-c", "--mhcclass", default=1, help="MHC class I or II")
parser.add_argument("-c", "--mhc_class", default=1, help="MHC class I or II")
parser.add_argument("-l", "--max_length", help="Maximum peptide length", type=int)
parser.add_argument("-ml", "--min_length", help="Minimum peptide length", type=int)
parser.add_argument("-a", "--alleles", help="<Required> MHC Alleles", required=True, type=str)
Expand Down
290 changes: 0 additions & 290 deletions bin/check_samplesheet.py

This file was deleted.

8 changes: 0 additions & 8 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@ process {
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]

withName: SAMPLESHEET_CHECK {
publishDir = [
path: { "${params.outdir}/pipeline_info" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: CUSTOM_DUMPSOFTWAREVERSIONS {
publishDir = [
path: { "${params.outdir}/pipeline_info" },
Expand Down
4 changes: 2 additions & 2 deletions modules/local/epytope_check_requested_models.nf
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ process EPYTOPE_CHECK_REQUESTED_MODELS {
}

def prefix = task.ext.suffix ? "${meta.sample}_${task.ext.suffix}" : "${meta.sample}_peptides"
def min_length = ("${meta.mhcclass}" == "I") ? params.min_peptide_length : params.min_peptide_length_class2
def max_length = ("${meta.mhcclass}" == "I") ? params.max_peptide_length : params.max_peptide_length_class2
def min_length = ("${meta.mhc_class}" == "I") ? params.min_peptide_length : params.min_peptide_length_class2
def max_length = ("${meta.mhc_class}" == "I") ? params.max_peptide_length : params.max_peptide_length_class2

"""
check_requested_models.py ${argument} \
Expand Down
4 changes: 2 additions & 2 deletions modules/local/epytope_generate_peptides.nf
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ process EPYTOPE_GENERATE_PEPTIDES {

script:
def prefix = task.ext.suffix ? "${meta.sample}_${task.ext.suffix}" : "${meta.sample}_peptides"
def min_length = (meta.mhcclass == "I") ? params.min_peptide_length : params.min_peptide_length_class2
def max_length = (meta.mhcclass == "I") ? params.max_peptide_length : params.max_peptide_length_class2
def min_length = (meta.mhc_class == "I") ? params.min_peptide_length : params.min_peptide_length_class2
def max_length = (meta.mhc_class == "I") ? params.max_peptide_length : params.max_peptide_length_class2

"""
gen_peptides.py --input ${raw} \\
Expand Down
Loading

0 comments on commit ce8c16d

Please sign in to comment.