diff --git a/.cookietemple.yml b/.cookietemple.yml index fda89d01..0aec980f 100644 --- a/.cookietemple.yml +++ b/.cookietemple.yml @@ -15,5 +15,5 @@ full_name: Victor Giurcoiu email: victor.giurcoiu@tum.de project_name: oktoberfest project_short_description: Public repo oktoberfest -version: 0.5.0 +version: 0.5.1 license: MIT diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 26965324..1193350f 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,5 +1,5 @@ -name-template: "0.5.0 🌈" # <> -tag-template: 0.5.0 # <> +name-template: "0.5.1 🌈" # <> +tag-template: 0.5.1 # <> exclude-labels: - "skip-changelog" diff --git a/.github/workflows/build_package.yml b/.github/workflows/build_package.yml index 694d1843..cf0d61f9 100644 --- a/.github/workflows/build_package.yml +++ b/.github/workflows/build_package.yml @@ -12,7 +12,7 @@ jobs: python: [3.8, 3.9] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 name: Check out source-code repository - name: Setup Python diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 7d886014..825aa6f6 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -11,9 +11,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repository - uses: actions/checkout@v2.3.3 + uses: actions/checkout@v4 - name: Run Labeler - uses: crazy-max/ghaction-github-labeler@v4.1.0 + uses: crazy-max/ghaction-github-labeler@v5.0.0 with: skip-delete: true diff --git a/.github/workflows/publish_docs.yml b/.github/workflows/publish_docs.yml index ca2d9cb7..025589b9 100644 --- a/.github/workflows/publish_docs.yml +++ b/.github/workflows/publish_docs.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 name: Check out source-code repository - name: Setup Python diff --git a/.github/workflows/publish_package.yml b/.github/workflows/publish_package.yml index 056939df..25dc9605 100644 --- a/.github/workflows/publish_package.yml +++ b/.github/workflows/publish_package.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repository - uses: actions/checkout@v2.3.4 + uses: actions/checkout@v4 with: fetch-depth: 2 diff --git a/.github/workflows/run_cookietemple_lint.yml b/.github/workflows/run_cookietemple_lint.yml index 0bd493a4..d519f57c 100644 --- a/.github/workflows/run_cookietemple_lint.yml +++ b/.github/workflows/run_cookietemple_lint.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 name: Check out source-code repository - name: Setup Python diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index c0bd9fde..8abe379c 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -1,8 +1,14 @@ name: Run oktoberfest Tests on: - - push - - pull_request + push: + branches: + - development + - main + - "release/*" + pull_request: + branches: + - "*" jobs: tests: @@ -63,7 +69,7 @@ jobs: steps: - name: Check out the repository - uses: actions/checkout@v2.3.4 + uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 @@ -98,7 +104,7 @@ jobs: print("::set-output name=result::{}".format(result)) - name: Restore pre-commit cache - uses: actions/cache@v3.3.1 + uses: actions/cache@v3.3.2 if: matrix.session == 'pre-commit' with: path: ~/.cache/pre-commit @@ -128,7 +134,7 @@ jobs: needs: tests steps: - name: Check out the repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python 3.8 uses: actions/setup-python@v4 diff --git a/.github/workflows/sync_project.yml b/.github/workflows/sync_project.yml index 480e22ba..ec8869da 100644 --- a/.github/workflows/sync_project.yml +++ b/.github/workflows/sync_project.yml @@ -17,7 +17,7 @@ jobs: - name: Install cookietemple run: pip install cookietemple - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 token: "${{ secrets.CT_SYNC_TOKEN }}" diff --git a/cookietemple.cfg b/cookietemple.cfg index b0598d87..f0d07b43 100644 --- a/cookietemple.cfg +++ b/cookietemple.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.5.0 +current_version = 0.5.1 [bumpversion_files_whitelisted] init_file = oktoberfest/__init__.py diff --git a/docs/conf.py b/docs/conf.py index 1993af96..e7c6b9ba 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -54,9 +54,9 @@ # the built documents. # # The short X.Y version. -version = "0.5.0" +version = "0.5.1" # The full version, including alpha/beta/rc tags. -release = "0.5.0" +release = "0.5.1" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/oktoberfest/__init__.py b/oktoberfest/__init__.py index 1b585502..a3bce8a4 100644 --- a/oktoberfest/__init__.py +++ b/oktoberfest/__init__.py @@ -5,7 +5,7 @@ __author__ = """The Oktoberfest development team (Wilhelmlab at Technical University of Munich)""" __copyright__ = f"Copyright {datetime.now():%Y}, Wilhelmlab at Technical University of Munich" __license__ = "MIT" -__version__ = "0.5.0" +__version__ = "0.5.1" import logging.handlers import sys diff --git a/oktoberfest/runner.py b/oktoberfest/runner.py index 465549e7..27624dc2 100644 --- a/oktoberfest/runner.py +++ b/oktoberfest/runner.py @@ -169,7 +169,7 @@ def generate_spectral_lib(config_path: Union[str, Path]): if library_input_type == "fasta": pp.digest( fasta=config.library_input, - output=config.output / "prosit_input.csv", + output=config.output, fragmentation=config.fragmentation, digestion=config.digestion, cleavages=config.cleavages, diff --git a/pyproject.toml b/pyproject.toml index a3fd0897..48b868ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "oktoberfest" -version = "0.5.0" # <> +version = "0.5.1" # <> description = "Public repo oktoberfest" authors = ["Victor Giurcoiu "] license = "MIT" diff --git a/tests/unit_tests/configs/spectral_library_with_digest.json b/tests/unit_tests/configs/spectral_library_with_digest.json new file mode 100644 index 00000000..d4322c6d --- /dev/null +++ b/tests/unit_tests/configs/spectral_library_with_digest.json @@ -0,0 +1,26 @@ +{ + "type": "SpectralLibraryGeneration", + "tag": "", + "inputs": { + "library_input": "../data/test.fasta", + "library_input_type": "fasta" + }, + "output": "../data/", + "models": { + "intensity": "Prosit_2020_intensity_HCD", + "irt": "Prosit_2019_irt" + }, + "outputFormat": "spectronaut", + "prediction_server": "koina.proteomicsdb.org:443", + "ssl": true, + "fastaDigestOptions": { + "fragmentation": "HCD", + "digestion": "full", + "missedCleavages": 2, + "minLength": 7, + "maxLength": 60, + "enzyme": "trypsin", + "specialAas": "KR", + "db": "concat" + } +} diff --git a/tests/unit_tests/data/test.fasta b/tests/unit_tests/data/test.fasta new file mode 100644 index 00000000..423e6d09 --- /dev/null +++ b/tests/unit_tests/data/test.fasta @@ -0,0 +1,54 @@ +>ENSP00000488551.1 pep:known chromosome:GRCh38:CHR_HSCHR7_2_CTG6:142634764:142635309:1 gene:ENSG00000282497.1 transcript:ENST00000631835.1 gene_biotype:TR_V_gene transcript_biotype:TR_V_gene +MGPGLLHWMALCLLGTGHGDAMVIQNPRYQVTQFGKPVTLSCSQTLNHNVMYWYQQKSSQ +APKLLFHYYDKDFNNEADTPDNFQSRRPNTSFCFLDIRSPGLGDAAMYLCATSR +>ENSP00000374917.3 pep:known chromosome:GRCh38:7:142626649:142627399:1 gene:ENSG00000211747.3 transcript:ENST00000390394.3 gene_biotype:TR_V_gene transcript_biotype:TR_V_gene +MLLLLLLLGPGSGLGAVVSQHPSRVICKSGTSVKIECRSLDFQATTMFWYRQFPKQSLML +MATSNEGSKATYEQGVEKDKFLINHASLTLSTLTVTSAHPEDSSFYICSAR +>ENSP00000374919.1 pep:known chromosome:GRCh38:7:142645961:142646467:1 gene:ENSG00000211749.1 transcript:ENST00000390396.1 gene_biotype:TR_V_gene transcript_biotype:TR_V_gene +MGTRLLGCAALCLLAADSFHAKVTQTPGHLVKGKGQKTKMDCTPEKGHTFVYWYQQNQNK +EFMLLISFQNEQVLQETEMHKKRFSSQCPKNAPCSLAILSSEPGDTALYLCASSQ +>ENSP00000452526.1 pep:known chromosome:GRCh38:14:22052514:22053056:1 gene:ENSG00000211801.3 transcript:ENST00000390449.3 gene_biotype:TR_V_gene transcript_biotype:TR_V_gene +METLLGLLILWLQLQWVSSKQEVTQIPAALSVPEGENLVLNCSFTDSAIYNLQWFRQDPG +KGLTSLLLIQSSQREQTSGRLNASLDKSSGRSTLYIAASQPGDSATYLCAVR +>ENSP00000437362.1 pep:known chromosome:GRCh38:14:21887857:21888502:1 gene:ENSG00000211789.2 transcript:ENST00000390437.2 gene_biotype:TR_V_gene transcript_biotype:TR_V_gene +MKSLRVLLVILWLQLSWVWSQQKEVEQNSGPLSVPEGAIASLNCTYSDRGSQSFFWYRQY +SGKSPELIMFIYSNGDKEDGRFTAQLNKASQYVSLLIRDSQPSDSATYLCAVN +>ENSP00000374895.3 pep:known chromosome:GRCh38:7:142482548:142483019:1 gene:ENSG00000211725.3 transcript:ENST00000390372.3 gene_biotype:TR_V_gene transcript_biotype:TR_V_gene +MGPGLLCWVLLCLLGAGPVDAGVTQSPTHLIKTRGQQVTLRCSPISGHKSVSWYQQVLGQ +GPQFIFQYYEKEERGRGNFPDRFSARQFPNYSSELNVNALLLGDSALYLCASSL +>ENSP00000488152.1 pep:known chromosome:GRCh38:CHR_HSCHR7_2_CTG6:142374511:142375050:1 gene:ENSG00000282506.1 transcript:ENST00000631392.1 gene_biotype:TR_V_gene transcript_biotype:TR_V_gene +MGTRLLFWVAFCLLGADHTGAGVSQSPSNKVTEKGKDVELRCDPISGHTALYWYRQSLGQ +GLEFLIYFQGNSAPDKSGLPSDRFSAERTGGSVSTLTIQRTQQEDSAVYLCASSL +>ENSP00000446355.1 pep:known chromosome:GRCh38:14:21749178:21749705:1 gene:ENSG00000211779.3 transcript:ENST00000390427.3 gene_biotype:TR_V_gene transcript_biotype:TR_V_gene +MKTFAGFSFLFLWLQLDCMSRGEDVEQSLFLSVREGDSSVINCTYTDSSSTYLYWYKQEP +GAGLQLLTYIFSNMDMKQDQRLTVLLNKKDKHLSLRIADTQTGDSAIYFCAES +>ENSP00000479506.1 pep:known chromosome:GRCh38:7:142580917:142581427:1 gene:ENSG00000275158.1 transcript:ENST00000621184.1 gene_biotype:TR_V_gene transcript_biotype:TR_V_gene +MATRLLCCVVLCLLGEELIDARVTQTPRHKVTEMGQEVTMRCQPILGHNTVFWYRQTMMQ +GLELLAYFRNRAPLDDSGMPKDRFSAEMPDATLATLKIQPSEPRDSAVYFCASGL +>ENSP00000374920.2 pep:known chromosome:GRCh38:7:142656701:142657213:1 gene:ENSG00000211750.2 transcript:ENST00000390397.2 gene_biotype:TR_V_gene transcript_biotype:TR_V_gene +MASLLFFCGAFYLLGTGSMDADVTQTPRNRITKTGKRIMLECSQTKGHDRMYWYRQDPGL +GLQLIYYSFDVKDINKGEISDGYSVSRQAQAKFSLSLESAIPNQTALYFCATSDL +>ENSP00000374884.3 pep:known chromosome:GRCh38:7:142384329:142384841:1 gene:ENSG00000211714.3 transcript:ENST00000390361.3 gene_biotype:TR_V_gene transcript_biotype:TR_V_gene +MGTRLLCWAALCLLGADHTGAGVSQTPSNKVTEKGKDVELRCDPISGHTALYWYRQSLGQ +GPEFLIYFQGTGAADDSGLPKDRFFAVRPEGSVSTLKIQRTEQGDSAAYLRASSL +>ENSP00000480999.1 pep:known chromosome:GRCh38:7:142563740:142564245:1 gene:ENSG00000276953.1 transcript:ENST00000617347.1 gene_biotype:TR_V_gene transcript_biotype:TR_V_gene +MGSWTLCCVSLCILVAKHTDAGVIQSPRHEVTEMGQEVTLRCKPISGHDYLFWYRQTMMR +GLELLIYFNNNVPIDDSGMPEDRFSAKMPNASFSTLKIQPSEPRDSAVYFCASSL +>ENSP00000479267.1 pep:known chromosome:GRCh38:7:142544212:142544685:1 gene:ENSG00000275791.1 transcript:ENST00000611462.1 gene_biotype:TR_V_gene transcript_biotype:TR_V_gene +MGTRLFFYVALCLLWTGHMDAGITQSPRHKVTETGTPVTLRCHQTENHRYMYWYRQDPGH +GLRLIHYSYGVKDTDKGEVSDGYSVSRSKTEDFLLTLESATSSQTSVYFCAISE +>ENSP00000477916.1 pep:known chromosome:GRCh38:7:142560423:142560931:1 gene:ENSG00000274752.1 transcript:ENST00000620569.1 gene_biotype:TR_V_gene transcript_biotype:TR_V_gene +MDSWTFCCVSLCILVAKHTDAGVIQSPRHEVTEMGQEVTLRCKPISGHNSLFWYRQTMMR +GLELLIYFNNNVPIDDSGMPEDRFSAKMPNASFSTLKIQPSEPRDSAVYFCASSL +>ENSP00000451535.1 pep:known chromosome:GRCh38:14:21736152:21736982:1 gene:ENSG00000211778.2 transcript:ENST00000390426.2 gene_biotype:TR_V_gene transcript_biotype:TR_V_gene +MRQVARVIVFLTLSTLSLAKTTQPISMDSYEGQEVNITCSHNNIATNDYITWYQQFPSQG +PRFIIQGYKTKVTNEVASLFIPADRKSSTLSLPRVSLSDTAVYYCLVGD +>ENSP00000451822.1 pep:known chromosome:GRCh38:14:21965451:21966061:1 gene:ENSG00000211794.3 transcript:ENST00000390442.3 gene_biotype:TR_V_gene transcript_biotype:TR_V_gene +MMKSLRVLLVILWLQLSWVWSQQKEVEQDPGPLSVPEGAIVSLNCTYSNSAFQYFMWYRQ +YSRKGPELLMYTYSSGNKEDGRFTAQVDKSSKYISLFIRDSQPSDSATYLCAMS +>ENSP00000450505.1 pep:known chromosome:GRCh38:14:21978459:21979120:1 gene:ENSG00000211795.3 transcript:ENST00000390443.3 gene_biotype:TR_V_gene transcript_biotype:TR_V_gene +MLLLLVPAFQVIFTLGGTRAQSVTQLDSQVPVFEEAPVELRCNYSSSVSVYLFWYVQYPN +QGLQLLLKYLSGSTLVESINGFEAEFNKSQTSFHLRKPSVHISDTAEYFCAVS +>ENSP00000451359.1 pep:known chromosome:GRCh38:14:21990496:21990938:1 gene:ENSG00000211796.1 transcript:ENST00000390444.1 gene_biotype:TR_V_gene transcript_biotype:TR_V_gene +MKPTLISVLVIIFILRGTRAQRVTQPEKLLSVFKGAPVELKCNYSYSGSPELFWYVQYSR +QRLQLLLRHISRESIKGFTADLNKGETSFHLKKPFAQEEDSAMYYCALS diff --git a/tests/unit_tests/test_runner.py b/tests/unit_tests/test_runner.py new file mode 100644 index 00000000..e8a8035b --- /dev/null +++ b/tests/unit_tests/test_runner.py @@ -0,0 +1,15 @@ +import unittest +from pathlib import Path +from unittest.mock import patch + +from oktoberfest.__main__ import main + + +class TestRunner(unittest.TestCase): + """Test class for use cases of runner.""" + + def test_speclib_digest(self): + """Test the runner for a spectral library generation with a fasta digest.""" + config_path = Path(__file__).parent / "configs" / "spectral_library_with_digest.json" + with patch("sys.argv", ["oktoberfest", f"--config_path={config_path}"]): + main()