diff --git a/.github/workflows/awstest.yml b/.github/workflows/awstest.yml index 1fcd51e..2b62749 100644 --- a/.github/workflows/awstest.yml +++ b/.github/workflows/awstest.yml @@ -34,4 +34,4 @@ jobs: --job-name nf-core-epitopeprediction \ --job-queue $AWS_JOB_QUEUE \ --job-definition $AWS_JOB_DEFINITION \ - --container-overrides '{"command": ["nf-core/epitopeprediction", "-r '"${GITHUB_SHA}"' -profile test --outdir s3://'"${AWS_S3_BUCKET}"'/epitopeprediction/results-'"${GITHUB_SHA}"' -w s3://'"${AWS_S3_BUCKET}"'/epitopeprediction/work-'"${GITHUB_SHA}"' -with-tower"], "environment": [{"name": "TOWER_ACCESS_TOKEN", "value": "'"$TOWER_ACCESS_TOKEN"'"}]}'epitopeprediction/work-'"${GITHUB_SHA}"' -with-tower"], "environment": [{"name": "TOWER_ACCESS_TOKEN", "value": "'"$TOWER_ACCESS_TOKEN"'"}]}' + --container-overrides '{"command": ["nf-core/epitopeprediction", "-r '"${GITHUB_SHA}"' -profile test --outdir s3://'"${AWS_S3_BUCKET}"'/epitopeprediction/results-'"${GITHUB_SHA}"' -w s3://'"${AWS_S3_BUCKET}"'/epitopeprediction/work-'"${GITHUB_SHA}"' -with-tower"], "environment": [{"name": "TOWER_ACCESS_TOKEN", "value": "'"$TOWER_ACCESS_TOKEN"'"}]}' \ No newline at end of file diff --git a/README.md b/README.md index f64eb77..24e967b 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![GitHub Actions CI Status](https://github.com/nf-core/epitopeprediction/workflows/nf-core%20CI/badge.svg)](https://github.com/nf-core/epitopeprediction/actions) [![GitHub Actions Linting Status](https://github.com/nf-core/epitopeprediction/workflows/nf-core%20linting/badge.svg)](https://github.com/nf-core/epitopeprediction/actions) [![Nextflow](https://img.shields.io/badge/nextflow-%E2%89%A519.10.0-brightgreen.svg)](https://www.nextflow.io/) -[![DOI](TODO)](todo) +[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3564666.svg)]((https://doi.org/10.5281/zenodo.3564666)) [![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg)](https://bioconda.github.io/) [![Docker](https://img.shields.io/docker/automated/nfcore/epitopeprediction.svg)](https://hub.docker.com/r/nfcore/epitopeprediction) @@ -53,7 +53,7 @@ For further information or help, don't hesitate to get in touch on the [Slack `# ## Citation - +If you use nf-core/epitopeprediction for your analysis, please cite it using the following doi: [10.5281/zenodo.3564666](https://doi.org/10.5281/zenodo.3564666) You can cite the `nf-core` publication as follows: diff --git a/bin/epaa.py b/bin/epaa.py index 08b0493..3cdd4a5 100755 --- a/bin/epaa.py +++ b/bin/epaa.py @@ -717,7 +717,7 @@ def create_score_values(j, method): def create_affinity_values(allele, length, j, method, max_scores, allele_strings): if not pd.isnull(j): if 'syf' in method: - return max(0, round(((100.0 / float(max_scores[allele_strings[('%s_%s' % (str(allele), length))]]) * float(j)) / 100.0) * 100, 2)) + return max(0, round((100.0 / float(max_scores[allele_strings[('%s_%s' % (str(allele), length))]]) * float(j)), 2)) elif any(m in method for m in ['mhcnuggets','mhcflurry']): # mhcnuggets and mhcflurry return already IC50 affinity values return round(j, 2) diff --git a/conf/test.config b/conf/test.config index 302e62b..5d98dc9 100644 --- a/conf/test.config +++ b/conf/test.config @@ -4,7 +4,7 @@ * ------------------------------------------------- * Defines bundled input files and everything required * to run a fast and simple test. Use as follows: - * nextflow run nf-core/epitopeprediction -profile test_vcf + * nextflow run nf-core/epitopeprediction -profile test, */ params { diff --git a/conf/test_full.config b/conf/test_full.config index 00157c4..9bac605 100644 --- a/conf/test_full.config +++ b/conf/test_full.config @@ -12,8 +12,6 @@ params { config_profile_description = 'Full test dataset to check pipeline function' // Input data for full size test - // TODO nf-core: Specify the paths to your full test data ( on nf-core/test-datasets or directly in repositories, e.g. SRA) - // Input data input = 'https://raw.githubusercontent.com/nf-core/test-datasets/epitopeprediction/testdata/variants/variants.vcf' alleles = 'https://raw.githubusercontent.com/nf-core/test-datasets/epitopeprediction/testdata/alleles/alleles.txt' } diff --git a/conf/test_mhcflurry.config b/conf/test_mhcflurry.config index 71aa05a..8bab838 100644 --- a/conf/test_mhcflurry.config +++ b/conf/test_mhcflurry.config @@ -4,7 +4,7 @@ * ------------------------------------------------- * Defines bundled input files and everything required * to run a fast and simple test. Use as follows: - * nextflow run nf-core/epitopeprediction -profile test + * nextflow run nf-core/epitopeprediction -profile test_mhcflurry, */ params { diff --git a/conf/test_mhcnuggets.config b/conf/test_mhcnuggets.config index 081d402..a74f375 100644 --- a/conf/test_mhcnuggets.config +++ b/conf/test_mhcnuggets.config @@ -4,7 +4,7 @@ * ------------------------------------------------- * Defines bundled input files and everything required * to run a fast and simple test. Use as follows: - * nextflow run nf-core/epitopeprediction -profile test + * nextflow run nf-core/epitopeprediction -profile test_mhcnuggets, */ params { diff --git a/conf/test_peptides.config b/conf/test_peptides.config index 98d76d2..88a9298 100644 --- a/conf/test_peptides.config +++ b/conf/test_peptides.config @@ -4,7 +4,7 @@ * ------------------------------------------------- * Defines bundled input files and everything required * to run a fast and simple test. Use as follows: - * nextflow run nf-core/epitopeprediction -profile test_peptides + * nextflow run nf-core/epitopeprediction -profile test_peptides, */ params { diff --git a/conf/test_peptides_h2.config b/conf/test_peptides_h2.config index 461632c..c7b36a8 100644 --- a/conf/test_peptides_h2.config +++ b/conf/test_peptides_h2.config @@ -4,7 +4,7 @@ * ------------------------------------------------- * Defines bundled input files and everything required * to run a fast and simple test. Use as follows: - * nextflow run nf-core/epitopeprediction -profile test_peptides_h2 + * nextflow run nf-core/epitopeprediction -profile test_peptides_h2, */ params { diff --git a/conf/test_proteins.config b/conf/test_proteins.config index 566269e..c2bbb37 100644 --- a/conf/test_proteins.config +++ b/conf/test_proteins.config @@ -4,7 +4,7 @@ * ------------------------------------------------- * Defines bundled input files and everything required * to run a fast and simple test. Use as follows: - * nextflow run nf-core/epitopeprediction -profile test_proteins + * nextflow run nf-core/epitopeprediction -profile test_proteins, */ params { diff --git a/conf/test_variant_tsv.config b/conf/test_variant_tsv.config index 4194d2c..eda3fc5 100644 --- a/conf/test_variant_tsv.config +++ b/conf/test_variant_tsv.config @@ -4,7 +4,7 @@ * ------------------------------------------------- * Defines bundled input files and everything required * to run a fast and simple test. Use as follows: - * nextflow run nf-core/epitopeprediction -profile test_variant_tsv + * nextflow run nf-core/epitopeprediction -profile test_variant_tsv, */ params { diff --git a/docs/output.md b/docs/output.md index fb78606..9a87d10 100644 --- a/docs/output.md +++ b/docs/output.md @@ -35,16 +35,16 @@ HVYLFLSNL 9 17 3336962 ENSG00000127780 ENST00000248384 ENSP00000248384 SNP syfpe The prediction results are given as allele-specific score and affinity values per peptide. The computation of these values depends on the applied prediction method: -* `Syfpeithi`: - * **Affinity**: Calculated as the half-max score of the corresponding matrix: `score(peptide) divided by the maximum score of the allele/length-specific matrix * 100`. - * **Score**: Sum of the values given by the allele-specific position-specific scoring matrix (PSSM) for the respective peptide sequence -Peptides are considered binders if the affinity (half-max score) is higher than 50. -* `MHCflurry`: +* [`Syfpeithi`](http://www.syfpeithi.de) : + * **Affinity**: Calculated based on the score as the percentage of the maximum value of the corresponding matrix: `score(peptide) divided by the maximum score of the allele/length-specific matrix * 100`. + * **Score**: Sum of the values given by the allele-specific position-specific scoring matrix (PSSM) for the respective peptide sequence. +Peptides are considered binders if the affinity is higher than 50. +* [`MHCflurry`](https://github.com/openvax/mhcflurry): * **Affinity**: Predicted IC50 (threshold for binders: `<500 nmol/L`). - * **Score**: The provided score is calculated from the affinity and scaled to an interval of 0 to 1: `1-log50000(aff)`. Thus, it is the log-transformed predicted binding affinity. -* `MHCnuggets`: + * **Score**: The provided score is calculated from the log-transformed predicted binding affinity and scaled to an interval of 0 to 1: `1-log50000(aff)`. +* [`MHCnuggets`](https://github.com/KarchinLab/mhcnuggets): * **Affinity**: Predicted IC50 (threshold for binders: `<500 nmol/L`). - * **Score**: The provided score is calculated from the affinity and scaled to an interval of 0 to 1: `1-log50000(aff)`. Thus, it is the log-transformed predicted binding affinity. + * **Score**: The provided score is calculated from the log-transformed predicted binding affinity and scaled to an interval of 0 to 1: `1-log50000(aff)`. When the parameter `--fasta_output` is specified a `FASTA` file will be generated that contains the sequences of proteins that are affected by the provided genomic variants. The resulting `FASTA` file will contain the wild-type and mutated protein sequences. @@ -55,7 +55,7 @@ When the parameter `--fasta_output` is specified a `FASTA` file will be generate ### Supported models -When running the pipeline using the `--show_supported_models` parameter, the information about supported models for the available predictor tool versions will be written to the results folder as well. +When running the pipeline using the `--show_supported_models` parameter, the information about supported models for the available predictor tool versions will be written to the results folder. **Output directory: `supported_models/`** diff --git a/main.nf b/main.nf index 0015a27..99a0efa 100644 --- a/main.nf +++ b/main.nf @@ -20,17 +20,17 @@ def helpMessage() { nextflow run nf-core/epitopeprediction --input '*.vcf' -profile docker Mandatory arguments: - --input [file] Path to input data (must be surrounded with quotes) - --alleles [file] Path to the file containing the MHC alleles + --input [file] Path to input data (must be surrounded with quotes). Variants in VCF or TSV format. + --alleles [file] Path to the file containing the MHC alleles. -profile [str] Configuration profile to use. Can use multiple (comma separated) Available: conda, docker, singularity, test, awsbatch, and more Alternative inputs: - --peptides [file] Path to TSV file containing peptide sequences (minimum required: id and sequence column) - --proteins [file] Path to FASTA file containing protein sequences + --peptides [file] Path to TSV file containing peptide sequences (minimum required: id and sequence column). + --proteins [file] Path to FASTA file containing protein sequences. Main options: - --show_supported_models [bool] Writes out supported models. Does not run actual prediction pipeline. Default: false. + --show_supported_models [bool] Writes out supported models. Does not run actual prediction pipeline. Default: false. --filter_self [bool] Specifies that peptides should be filtered against the specified human proteome references. Default: false --wild_type [bool] Specifies that wild-type sequences of mutated peptides should be predicted as well. Default: false --fasta_output [bool] Specifies that sequences of proteins, affected by provided variants, will be written to a FASTA file. Default: false @@ -80,6 +80,7 @@ ch_check_alleles = Channel.empty() // Store input base name for later def input_base_name = '' +// Validating parameters if ( !params.show_supported_models ){ if ( params.peptides ) { if ( params.fasta_output ) { diff --git a/nextflow.config b/nextflow.config index 8190c7f..8ce39b0 100644 --- a/nextflow.config +++ b/nextflow.config @@ -92,6 +92,7 @@ profiles { test_proteins { includeConfig 'conf/test_proteins.config' } test_mhcnuggets { includeConfig 'conf/test_mhcnuggets.config' } test_mhcflurry { includeConfig 'conf/test_mhcflurry.config' } + test_full { includeConfig 'conf/test_full.config' } } // Load igenomes.config if required