Skip to content

Commit

Permalink
Merge pull request #291 from Nesvilab/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Felipe da Veiga Leprevost committed Nov 17, 2021
2 parents fe13379 + c83df16 commit 03b93d8
Show file tree
Hide file tree
Showing 18 changed files with 193 additions and 232 deletions.
66 changes: 1 addition & 65 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,68 +111,4 @@ release:
# If set to auto, the release will not be pushed to the docker repository
# in case there is an indicator for prerelease in the tag e.g. v1.0.0-rc1
# Defaults to false.
# skip_push: true


snapcrafts:
# You can change the name of the package.
# Default: `{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}`
- name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"

# Wether to publish the snap to the snapcraft store.
# Remember you need to `snapcraft login` first.
# Defaults to false.
publish: true

# Single-line elevator pitch for your amazing snap.
# 79 char long at most.
summary: A complete toolkit for shotgun proteomics data analysis.

# This the description of your snap. You have a paragraph or two to tell the
# most important story about your snap. Keep it under 100 words though,
# we live in tweetspace and your description wants to look good in the snap
# store.
description:
Philosopher is a software designed for proteome bioinformatics analysis.

# A guardrail to prevent you from releasing a snap to all your users before
# it is ready.
# `devel` will let you release only to the `edge` and `beta` channels in the
# store. `stable` will let you release also to the `candidate` and `stable`
# channels. More info about channels here:
# https://snapcraft.io/docs/reference/channels
grade: stable

# Snaps can be setup to follow three different confinement policies:
# `strict`, `devmode` and `classic`. A strict confinement where the snap
# can only read and write in its own namespace is recommended. Extra
# permissions for strict snaps can be declared as `plugs` for the app, which
# are explained later. More info about confinement here:
# https://snapcraft.io/docs/reference/confinement
confinement: strict

# Your app's license, based on SPDX license expressions: https://spdx.org/licenses
# Default is empty.
license: GPL-3.0

# A snap of type base to be used as the execution environment for this snap.
# Valid values are:
# * bare - Empty base snap;
# * core - Ubuntu Core 16;
# * core18 - Ubuntu Core 18.
# Default is empty.
#base: core18

# Each binary built by GoReleaser is an app inside the snap. In this section
# you can declare extra details for those binaries. It is optional.
apps:

# The name of the app must be the same name as the binary built or the snapcraft name.
philosopher:

# If your app requires extra permissions to work outside of its default
# confined space, declare them here.
# You can read the documentation about the available plugs and the
# things they allow:
# https://snapcraft.io/docs/reference/interfaces.
plugs: ["home", "network"]
# skip_push: true
9 changes: 4 additions & 5 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
### Added
- Support for TMTPro (18-plex)


### Changed
- Decoys have NextAA and PrevAA
- Improved the filtering process


### Fixed
- Fixed an issue with the labelling of the TMT-6 channels
- Minor bugs and issues
- Fixed an issue with the ion mobility column not showing in empty PSM tables.
- Fixed an issue where high-scoring peptides mapping to complicated razor cases where not showing in the reports.
2 changes: 1 addition & 1 deletion cmd/msfragger.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func init() {
msfraggerCmd.Flags().StringVarP(&m.MSFragger.SearchEnzymeCut2, "search_enzyme_cut_2", "", "", "Second enzyme's cutting amino acid.")
msfraggerCmd.Flags().StringVarP(&m.MSFragger.SearchEnzymeNocut2, "search_enzyme_nocut_2", "", "", "Second enzyme's protecting amino acid.")
msfraggerCmd.Flags().IntVarP(&m.MSFragger.AllowedMissedCleavage2, "allowed_missed_cleavage_2", "", 2, "Second enzyme's allowed number of missed cleavages per peptide. Maximum value is 5.")
msfraggerCmd.Flags().StringVarP(&m.MSFragger.SearchEnzymeSense2, "search_enzyme_sense_2", "", "", "Second enzyme's cutting terminal.")
msfraggerCmd.Flags().StringVarP(&m.MSFragger.SearchEnzymeSense2, "search_enzyme_sense_2", "", "C", "Second enzyme's cutting terminal.")
msfraggerCmd.Flags().IntVarP(&m.MSFragger.NumEnzymeTermini, "num_enzyme_termini", "", 2, "2 for enzymatic, 1 for semi-enzymatic, 0 for nonspecific digestion")
msfraggerCmd.Flags().IntVarP(&m.MSFragger.ClipNTermM, "clip_nTerm_M", "", 1, "")
msfraggerCmd.Flags().StringVarP(&m.MSFragger.VariableMod01, "variable_mod_01", "", "", "")
Expand Down
1 change: 1 addition & 0 deletions cmd/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ func init() {
reportCmd.Flags().BoolVarP(&m.Report.Decoys, "decoys", "", false, "add decoy observations to reports")
reportCmd.Flags().BoolVarP(&m.Report.MSstats, "msstats", "", false, "create an output compatible with MSstats")
reportCmd.Flags().BoolVarP(&m.Report.MZID, "mzid", "", false, "create a mzID output")
reportCmd.Flags().BoolVarP(&m.Report.IonMob, "ionmobility", "", false, "forces the printing of the ion mobility column")
}

RootCmd.AddCommand(reportCmd)
Expand Down
3 changes: 2 additions & 1 deletion lib/aba/pro.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ func processProteinCombinedFile(a met.Abacus, database dat.Base) rep.CombinedPro

for i := range list {
for _, j := range database.Records {
if strings.Contains(j.OriginalHeader, list[i].ProteinName) && !strings.Contains(j.OriginalHeader, a.Tag) {
if strings.Contains(j.OriginalHeader, list[i].ProteinName) && strings.HasPrefix(j.OriginalHeader, list[i].ProteinID) && !strings.Contains(j.OriginalHeader, a.Tag) {
//if strings.Contains(j.OriginalHeader, list[i].ProteinName) && !strings.Contains(j.OriginalHeader, a.Tag) {
list[i].ProteinName = j.PartHeader
list[i].ProteinID = j.ID
list[i].EntryName = j.EntryName
Expand Down
4 changes: 2 additions & 2 deletions lib/dat/dat_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ func TestBase_ProcessDB(t *testing.T) {
}
d.ProcessDB(tt.args.file, tt.args.decoyTag)

if len(d.Records) != 20371 {
t.Errorf("Number of FASTA entries is incorrect, got %d, want %d", len(d.Records), 20371)
if len(d.Records) != 20360 {
t.Errorf("Number of FASTA entries is incorrect, got %d, want %d", len(d.Records), 20360)
}
})
}
Expand Down
12 changes: 9 additions & 3 deletions lib/dat/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,15 @@ func ProcessGeneric(k, v, decoyTag string) Record {
idm := idReg.FindStringSubmatch(k)
e.ID = idm[1]

e.Description = ""
e.EntryName = ""
part := strings.Split(k, " ")

if len(part) > 1 {
e.Description = part[1]
} else {
e.Description = k
}

e.EntryName = k
e.GeneNames = ""
e.Organism = ""
e.SequenceVersion = ""
Expand All @@ -405,7 +412,6 @@ func ProcessGeneric(k, v, decoyTag string) Record {
e.Length = len(v)
e.OriginalHeader = k

part := strings.Split(k, " ")
e.PartHeader = part[0]

if strings.HasPrefix(k, decoyTag) {
Expand Down
Loading

0 comments on commit 03b93d8

Please sign in to comment.