Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for the non-free netMHC tool family #73

Merged
merged 7 commits into from Jan 29, 2021
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -89,3 +89,53 @@ jobs:
- name: Run pipeline with profile ${{ matrix.tests }}
run: |
nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.tests }},docker

nonfree:
name: Run non-free tests
christopher-mohr marked this conversation as resolved.
Show resolved Hide resolved
if: ${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/epitopeprediction') }}
runs-on: ubuntu-latest
env:
NXF_VER: '20.04.0'
NXF_ANSI_LOG: false
steps:
- name: Check out pipeline code
uses: actions/checkout@v2

- name: Install non-free software
env:
DECRYPT_PASSPHRASE: ${{ secrets.TEST_NETMHC }}
run: |
mkdir -v non-free
curl -L https://raw.githubusercontent.com/nf-core/test-datasets/epitopeprediction/software/non-free-software.tar.gpg | ${GITHUB_WORKSPACE}/bin/decrypt | tar -C non-free -v -x

- name: Check if Dockerfile or Conda environment changed
uses: technote-space/get-diff-action@v4
with:
FILES: |
Dockerfile
environment.yml
- name: Build new docker image
if: env.MATCHED_FILES
run: docker build --no-cache . -t nfcore/epitopeprediction:dev

- name: Pull docker image
if: ${{ !env.MATCHED_FILES }}
run: |
docker pull nfcore/epitopeprediction:dev
docker tag nfcore/epitopeprediction:dev nfcore/epitopeprediction:dev
- name: Install Nextflow
run: |
wget -qO- get.nextflow.io | bash
sudo mv nextflow /usr/local/bin/
- name: Run pipeline with NetMHC
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test_netmhc,docker
- name: Run pipeline with NetMHCII
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test_netmhcii,docker
- name: Run pipeline with NetMHCpan
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test_netmhcpan,docker
- name: Run pipeline with NetMHCIIpan
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test_netmhciipan,docker
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -5,6 +5,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## v1.2.0dev

### `Added`

- [#73](https://github.com/nf-core/epitopeprediction/pull/73) - Add support for the non-free netmhc tool family
lkuchenb marked this conversation as resolved.
Show resolved Hide resolved
christopher-mohr marked this conversation as resolved.
Show resolved Hide resolved

## v1.1.0 - Morgenstelle - 2020-10-20

### `Added`
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -45,7 +45,7 @@ The nf-core/epitopeprediction pipeline comes with documentation about the pipeli

## Credits

nf-core/epitopeprediction was originally written by [Christopher Mohr](https://github.com/christopher-mohr) from [Institute for Translational Bioinformatics](https://kohlbacherlab.org/team_tbi/) and [Quantitative Biology Center](https://uni-tuebingen.de/forschung/forschungsinfrastruktur/zentrum-fuer-quantitative-biologie-qbic/) and [Alexander Peltzer](https://github.com/apeltzer) from [Böhringer Ingelheim](https://www.boehringer-ingelheim.de). Further contributions were made by [Sabrina Krakau](https://github.com/skrakau) from [Quantitative Biology Center](https://uni-tuebingen.de/forschung/forschungsinfrastruktur/zentrum-fuer-quantitative-biologie-qbic/).
nf-core/epitopeprediction was originally written by [Christopher Mohr](https://github.com/christopher-mohr) from [Institute for Translational Bioinformatics](https://kohlbacherlab.org/team_tbi/) and [Quantitative Biology Center](https://uni-tuebingen.de/forschung/forschungsinfrastruktur/zentrum-fuer-quantitative-biologie-qbic/) and [Alexander Peltzer](https://github.com/apeltzer) from [Böhringer Ingelheim](https://www.boehringer-ingelheim.de). Further contributions were made by [Sabrina Krakau](https://github.com/skrakau) from [Quantitative Biology Center](https://uni-tuebingen.de/forschung/forschungsinfrastruktur/zentrum-fuer-quantitative-biologie-qbic/) and [Leon Kuchenbecker](https://github.com/lkuchenb) from the [Kohlbacher Lab](https://kohlbacherlab.org/).

## Contributions and Support

Expand Down
10 changes: 10 additions & 0 deletions bin/decrypt
@@ -0,0 +1,10 @@
#!/bin/sh
# Decrypts stdin -> stdout reading the passphrase from the environment variable
# DECRYPT_PASSPHRASE.
gpg \
--quiet \
--batch \
--yes \
--decrypt \
--passphrase="$DECRYPT_PASSPHRASE" \
--output -
6 changes: 3 additions & 3 deletions bin/epaa.py
Expand Up @@ -1011,7 +1011,7 @@ def __main__():
# NOTE this needs to be updated, if a newer version will be available via Fred2 and should be used in the future
tool_version.append(('syfpeithi', '1.0'))
# get for each selected method the corresponding tool version
methods = { method:version for tool, version in tool_version for method in selected_methods if tool.lower() in method.lower() }
methods = { method.lower() : version for tool, version in tool_version for method in selected_methods if tool.lower() in method.lower() }

for method, version in methods.items():
if version not in EpitopePredictorFactory.available_methods()[method]:
Expand All @@ -1038,7 +1038,7 @@ def __main__():

# replace method names with method names with version
# complete_df.replace({'method': methods}, inplace=True)
complete_df['method'] = complete_df['method'].apply(lambda x : x + '-' + methods[x] )
complete_df['method'] = complete_df['method'].apply(lambda x : x.lower() + '-' + methods[x.lower()] )

# include wild type sequences to dataframe if specified
if args.wild_type:
Expand Down Expand Up @@ -1149,4 +1149,4 @@ def __main__():
logger.info("Finished predictions at " + str(datetime.now().strftime("%Y-%m-%d %H:%M:%S")))

if __name__ == "__main__":
__main__()
__main__()
8 changes: 8 additions & 0 deletions bin/scrape_software_versions.py
Expand Up @@ -12,6 +12,10 @@
'Fred2': ['v_fred2.txt', r"fred2 (\S+)"],
'MHCFlurry': ['v_mhcflurry.txt', r"mhcflurry (\S+)"],
'MHCnuggets': ['v_mhcnuggets.txt', r"mhcnuggets (\S+)"],
'NetMHC': ['v_netmhc.txt', r"netmhc (\S+)"],
'NetMHCpan': ['v_netmhcpan.txt', r"netmhcpan (\S+)"],
'NetMHCII': ['v_netmhcii.txt', r"netmhcii (\S+)"],
'NetMHCIIpan': ['v_netmhciipan.txt', r"netmhciipan (\S+)"],
}

results = OrderedDict()
Expand All @@ -23,6 +27,10 @@
results['Fred2'] = '<span style="color:#999999;\">N/A</span>'
results['MHCFlurry'] = '<span style="color:#999999;\">N/A</span>'
results['MHCnuggets'] = '<span style="color:#999999;\">N/A</span>'
results['NetMHC'] = '<span style="color:#999999;\">N/A</span>'
results['NetMHCpan'] = '<span style="color:#999999;\">N/A</span>'
results['NetMHCII'] = '<span style="color:#999999;\">N/A</span>'
results['NetMHCIIpan'] = '<span style="color:#999999;\">N/A</span>'

# Search each file using its regex
for k, v in regexes.items():
Expand Down
24 changes: 24 additions & 0 deletions conf/test_netmhc.config
@@ -0,0 +1,24 @@
/*
* -------------------------------------------------
* Nextflow config file for running tests
* -------------------------------------------------
* Defines bundled input files and everything required
* to run a fast and simple test. Use as follows:
* nextflow run nf-core/epitopeprediction -profile test_netmhc,<docker/singularity>
*/

params {
config_profile_name = 'NetMHC Test Profile'
config_profile_description = 'Peptide list based test profile for NetMHC'

max_cpus = 2
max_memory = 6.GB
max_time = 48.h

// Input data
peptides = 'https://raw.githubusercontent.com/nf-core/test-datasets/epitopeprediction/testdata/peptides/peptides.tsv'
alleles = 'https://raw.githubusercontent.com/nf-core/test-datasets/epitopeprediction/testdata/alleles/alleles.txt'

tools = 'netmhc'
netmhc_path = './non-free/netmhc.tar.gz'
}
24 changes: 24 additions & 0 deletions conf/test_netmhcii.config
@@ -0,0 +1,24 @@
/*
* -------------------------------------------------
* Nextflow config file for running tests
* -------------------------------------------------
* Defines bundled input files and everything required
* to run a fast and simple test. Use as follows:
* nextflow run nf-core/epitopeprediction -profile test_netmhcii,<docker/singularity>
*/

params {
config_profile_name = 'NetMHCII Test Profile'
config_profile_description = 'Peptide list based test profile for NetMHCII'

max_cpus = 2
max_memory = 6.GB
max_time = 48.h

// Input data
peptides = 'https://raw.githubusercontent.com/nf-core/test-datasets/epitopeprediction/testdata/peptides/peptides_MHC_II.txt'
alleles = 'https://raw.githubusercontent.com/nf-core/test-datasets/epitopeprediction/testdata/alleles/alleles.DRB1_01_01.txt'

tools = 'netmhcii'
netmhcii_path = './non-free/netmhcii.tar.Z'
christopher-mohr marked this conversation as resolved.
Show resolved Hide resolved
}
24 changes: 24 additions & 0 deletions conf/test_netmhciipan.config
@@ -0,0 +1,24 @@
/*
* -------------------------------------------------
* Nextflow config file for running tests
* -------------------------------------------------
* Defines bundled input files and everything required
* to run a fast and simple test. Use as follows:
* nextflow run nf-core/epitopeprediction -profile test_netmhciipan,<docker/singularity>
*/

params {
config_profile_name = 'NetMHCIIpan Test Profile'
config_profile_description = 'Peptide list based test profile for NetMHCIIpan'

max_cpus = 2
max_memory = 6.GB
max_time = 48.h

// Input data
peptides = 'https://raw.githubusercontent.com/nf-core/test-datasets/epitopeprediction/testdata/peptides/peptides_MHC_II.txt'
alleles = 'https://raw.githubusercontent.com/nf-core/test-datasets/epitopeprediction/testdata/alleles/alleles.DRB1_01_01.txt'

tools = 'netmhciipan'
netmhciipan_path = './non-free/netmhciipan.tar.gz'
}
24 changes: 24 additions & 0 deletions conf/test_netmhcpan.config
@@ -0,0 +1,24 @@
/*
* -------------------------------------------------
* Nextflow config file for running tests
* -------------------------------------------------
* Defines bundled input files and everything required
* to run a fast and simple test. Use as follows:
* nextflow run nf-core/epitopeprediction -profile test_netmhcpan,<docker/singularity>
*/

params {
config_profile_name = 'NetMHCpan Test Profile'
config_profile_description = 'Peptide list based test profile for NetMHCpan'

max_cpus = 2
max_memory = 6.GB
max_time = 48.h

// Input data
peptides = 'https://raw.githubusercontent.com/nf-core/test-datasets/epitopeprediction/testdata/peptides/peptides.tsv'
alleles = 'https://raw.githubusercontent.com/nf-core/test-datasets/epitopeprediction/testdata/alleles/alleles.txt'

tools = 'netmhcpan'
netmhcpan_path = './non-free/netmhcpan.tar.gz'
}