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 FragPipe #761

Merged
merged 34 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
d27d280
Initial commit of fragpipe wrapper.
reid-wagner Jul 21, 2022
3eb47a3
Agree to academic license.
reid-wagner Jul 21, 2022
ec09038
Add protein prophet options. Add data type options for sample groups.…
reid-wagner Jul 22, 2022
d68ec98
- Change Galaxy tool version scheme to devX
reid-wagner Oct 15, 2022
491b643
Add decoy and contaminant generation.
reid-wagner Nov 18, 2022
792e33d
Merge remote-tracking branch 'origin/master' into add_fragpipe
reid-wagner May 3, 2023
66f5b07
Current progress, including TMT11.
reid-wagner May 10, 2023
ef47011
Merge remote-tracking branch 'reid-wagner/add_fragpipe' into add_frag…
reid-wagner May 10, 2023
dd5b51f
Final edits for release.
reid-wagner May 7, 2024
f95b7f7
Merge branch 'master' into add_fragpipe
reid-wagner Jun 10, 2024
1c7d2a6
Add /usr/local/lib to LD_LIBRARY_PATH for biocontainer environments.
reid-wagner Jun 14, 2024
fa446d8
Fix tabs in tests.
reid-wagner Jun 14, 2024
ef0f93e
Genericize database line-by-line instead of buffering it entirely in …
reid-wagner Jun 26, 2024
97718b1
Remove input scan format conditional.
reid-wagner Jun 26, 2024
50e9798
Remove -Xmx. FragPipe has its own memory flag.
reid-wagner Jun 27, 2024
749b351
Remove comment and indent.
reid-wagner Jun 27, 2024
18d626f
Use a common name for the database, whether it has decoys/contaminant…
reid-wagner Jun 27, 2024
5c2189e
Make <command> tag easier to follow. Break components into further ma…
reid-wagner Jun 27, 2024
51e7432
Simplify creation of combined_outputs directory.
reid-wagner Jun 27, 2024
46bb7c1
Standardize templating formatting.
reid-wagner Jun 29, 2024
2964cd9
Disable Thermo.raw inputs until mono can be incorporated.
reid-wagner Jun 29, 2024
e82739e
Use GALAXY_SLOTS for FragPipe --threads argument.
reid-wagner Jun 29, 2024
d62e6c8
Add profile attribute to tool.
reid-wagner Jun 29, 2024
2995038
Lower profile version to 20.05.
reid-wagner Jun 29, 2024
3031e8f
Create links to FragPipe installation files in $CONDA_PREFIX. Because…
reid-wagner Jun 29, 2024
93a0352
Copy all FragPipe files from conda install locally.
reid-wagner Jul 5, 2024
b8c1870
Remove unused CWD cheetah variable.
reid-wagner Jul 5, 2024
59d8f7f
Use non-forward slash delimiter.
reid-wagner Jul 5, 2024
f154c6b
Revert "Use non-forward slash delimiter."
reid-wagner Jul 5, 2024
f3870b0
Add wildcard to output data element for log.
reid-wagner Jul 6, 2024
fd36cd4
Fix two bugs: isobaric quant user options not included in workflow, a…
reid-wagner Jul 8, 2024
5732dfa
Standardize command substitution syntax.
reid-wagner Jul 9, 2024
68fb04a
Remove CONDA_PREFIX references.
reid-wagner Jul 9, 2024
7716996
Use @ delimiter in sed expressions.
reid-wagner Jul 9, 2024
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
11 changes: 11 additions & 0 deletions tools/fragpipe/.shed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
owner: galaxyp
name: fragpipe
categories:
- Proteomics
description: Data analysis for mass spectrometry-based proteomics.
homepage_url: https://fragpipe.nesvilab.org/
long_description: |
FragPipe is a suite of computational tools enabling comprehensive analysis of mass spectrometry-based proteomics data.
FragPipe uses MSFragger - an ultrafast proteomic search engine suitable for both conventional and “open” (wide precursor mass tolerance) peptide identification.
remote_repository_url: https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/fragpipe
type: unrestricted
65 changes: 65 additions & 0 deletions tools/fragpipe/fragpipe
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/bin/bash

# Modified version of the Bioconda wrapper of the script for command-line FragPipe, calling a local link to fragpipe instead of the version in $CONDA_PREFIX.
# Ensures the user agrees to MSFragger and IonQuant academic licenses.

license_agreement_text='
Please accept the academic license.

FragPipe uses tools that are available freely for academic research and educational purposes only.

Please provide license keys for MSFragger and IonQuant with the --msfragger_key and --ionquant_key flags. By passing these, you verify that you have read the ACADEMIC licenses for the MSFragger and IonQuant tools. You may obtain these keys by agreeing to the terms at http://msfragger-upgrader.nesvilab.org/upgrader/ and https://msfragger.arsci.com/ionquant/.'

declare -a fragpipe_args

while [[ $# -gt 0 ]]; do
case "$1" in
--msfragger_key)
shift
msfragger_key=$1
;;
--ionquant_key)
shift
ionquant_key=$1
;;
--workflow)
fragpipe_args+=("$1")
shift
workflow_file="$1"
fragpipe_args+=("$1")
;;
*)
fragpipe_args+=("$1")
;;
esac
shift
done

if [[ ! -z "$workflow_file" ]]; then
# Because the DIA-NN license is incompatible with bioconda, we remove the feature.
grep 'diann.run-dia-nn=true' "$workflow_file" >/dev/null
if [[ $? -eq 0 ]]; then
echo "Error: DIA-NN is disabled in the FragPipe bioconda package."
exit 1
fi
fi

if [[ -z $msfragger_key || -z $ionquant_key ]]; then
echo "$license_agreement_text"
exit 1
else
msfragger --key $msfragger_key --help | grep 'License key verified' >/dev/null 2>&1
if [[ $? -ne 0 ]]; then
echo "Error: Invalid MSFragger license key"
echo "$license_agreement_text"
exit 1
fi
ionquant --key $ionquant_key --help | grep 'License key verified' >/dev/null 2>&1
if [[ $? -ne 0 ]]; then
echo "Error: Invalid IonQuant license key"
echo "$license_agreement_text"
exit 1
fi
fi

sh fragpipe_local/bin/fragpipe "${fragpipe_args[@]}"
276 changes: 276 additions & 0 deletions tools/fragpipe/fragpipe.xml

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions tools/fragpipe/genericize_db.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env python3
#
# Prefixes sequence headers in the input FASTA file that are not formatted according to the UniProt, NCBI, or ENSEMBL formats with '>generic|' to avoid being misinterpreted by Philosopher.
#

import re
import sys

input_db_file = sys.argv[1]
output_db_file = sys.argv[2]


def sub_header(line):
return re.sub(r'^>(?!sp\||tr\||db\||AP_|NP_|YP_|XP_|WP_|ENSP|UniRef|nxp|generic)', '>generic|', line)


with open(input_db_file) as in_file, open(output_db_file, 'w') as out_file:
for line in in_file:
out_file.write(sub_header(line))
Loading