Skip to content

Commit

Permalink
Merge pull request #156 from Nesvilab/v3.3.10
Browse files Browse the repository at this point in the history
V3.3.10
  • Loading branch information
Felipe Leprevost committed Sep 28, 2020
2 parents 3ba499d + 02e4491 commit 25d8a1a
Show file tree
Hide file tree
Showing 45 changed files with 1,551 additions and 1,184 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.14
- name: Set up Go 1.15
uses: actions/setup-go@v1
with:
go-version: 1.14
go-version: 1.15
id: go

- name: Check out code into the Go module directory
Expand Down
17 changes: 14 additions & 3 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
### Added
-- Adding Zenodo DOI.
- A new Workspace option allows the use of a custom folder as a temporary folder.
- The Database now supports multiple database IDs (separate them with a comma).
- Support for the latest msconvert mzML format.
- Output prefix flag added to PTMProphet.

### Changed
- The parameter file was updated, and the terms were made more human-readable.
- The code compilation is now done with GO v1.15.
- PTMProphet updated to v6.0
- The Abacus memory footprint as significantly reduced.

### Fixed
-- Wrong assignment for the subFDR filtering.
-- PTMPRophet was having issue in replacing the PeptideProphet file.
- Small bugs and fixes.
- PSMs lists often contained observations mapping to proteins that did not pass the FDR filter.
- Bio quant was failing because of the unassigned database path.
- Some annotation files were being ignored.
- Added FASTA database file extension back again.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
</p>

