diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab25669..19ae40e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -167,9 +167,22 @@ jobs: wget -qO- https://code.askimed.com/install/nf-test | bash -s ${{ env.NFT_VER }} sudo mv nf-test /usr/local/bin/ + - name: Download onsite test data directory + if: matrix.module == 'bigbio/onsite' + run: | + DIR="tests/data/onsite/Phospho_redissolve_final_01_clean_perc.idparquet" + mkdir -p "$DIR" + BASE_URL="https://ftp.pride.ebi.ac.uk/pub/databases/pride/resources/proteomes/quantms-ci-github/onsite/Phospho_redissolve_final_01_clean_perc.idparquet" + for f in psms.parquet proteins.parquet protein_groups.parquet search_params.parquet; do + echo "Downloading $f ..." + curl -sL -o "$DIR/$f" "$BASE_URL/$f" + done + ls -lh "$DIR" + - name: Run nf-test for ${{ matrix.module }} env: PROFILE: ${{ matrix.profile }} + ONSITE_IDPARQUET_PATH: ${{ github.workspace }}/tests/data/onsite/Phospho_redissolve_final_01_clean_perc.idparquet run: | MODULE_PATH="${{ matrix.module }}" TEST_FILE="modules/${MODULE_PATH}/tests/main.nf.test" diff --git a/.gitignore b/.gitignore index 7157dd6..bd6c28d 100644 --- a/.gitignore +++ b/.gitignore @@ -208,3 +208,9 @@ nf.test.snap .idea/ .nf-test* + +#Ignore vscode AI rules +.github\instructions\codacy.instructions.md + +# Test data downloaded at CI runtime +tests/data/ diff --git a/modules/bigbio/onsite/environment.yml b/modules/bigbio/onsite/environment.yml index 0025aa1..59f3a41 100644 --- a/modules/bigbio/onsite/environment.yml +++ b/modules/bigbio/onsite/environment.yml @@ -3,4 +3,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::pyonsite=0.0.2 + - bioconda::pyonsite=0.0.3 diff --git a/modules/bigbio/onsite/main.nf b/modules/bigbio/onsite/main.nf index de82e09..5e8fb11 100644 --- a/modules/bigbio/onsite/main.nf +++ b/modules/bigbio/onsite/main.nf @@ -4,14 +4,14 @@ process ONSITE { label 'onsite' container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container - ? 'https://depot.galaxyproject.org/singularity/pyonsite:0.0.2--pyhdfd78af_0' - : 'biocontainers/pyonsite:0.0.2--pyhdfd78af_0'}" + ? 'oras://ghcr.io/bigbio/pyonsite-sif:0.0.3' + : 'ghcr.io/bigbio/pyonsite:0.0.3'}" input: tuple val(meta), path(mzml_file), path(id_file) output: - tuple val(meta), path("${prefix}_*.idXML"), emit: ptm_in_id_onsite + tuple val(meta), path("${prefix}_*.idparquet"), emit: ptm_in_id_onsite path "versions.yml", emit: versions path "*.log", emit: log @@ -48,7 +48,7 @@ process ONSITE { onsite ascore \\ -in ${mzml_file} \\ -id ${id_file} \\ - -out ${prefix}_ascore.idXML \\ + -out ${prefix}_ascore.idparquet \\ --fragment-mass-tolerance ${fragment_tolerance} \\ --fragment-mass-unit ${fragment_unit}${optional_flags ? ' \\\n ' + optional_flags : ''} """ @@ -61,7 +61,7 @@ process ONSITE { onsite phosphors \\ -in ${mzml_file} \\ -id ${id_file} \\ - -out ${prefix}_phosphors.idXML \\ + -out ${prefix}_phosphors.idparquet \\ --fragment-mass-tolerance ${fragment_tolerance} \\ --fragment-mass-unit ${fragment_unit}${optional_flags ? ' \\\n ' + optional_flags : ''} ${args} @@ -92,7 +92,7 @@ process ONSITE { onsite lucxor \\ -in ${mzml_file} \\ -id ${id_file} \\ - -out ${prefix}_lucxor.idXML \\ + -out ${prefix}_lucxor.idparquet \\ --fragment-method ${fragment_method} \\ --fragment-mass-tolerance ${fragment_tolerance} \\ --fragment-error-units ${fragment_unit} \\ diff --git a/modules/bigbio/onsite/meta.yml b/modules/bigbio/onsite/meta.yml index 3956abd..d82458b 100644 --- a/modules/bigbio/onsite/meta.yml +++ b/modules/bigbio/onsite/meta.yml @@ -35,8 +35,8 @@ input: ontologies: [] - id_file: type: file - description: Protein/peptide identifications file in idXML format - pattern: "*.idXML" + description: Protein/peptide identifications file in idparquet format + pattern: "*.idparquet" ontologies: [] output: ptm_in_id_onsite: @@ -44,11 +44,11 @@ output: type: map description: | Groovy Map containing sample information - - ${prefix}_*.idXML: + - ${prefix}_*.idparquet: type: file - description: Output idXML file containing PTM localization results from + description: Output idparquet file containing PTM localization results from onsite - pattern: "${prefix}_*.idXML" + pattern: "${prefix}_*.idparquet" ontologies: [] log: - "*.log": diff --git a/modules/bigbio/onsite/tests/main.nf.test b/modules/bigbio/onsite/tests/main.nf.test index 8caec60..340d85e 100644 --- a/modules/bigbio/onsite/tests/main.nf.test +++ b/modules/bigbio/onsite/tests/main.nf.test @@ -13,11 +13,12 @@ nextflow_process { when { process { """ - input[0] = [ - [ id: 'test', mzml_id: 'test_sample' ], - file(params.test_data['proteomics']['onsite']['mzml'], checkIfExists: true), - file(params.test_data['proteomics']['onsite']['idxml'], checkIfExists: true) - ] + input[0] = channel.from([ + [ + [ id: 'test', mzml_id: 'test_sample' ], + file(params.test_data['proteomics']['onsite']['mzml'], checkIfExists: true) + ] + ]).combine(channel.fromPath(params.test_data['proteomics']['onsite']['idparquet'])) """ } params { @@ -31,7 +32,7 @@ nextflow_process { assert process.out.ptm_in_id_onsite.size() == 1 assert process.out.log.size() == 1 // Check output file has correct naming - assert process.out.ptm_in_id_onsite[0][1].toString().endsWith('_ascore.idXML') + assert process.out.ptm_in_id_onsite[0][1].toString().endsWith('_ascore.idparquet') } } @@ -43,7 +44,7 @@ nextflow_process { input[0] = [ [ id: 'test', mzml_id: 'test_sample' ], file(params.test_data['proteomics']['onsite']['mzml'], checkIfExists: true), - file(params.test_data['proteomics']['onsite']['idxml'], checkIfExists: true) + file(params.test_data['proteomics']['onsite']['idparquet'], checkIfExists: true) ] """ } @@ -58,7 +59,7 @@ nextflow_process { assert process.out.ptm_in_id_onsite.size() == 1 assert process.out.log.size() == 1 // Check output file has correct naming - assert process.out.ptm_in_id_onsite[0][1].toString().endsWith('_phosphors.idXML') + assert process.out.ptm_in_id_onsite[0][1].toString().endsWith('_phosphors.idparquet') } } @@ -70,7 +71,7 @@ nextflow_process { input[0] = [ [ id: 'test', mzml_id: 'test_sample' ], file(params.test_data['proteomics']['onsite']['mzml'], checkIfExists: true), - file(params.test_data['proteomics']['onsite']['idxml'], checkIfExists: true) + file(params.test_data['proteomics']['onsite']['idparquet'], checkIfExists: true) ] """ } @@ -85,7 +86,7 @@ nextflow_process { assert process.out.ptm_in_id_onsite.size() == 1 assert process.out.log.size() == 1 // Check output file has correct naming - assert process.out.ptm_in_id_onsite[0][1].toString().endsWith('_lucxor.idXML') + assert process.out.ptm_in_id_onsite[0][1].toString().endsWith('_lucxor.idparquet') } } @@ -99,7 +100,7 @@ nextflow_process { input[0] = [ [ id: 'test', mzml_id: 'test_sample' ], file(params.test_data['proteomics']['onsite']['mzml'], checkIfExists: true), - file(params.test_data['proteomics']['onsite']['idxml'], checkIfExists: true) + file(params.test_data['proteomics']['onsite']['idparquet'], checkIfExists: true) ] """ } diff --git a/tests/config/test_data.config b/tests/config/test_data.config index c192bc3..bb0b73b 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -20,8 +20,8 @@ params { } onsite { // Test data for onsite PTM localization module - mzml = "https://ftp.pride.ebi.ac.uk/pub/databases/pride/resources/proteomes/quantms-ci-github/onsite/1.mzML" - idxml = "https://ftp.pride.ebi.ac.uk/pub/databases/pride/resources/proteomes/quantms-ci-github/onsite/1_consensus_fdr_filter_pep.idXML" + mzml = "https://ftp.pride.ebi.ac.uk/pub/databases/pride/resources/proteomes/quantms-ci-github/onsite/Phospho_redissolve_final_01.mzML" + idparquet = System.getenv('ONSITE_IDPARQUET_PATH') ?: "https://ftp.pride.ebi.ac.uk/pub/databases/pride/resources/proteomes/quantms-ci-github/onsite/Phospho_redissolve_final_01_clean_perc.idparquet" } qpx { // DIA-NN results for QPX export testing (reuses pmultiqc DIANN example)