-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #373 from daichengxin/dev
Add dda id ci and fixed some bugs
- Loading branch information
Showing
17 changed files
with
202 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/env python | ||
# Add extra features in sage idXML. Adding extra feature in Sage isn't known input for PSMFeatureExtractor | ||
|
||
import pyopenms as oms | ||
import pandas as pd | ||
import sys | ||
|
||
|
||
def add_feature(idx_file, output_file, feat_file): | ||
extra_feat = [] | ||
feat = pd.read_csv(feat_file, sep='\t') | ||
for _, row in feat.iterrows(): | ||
if row["feature_generator"] == 'psm_file': | ||
continue | ||
else: | ||
extra_feat.append(row["feature_name"]) | ||
print("Adding extra feature: {}".format(extra_feat)) | ||
protein_ids = [] | ||
peptide_ids = [] | ||
oms.IdXMLFile().load(idx_file, protein_ids, peptide_ids) | ||
SearchParameters = protein_ids[0].getSearchParameters() | ||
features = SearchParameters.getMetaValue("extra_features") | ||
extra_features = features + "," + ",".join(extra_feat) | ||
SearchParameters.setMetaValue("extra_features", extra_features) | ||
protein_ids[0].setSearchParameters(SearchParameters) | ||
oms.IdXMLFile().store(output_file, protein_ids, peptide_ids) | ||
print("Done") | ||
|
||
|
||
def main(): | ||
idx_file = sys.argv[1] | ||
output_file = sys.argv[2] | ||
feat_file = sys.argv[3] | ||
add_feature(idx_file, output_file, feat_file) | ||
|
||
|
||
if __name__ == "__main__": | ||
sys.exit(main()) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
Nextflow config file for running real full-size tests | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
Defines input files and everything required to run a real and full-size test. | ||
Use as follows: | ||
nextflow run nf-core/quantms -profile test_dda_id,<docker/singularity> [--outdir <OUTDIR>] | ||
------------------------------------------------------------------------------------------------ | ||
*/ | ||
|
||
params { | ||
config_profile_name = 'Real full-size test profile for DDA ID' | ||
config_profile_description = 'Real full-size test dataset to check pipeline function of the DDA identification branch of the pipeline' | ||
|
||
// Limit resources so that this can run on GitHub Actions | ||
max_cpus = 2 | ||
max_memory = 6.GB | ||
max_time = 48.h | ||
|
||
outdir = "./results_lfq_dda_id" | ||
|
||
// Input data | ||
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/quantms/testdata/tmt_ci/PXD000001.sdrf.tsv' | ||
database = 'https://raw.githubusercontent.com/nf-core/test-datasets/quantms/testdata/tmt_ci/erwinia_carotovora.fasta' | ||
posterior_probabilities = "percolator" | ||
search_engines = "msgf,comet" | ||
add_decoys = true | ||
decoy_string = "rev" | ||
protein_level_fdr_cutoff = 0.01 | ||
psm_level_fdr_cutoff = 1.0 | ||
pmultiqc_idxml_skip = false | ||
id_only = true | ||
enable_pmultiqc = false | ||
ms2rescore = true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
process SAGEFEATURE { | ||
tag "$meta.mzml_id" | ||
label 'process_low' | ||
|
||
conda "bioconda::pyopenms=3.1.0" | ||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { | ||
container "https://depot.galaxyproject.org/singularity/pyopenms:3.1.0--py39h9b8898c_0" | ||
} else { | ||
container "biocontainers/pyopenms:3.1.0--py39h9b8898c_0" | ||
} | ||
|
||
input: | ||
tuple val(meta), path(id_file), path(extra_feat) | ||
|
||
output: | ||
tuple val(meta), path("${id_file.baseName}_feat.idXML"), emit: id_files_feat | ||
path "versions.yml", emit: version | ||
path "*.log", emit: log | ||
|
||
script: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.mzml_id}" | ||
|
||
""" | ||
add_sage_feature.py "${id_file}" "${id_file.baseName}_feat.idXML" "${extra_feat}" 2>&1 | tee add_sage_feature.log | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
pyopenms: \$(pip show pyopenms | grep "Version" | awk -F ': ' '{print \$2}') | ||
END_VERSIONS | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: SAGEFEATURE | ||
description: A module to extract extra features from ms2rescore | ||
keywords: | ||
- features | ||
- ms2rescore | ||
tools: | ||
- custom: | ||
description: | | ||
A custom module to extract extra features from ms2rescore. | ||
homepage: https://github.com/bigbio/quantms | ||
documentation: https://github.com/bigbio/quantms/tree/readthedocs | ||
input: | ||
- meta: | ||
type: map | ||
description: Groovy Map containing sample information | ||
- id_file: | ||
type: file | ||
description: | | ||
Input idXML file containing the identifications. | ||
pattern: "*.idXML" | ||
output: | ||
- meta: | ||
type: map | ||
description: Groovy Map containing sample information | ||
- id_files_feat: | ||
type: file | ||
description: | | ||
Output file in idXML format | ||
pattern: "*.idXML" | ||
- log: | ||
type: file | ||
description: log file | ||
pattern: "*.log" | ||
- version: | ||
type: file | ||
description: File containing software version | ||
pattern: "versions.yml" | ||
authors: | ||
- "@daichengxin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.