Skip to content

Commit

Permalink
change internal mhcclass to mhc_class for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasscheid committed Dec 5, 2023
1 parent 3f3bcf9 commit 1ffdacb
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 13 deletions.
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
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
10 changes: 5 additions & 5 deletions modules/local/epytope_peptide_prediction.nf
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ process EPYTOPE_PEPTIDE_PREDICTION {
def class1_tools = tools_split.findAll { ! it.matches('.*(?i)(class-2|ii).*') }
def class2_tools = tools_split.findAll { it.matches('.*(?i)(syf|class-2|ii).*') }

if (((meta.mhcclass == "I") & class1_tools.empty) | ((meta.mhcclass == "II") & class2_tools.empty)) {
exit 1, "No tools specified for mhc class ${meta.mhcclass}"
if (((meta.mhc_class == "I") & class1_tools.empty) | ((meta.mhc_class == "II") & class2_tools.empty)) {
exit 1, "No tools specified for mhc class ${meta.mhc_class}"
}

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

def tools_to_use = ((meta.mhcclass == "I") | (meta.mhcclass == "H-2")) ? class1_tools.join(',') : class2_tools.join(',')
def tools_to_use = ((meta.mhc_class == "I") | (meta.mhc_class == "H-2")) ? class1_tools.join(',') : class2_tools.join(',')

"""
# create folder for MHCflurry downloads to avoid permission problems when running pipeline with docker profile and mhcflurry selected
Expand Down
1 change: 0 additions & 1 deletion nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
"genome_reference": {
"type": "string",
"default": "grch37",
"enum": ["grch37", "grch38"],
"help_text": "This defines against which human Ensembl genome reference the pipeline performs the analysis including the incorporation of genetic variants e.g.. If `grch37` or `grch38` are specified the most recent Ensembl Biomart version for genome versions will be used. Alternatively, an Ensembl Biomart (archive) version can be specified, e.g. http://jan2020.archive.ensembl.org/.",
"description": "Specifies the Ensembl genome reference version that will be used."
},
Expand Down
4 changes: 2 additions & 2 deletions workflows/epitopeprediction.nf
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,9 @@ workflow EPITOPEPREDICTION {
.variant
.branch {
meta_data, input_file ->
vcf : input_file.extension == 'vcf' || input_file.extension == 'vcf.gz'
vcf : input_file.endsWith('.vcf') || input_file.endsWith('.vcf.gz')
return [ meta_data, input_file ]
tab : input_file.extension == 'tsv' || input_file.extension == 'GSvar'
tab : input_file.endsWith('.tsv') || input_file.endsWith('.GSvar')
return [ meta_data, input_file ]
}
.set { ch_variants }
Expand Down

0 comments on commit 1ffdacb

Please sign in to comment.