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

improve sdrf validation hint #237

Merged
merged 7 commits into from
Oct 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ jobs:
mamba-version: "*"
channels: conda-forge,defaults

#- name: Install micromamba as mamba
# if: matrix.exec_profile == 'conda'
# run: |
# wget -qO- https://micromamba.snakepit.net/api/micromamba/linux-64/latest | tar -xvj bin/micromamba
# mv bin/micromamba bin/mamba
# echo "$(pwd)/bin" >> $GITHUB_PATH
# echo "$(pwd)/mamba/bin" >> $GITHUB_PATH
# ./bin/mamba shell init -s bash -p ./mamba
# - name: Install micromamba as mamba
# if: matrix.exec_profile == 'conda'
# run: |
# wget -qO- https://micromamba.snakepit.net/api/micromamba/linux-64/latest | tar -xvj bin/micromamba
# mv bin/micromamba bin/mamba
# echo "$(pwd)/bin" >> $GITHUB_PATH
# echo "$(pwd)/mamba/bin" >> $GITHUB_PATH
# ./bin/mamba shell init -s bash -p ./mamba

- name: Run pipeline with test data
if: matrix.exec_profile != 'conda'
Expand Down
8 changes: 7 additions & 1 deletion bin/check_samplesheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,13 @@ def check_sdrf(check_ms, sdrf):
errors = df.validate(DEFAULT_TEMPLATE)
if check_ms:
errors = errors + df.validate(MASS_SPECTROMETRY)
print(errors)
for error in errors:
print(error)
if not errors:
print("Everying seems to be fine. Well done.")
else:
print("There were validation errors!")
sys.exit(bool(errors))


def check_expdesign(expdesign):
Expand Down
3 changes: 3 additions & 0 deletions subworkflows/local/id.nf
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ workflow ID {
// SUBWORKFLOW: PSMFDRCONTROL
//
ch_psmfdrcontrol = Channel.empty()
ch_consensus_results = Channel.empty()
if (params.search_engines.split(",").size() > 1) {
CONSENSUSID(PSMRESCORING.out.results.groupTuple(size: params.search_engines.split(",").size()))
ch_software_versions = ch_software_versions.mix(CONSENSUSID.out.version.ifEmpty(null))
ch_psmfdrcontrol = CONSENSUSID.out.consensusids
ch_consensus_results = CONSENSUSID.out.consensusids
} else {
ch_psmfdrcontrol = PSMRESCORING.out.results
}
Expand All @@ -65,5 +67,6 @@ workflow ID {
emit:
id_results = ch_id_results
psmrescoring_results = PSMRESCORING.out.results
ch_consensus_results = ch_consensus_results
version = ch_software_versions
}
15 changes: 10 additions & 5 deletions workflows/lfq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,17 @@ workflow LFQ {
.map { it -> it[1] }
.set { ch_pmultiqc_ids }

ID.out.ch_consensus_results
.map { it -> it[1] }
.set { ch_pmultiqc_consensus }

emit:
ch_pmultiqc_ids = ch_pmultiqc_ids
final_result = PROTEOMICSLFQ.out.out_mztab
versions = ch_software_versions
msstats_in = PROTEOMICSLFQ.out.out_msstats
msstats_out = ch_msstats_out
ch_pmultiqc_ids = ch_pmultiqc_ids
ch_pmultiqc_consensus = ch_pmultiqc_consensus
final_result = PROTEOMICSLFQ.out.out_mztab
versions = ch_software_versions
msstats_in = PROTEOMICSLFQ.out.out_msstats
msstats_out = ch_msstats_out
}

/*
Expand Down
6 changes: 5 additions & 1 deletion workflows/quantms.nf
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ workflow QUANTMS {
ch_pipeline_results = Channel.empty()
ch_ids_pmultiqc = Channel.empty()
ch_msstats_in = Channel.empty()
ch_consensus_pmultiqc = Channel.empty()

//
// MODULE: Generate decoy database
Expand All @@ -141,12 +142,14 @@ workflow QUANTMS {

TMT(ch_fileprep_result.iso, CREATE_INPUT_CHANNEL.out.ch_expdesign, ch_searchengine_in_db)
ch_ids_pmultiqc = ch_ids_pmultiqc.mix(TMT.out.ch_pmultiqc_ids)
ch_consensus_pmultiqc = ch_consensus_pmultiqc.mix(TMT.out.ch_pmultiqc_consensus)
ch_pipeline_results = ch_pipeline_results.mix(TMT.out.final_result)
ch_msstats_in = ch_msstats_in.mix(TMT.out.msstats_in)
ch_versions = ch_versions.mix(TMT.out.versions.ifEmpty(null))

LFQ(ch_fileprep_result.lfq, CREATE_INPUT_CHANNEL.out.ch_expdesign, ch_searchengine_in_db)
ch_ids_pmultiqc = ch_ids_pmultiqc.mix(LFQ.out.ch_pmultiqc_ids)
ch_consensus_pmultiqc = ch_consensus_pmultiqc.mix(LFQ.out.ch_pmultiqc_consensus)
ch_pipeline_results = ch_pipeline_results.mix(LFQ.out.final_result)
ch_msstats_in = ch_msstats_in.mix(LFQ.out.msstats_in)
ch_versions = ch_versions.mix(LFQ.out.versions.ifEmpty(null))
Expand Down Expand Up @@ -184,7 +187,8 @@ workflow QUANTMS {
SUMMARYPIPELINE (
CREATE_INPUT_CHANNEL.out.ch_expdesign
.combine(ch_pipeline_results.ifEmpty([]).combine(ch_multiqc_files.collect())
.combine(ch_ids_pmultiqc.collect().ifEmpty([])))
.combine(ch_ids_pmultiqc.collect().ifEmpty([]))
.combine(ch_consensus_pmultiqc.collect().ifEmpty([])))
.combine(ch_msstats_in.ifEmpty([])),
ch_multiqc_quantms_logo
)
Expand Down
15 changes: 10 additions & 5 deletions workflows/tmt.nf
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,15 @@ workflow TMT {
.map { it -> it[1] }
.set { ch_pmultiqc_ids }

ID.out.ch_consensus_results
.map { it -> it[1] }
.set { ch_pmultiqc_consensus }

emit:
ch_pmultiqc_ids = ch_pmultiqc_ids
final_result = PROTEINQUANT.out.out_mztab
msstats_in = PROTEINQUANT.out.msstats_csv
msstats_out = ch_msstats_out
versions = ch_software_versions
ch_pmultiqc_ids = ch_pmultiqc_ids
ch_pmultiqc_consensus = ch_pmultiqc_consensus
final_result = PROTEINQUANT.out.out_mztab
msstats_in = PROTEINQUANT.out.msstats_csv
msstats_out = ch_msstats_out
versions = ch_software_versions
}