[![Release](https://img.shields.io/github/release/nesvilab/philosopher.svg?color=purple&style=for-the-badge)](https://github.com/Nesvilab/philosopher/releases/latest)
![Golang](https://img.shields.io/badge/Go-1.14.2-blue.svg?style=for-the-badge)
![Golang](https://img.shields.io/badge/Go-1.15-blue.svg?style=for-the-badge)
[![Go Report Card](https://goreportcard.com/badge/github.com/Nesvilab/philosopher?style=for-the-badge&color=red&logo=appveyor)](https://goreportcard.com/report/github.com/Nesvilab/philosopher)
![GitHub](https://img.shields.io/github/license/Nesvilab/philosopher?style=for-the-badge)
![](https://img.shields.io/github/downloads/Nesvilab/philosopher/total.svg?color=red&style=for-the-badge)
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/Nesvilab/philosopher/philosopher-build?style=for-the-badge)
[![DOI](https://img.shields.io/badge/DOI-doi.org%2F10.5281%2Fzenodo.3909842-9cf?style=for-the-badge)](https://zenodo.org/record/3909842#.XvZXn5YpCAk)
<!--[![DOI](https://img.shields.io/badge/DOI-doi.org%2F10.5281%2Fzenodo.3909842-9cf?style=for-the-badge)](https://zenodo.org/record/3909842#.XvZXn5YpCAk)-->

#### Philosopher is fast, easy-to-use, scalable, and versatile data analysis software for mass spectrometry-based proteomics. Philosopher is dependency-free and can analyze both traditional database searches and open searches for post-translational modification (PTM) discovery.

Expand Down
4 changes: 3 additions & 1 deletion cmd/freequant.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ var freequant = &cobra.Command{
}

//forcing the larger time window to be the same as the smaller one
//m.Quantify.RTWin = 3
m.Quantify.RTWin = m.Quantify.PTWin

// run label-free quantification
Expand All @@ -62,9 +63,10 @@ func init() {
m.Restore(sys.Meta())

freequant.Flags().StringVarP(&m.Quantify.Dir, "dir", "", "", "folder path containing the raw files")
freequant.Flags().BoolVarP(&m.Quantify.Isolated, "isolated", "", false, "use the isolated ion instead of the selected ion for quantification")
freequant.Flags().Float64VarP(&m.Quantify.Tol, "tol", "", 10, "m/z tolerance in ppm")
freequant.Flags().Float64VarP(&m.Quantify.PTWin, "ptw", "", 0.4, "specify the time windows for the peak (minute)")
freequant.Flags().BoolVarP(&m.Quantify.Isolated, "isolated", "", true, "use the isolated ion instead of the selected ion for quantification")
filterCmd.Flags().MarkHidden("isolated")
}

RootCmd.AddCommand(freequant)
Expand Down
44 changes: 44 additions & 0 deletions cmd/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import (

"philosopher/lib/dat"
"philosopher/lib/met"
"philosopher/lib/mod"
"philosopher/lib/msg"
"philosopher/lib/qua"
"philosopher/lib/rep"

"github.com/davecgh/go-spew/spew"
Expand Down Expand Up @@ -87,6 +89,48 @@ var inspectCmd = &cobra.Command{
}
spew.Dump(o.Records)

} else if object == "lfq" {

var o qua.LFQ

target := fmt.Sprintf(".meta%slfq.bin", string(filepath.Separator))
file, _ := os.Open(target)

dec := msgpack.NewDecoder(file)
e := dec.Decode(&o)
if e != nil {
msg.DecodeMsgPck(e, "fatal")
}
spew.Dump(o.Intensities)

} else if object == "lfq" {

var o qua.LFQ

target := fmt.Sprintf(".meta%slfq.bin", string(filepath.Separator))
file, _ := os.Open(target)

dec := msgpack.NewDecoder(file)
e := dec.Decode(&o)
if e != nil {
msg.DecodeMsgPck(e, "fatal")
}
spew.Dump(o.Intensities)

} else if object == "mod" {

var o mod.Modifications

target := fmt.Sprintf(".meta%sev.mod.bin", string(filepath.Separator))
file, _ := os.Open(target)

dec := msgpack.NewDecoder(file)
e := dec.Decode(&o)
if e != nil {
msg.DecodeMsgPck(e, "fatal")
}
spew.Dump(o)

} else if object == "protein" {

var o rep.ProteinEvidenceList
Expand Down
6 changes: 6 additions & 0 deletions cmd/msfragger.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ func init() {
msfraggerCmd.Flags().IntVarP(&m.MSFragger.RemovePrecursorPeak, "remove_precursor_peak", "", 0, "remove precursor peaks from tandem mass spectra. 0=not remove; 1=remove the peak with precursor charge;")
msfraggerCmd.Flags().StringVarP(&m.MSFragger.RemovePrecursorRange, "remove_precursor_range", "", "-1.5,1.5", "m/z range in removing precursor peaks. Unit: Da.")
msfraggerCmd.Flags().IntVarP(&m.MSFragger.IntensityTransform, "intensity_transform", "", 0, "transform peaks intensities with sqrt root. 0 = not transform; 1 = transform using sqrt root.")
msfraggerCmd.Flags().IntVarP(&m.MSFragger.IntensityTransform, "mass_diff_to_variable_mod", "", 0, "Put mass diff as a variable modification. 0 for no; 1 for yes and change the original mass diff and the calculated mass accordingly; 2 for yes but do not change the original mass diff.")
msfraggerCmd.Flags().StringVarP(&m.MSFragger.LabileSearchMode, "labile_search_mode", "", "off", "type of search (nglycan, labile, or off). Off means non-labile/typical search.")
msfraggerCmd.Flags().StringVarP(&m.MSFragger.RestrictDeltaMassTo, "restrict_deltamass_to", "", "all", "Specify amino acids on which delta masses (mass offsets or search modifications) can occur. Allowed values are single letter codes (e.g. ACD)")
msfraggerCmd.Flags().IntVarP(&m.MSFragger.DiagnosticIntensityFilter, "diagnostic_intensity_filter", "", 0, "[nglycan/labile search_mode only]. Specify diagnostic fragments of labile mods that appear in the low m/z region. Only used if diagnostic_intensity_filter > 0.")
msfraggerCmd.Flags().StringVarP(&m.MSFragger.YTypeMasses, "Y_type_masses", "", "", "[nglycan/labile search_mode only]. Specify fragments of labile mods that are commonly retained on intact peptides (e.g. Y ions for glycans). Only used if 'Y' is included in fragment_ion_series.")
msfraggerCmd.Flags().StringVarP(&m.MSFragger.DiagnosticFragments, "diagnostic_fragments", "", "", "[nglycan/labile search_mode only]. Specify diagnostic fragments of labile mods that appear in the low m/z region. Only used if diagnostic_intensity_filter > 0.")
msfraggerCmd.Flags().Float64VarP(&m.MSFragger.AddCtermPeptide, "add_Cterm_peptide", "", 0.000000, "")
msfraggerCmd.Flags().Float64VarP(&m.MSFragger.AddCtermProtein, "add_Cterm_protein", "", 0.000000, "")
msfraggerCmd.Flags().Float64VarP(&m.MSFragger.AddNTermPeptide, "add_Nterm_peptide", "", 0.000000, "")
Expand Down
56 changes: 39 additions & 17 deletions cmd/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,45 +62,67 @@ var pipelineCmd = &cobra.Command{

if len(args) < 1 {
msg.NoParametersFound(errors.New("You need to provide at least one dataset for the analysis"), "fatal")
} else if p.Commands.Abacus == "true" && len(args) < 2 {
} else if p.Steps.IntegratedReports == "true" && len(args) < 2 {
msg.NoParametersFound(errors.New("You need to provide at least two datasets for the abacus integrative analysis"), "fatal")
}

// Workspace - Database
if p.Commands.Workspace == "yes" {
meta = pip.InitializeWorkspaces(meta, p, dir, Version, Build, args)
}
//if p.Steps.Workspace == "yes" {
meta = pip.InitializeWorkspaces(meta, p, dir, Version, Build, args)
//}

// Comet - MSFragger
if p.Commands.Comet == "yes" && p.Commands.MSFragger == "yes" {
msg.Custom(errors.New("You can only specify one search engine at a time"), "fatal")
} else if p.Commands.Comet == "yes" || p.Commands.MSFragger == "yes" {
meta = pip.DatabaseSearch(meta, p, dir, args)
if p.Steps.DatabaseSearch == "yes" {
meta = pip.DBSearch(meta, p, dir, args)
}

// PeptideProphet
if p.Commands.PeptideProphet == "yes" {
if p.Steps.PeptideValidation == "yes" {
meta = pip.PeptideProphet(meta, p, dir, args)
}

// PTMProphet
if p.Commands.PTMProphet == "yes" {
if p.Steps.PTMLocalization == "yes" {
meta = pip.PTMProphet(meta, p, dir, args)
}

// ProteinProphet
if p.Commands.ProteinProphet == "yes" {
if p.Steps.ProteinInference == "yes" {
meta = pip.ProteinProphet(meta, p, dir, args)
}

// Abacus - combined pepxml
meta = pip.CombinedPeptideList(meta, p, dir, args)
if p.Steps.IntegratedReports == "yes" {
// Abacus - combined pepxml
meta = pip.CombinedPeptideList(meta, p, dir, args)

// Abacus - combined protxml
meta = pip.CombinedProteinList(meta, p, dir, args)
}

// Filter
if p.Steps.FDRFiltering == "yes" {
meta = pip.Filter(meta, p, dir, args)
}

// Abacus - combined protxml
meta = pip.CombinedProteinList(meta, p, dir, args)
// FreeQuant
if p.Steps.LabelFreeQuantification == "yes" {
meta = pip.FreeQuant(meta, p, dir, args)
}

// Filter - Quantification - Clustering - Report
meta = pip.FilterQuantifyReport(meta, p, dir, args)
// LabelQuant
if p.Steps.IsobaricQuantification == "yes" {
meta = pip.LabelQuant(meta, p, dir, args)
}

// Report
if p.Steps.IndividualReports == "yes" {
meta = pip.Report(meta, p, dir, args)
}

// BioQuant
if p.Steps.BioClusterQuantification == "yes" {
meta = pip.BioQuant(meta, p, dir, args)
}

// Abacus
meta = pip.Abacus(meta, p, dir, args)
Expand Down
4 changes: 3 additions & 1 deletion cmd/ptmprophet.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ func init() {

m.Restore(sys.Meta())

//ptmprophetCmd.Flags().StringVarP(&m.PTMProphet.Output, "output", "", "", "output prefix file name")
ptmprophetCmd.Flags().StringVarP(&m.PTMProphet.Mods, "mods", "", "", "<amino acids, n, or c>:<mass_shift>:<neut_loss1>:...:<neut_lossN>,<amino acids, n, or c>:<mass_shift>:<neut_loss1>:...:<neut_lossN> (overrides the modifications from the interact.pep.xml file)")
ptmprophetCmd.Flags().StringVarP(&m.PTMProphet.NIons, "nions", "", "", "use specified N-term ions, separate multiple ions by commas (default: a,b for CID, c for ETD)")
ptmprophetCmd.Flags().StringVarP(&m.PTMProphet.CIons, "cions", "", "", "use specified C-term ions, separate multiple ions by commas (default: y for CID, z for ETD)")
ptmprophetCmd.Flags().StringVarP(&m.PTMProphet.Output, "output", "", "interact", "output name prefix")
ptmprophetCmd.Flags().IntVarP(&m.PTMProphet.EM, "em", "", 2, "set EM models to 0 (no EM), 1 (Intensity EM Model Applied) or 2 (Intensity and Matched Peaks EM Models Applied)")
ptmprophetCmd.Flags().IntVarP(&m.PTMProphet.FragPPMTol, "fragppmtol", "", 15, "when computing PSM-specific mass_offset and mass_tolerance, use specified default +/- MS2 mz tolerance on fragment ions")
ptmprophetCmd.Flags().IntVarP(&m.PTMProphet.MaxThreads, "maxthreads", "", 1, "use specified number of threads for processing")
Expand All @@ -59,6 +59,8 @@ func init() {
ptmprophetCmd.Flags().BoolVarP(&m.PTMProphet.NoMinoFactor, "nominofactor", "", false, "disable MINO factor correction when MINO= is set greater than 0 (default: apply MINO factor correction)")
ptmprophetCmd.Flags().Float64VarP(&m.PTMProphet.PPMTol, "ppmtol", "", 1, "use specified +/- MS1 ppm tolerance on peptides which may have a slight offset depending on search parameters")
ptmprophetCmd.Flags().Float64VarP(&m.PTMProphet.MinProb, "minprob", "", 0.9, "use specified minimum probability to evaluate peptides")
ptmprophetCmd.Flags().Float64VarP(&m.PTMProphet.ExcludeMassDiffMin, "excludemassdiffmin", "", 0, "Minimum mass difference excluded for MASSDIFFFMODE analysis (default=0)")
ptmprophetCmd.Flags().Float64VarP(&m.PTMProphet.ExcludeMassDiffMax, "excludemassdiffmax", "", 0, "Maximun mass difference excluded for MASSDIFFFMODE analysis (default=0)")
ptmprophetCmd.Flags().BoolVarP(&m.PTMProphet.MassDiffMode, "massdiffmode", "", false, "use the mass difference and localize")
}

Expand Down
18 changes: 10 additions & 8 deletions cmd/workspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import (
"github.com/spf13/cobra"
)

var a, b, c, i, n bool
var analytics, backup, clean, initialize, nocheck bool
var temp string

// workspaceCmd represents the workspace command
var workspaceCmd = &cobra.Command{
Expand All @@ -22,7 +23,7 @@ var workspaceCmd = &cobra.Command{

msg.Executing("Workspace ", Version)

wrk.Run(Version, Build, b, c, i, n)
wrk.Run(Version, Build, temp, backup, clean, initialize, nocheck)

msg.Done()
return
Expand All @@ -31,13 +32,14 @@ var workspaceCmd = &cobra.Command{

func init() {

workspaceCmd.Flags().BoolVarP(&i, "init", "", false, "initialize the workspace")
workspaceCmd.Flags().BoolVarP(&b, "backup", "", false, "create a backup of the experiment meta data")
workspaceCmd.Flags().BoolVarP(&c, "clean", "", false, "remove the workspace and all meta data. Experimental file are kept intact")
workspaceCmd.Flags().BoolVarP(&a, "analytics", "", true, "reports when a workspace is created for usage estimation")
workspaceCmd.Flags().BoolVarP(&n, "nocheck", "", false, "do not check for new versions")
workspaceCmd.Flags().BoolVarP(&initialize, "init", "", false, "initialize the workspace")
workspaceCmd.Flags().BoolVarP(&backup, "backup", "", false, "create a backup of the experiment meta data")
workspaceCmd.Flags().BoolVarP(&clean, "clean", "", false, "remove the workspace and all meta data. Experimental file are kept intact")
workspaceCmd.Flags().BoolVarP(&analytics, "analytics", "", true, "reports when a workspace is created for usage estimation")
workspaceCmd.Flags().BoolVarP(&nocheck, "nocheck", "", false, "do not check for new versions")
workspaceCmd.Flags().StringVarP(&temp, "temp", "", "", "define a custom temporary folder for Philosopher")

if len(os.Args) > 1 && os.Args[1] == "workspace" && a == true {
if len(os.Args) > 1 && os.Args[1] == "workspace" && analytics == true {

// do not change this! This is for metric colletion, no user data is gatter, the software just reports back
// the number of people using it and the geo location, just like any other website does.
Expand Down
Loading

0 comments on commit 25d8a1a

Please sign in to comment.