Skip to content

Commit 87bf339

Browse files
committed
wip
1 parent d8413d6 commit 87bf339

4 files changed

Lines changed: 83 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: build
2+
3+
on:
4+
push:
5+
workflow_dispatch:
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
build:
12+
name: ${{ matrix.goos }}/${{ matrix.goarch }}
13+
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
include:
18+
- goos: linux
19+
goarch: amd64
20+
ext: ''
21+
- goos: windows
22+
goarch: amd64
23+
ext: '.exe'
24+
25+
steps:
26+
- name: Check out code
27+
uses: actions/checkout@v4
28+
29+
- name: Set up Go
30+
uses: actions/setup-go@v5
31+
with:
32+
go-version: '1.25'
33+
34+
- name: Get dependencies
35+
run: go mod download
36+
37+
- name: Unzip embedded bindata
38+
run: |
39+
unzip -o lib/dat/bindata.go.zip -d lib/dat/
40+
unzip -o lib/ext/cdhit/unix/bindata.go.zip -d lib/ext/cdhit/unix/
41+
unzip -o lib/ext/cdhit/win/bindata.go.zip -d lib/ext/cdhit/win/
42+
unzip -o lib/ext/comet/unix/bindata.go.zip -d lib/ext/comet/unix/
43+
unzip -o lib/ext/comet/win/bindata.go.zip -d lib/ext/comet/win/
44+
unzip -o lib/ext/interprophet/unix/bindata.go.zip -d lib/ext/interprophet/unix/
45+
unzip -o lib/ext/interprophet/win/bindata.go.zip -d lib/ext/interprophet/win/
46+
unzip -o lib/ext/peptideprophet/unix/bindata.go.zip -d lib/ext/peptideprophet/unix/
47+
unzip -o lib/ext/peptideprophet/win/bindata.go.zip -d lib/ext/peptideprophet/win/
48+
unzip -o lib/ext/proteinprophet/unix/bindata.go.zip -d lib/ext/proteinprophet/unix/
49+
unzip -o lib/ext/proteinprophet/win/bindata.go.zip -d lib/ext/proteinprophet/win/
50+
unzip -o lib/ext/ptmprophet/unix/bindata.go.zip -d lib/ext/ptmprophet/unix/
51+
unzip -o lib/ext/ptmprophet/win/bindata.go.zip -d lib/ext/ptmprophet/win/
52+
unzip -o lib/obo/unimod/bindata.go.zip -d lib/obo/unimod/
53+
unzip -o lib/pip/bindata.go.zip -d lib/pip/
54+
55+
- name: Build
56+
env:
57+
CGO_ENABLED: '0'
58+
GOOS: ${{ matrix.goos }}
59+
GOARCH: ${{ matrix.goarch }}
60+
run: |
61+
BUILD=$(date +%Y%m%d%H%M)
62+
VERSION="${GITHUB_REF_NAME}-${GITHUB_SHA::7}"
63+
OUTPUT="philosopher-${GOOS}-${GOARCH}${{ matrix.ext }}"
64+
go build -trimpath \
65+
-ldflags "-w -s -X main.version=${VERSION} -X main.build=${BUILD}" \
66+
-o "${OUTPUT}" main.go
67+
ls -lh "${OUTPUT}"
68+
69+
- name: Upload artifact
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: philosopher-${{ matrix.goos }}-${{ matrix.goarch }}
73+
path: philosopher-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }}
74+
if-no-files-found: error

lib/id/pep.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ type PeptideIdentification struct {
8888
SPRank float64
8989
Hyperscore float64
9090
Nextscore float64
91+
BCS int
9192
SpectralSim float64
9293
Rtscore float64
9394
IMscore float64
@@ -496,6 +497,9 @@ func processSpectrumQuery(sq spc.SpectrumQuery, mods mod.Modifications, decoyTag
496497
} else if string(j.Name) == "nextscore" {
497498
value, _ := strconv.ParseFloat(j.Value, 64)
498499
psm.Nextscore = value
500+
} else if string(j.Name) == "bcs" {
501+
value, _ := strconv.Atoi(j.Value)
502+
psm.BCS = value
499503
} else if string(j.Name) == "spectralsim" {
500504
value, _ := strconv.ParseFloat(j.Value, 64)
501505
psm.SpectralSim = value

lib/rep/psm.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ func (evi *Evidence) AssemblePSMReport(pep id.PepIDList, decoyTag string) {
5757
p.SPRank = i.SPRank
5858
p.Hyperscore = i.Hyperscore
5959
p.Nextscore = i.Nextscore
60+
p.BCS = i.BCS
6061
p.SpectralSim = i.SpectralSim
6162
p.Rtscore = i.Rtscore
6263
p.IMscore = i.IMscore
@@ -237,7 +238,7 @@ func (evi PSMEvidenceList) PSMReport(workspace, brand, decoyTag string, channels
237238
header += "\tIMScore"
238239
}
239240

240-
header += "\tExpectation\tHyperscore\tNextscore\tProbability\tQvalue\tNumber of Enzymatic Termini\tNumber of Missed Cleavages\tProtein Start\tProtein End\tIntensity\tAssigned Modifications\tObserved Modifications"
241+
header += "\tExpectation\tHyperscore\tNextscore\tBCS\tProbability\tQvalue\tNumber of Enzymatic Termini\tNumber of Missed Cleavages\tProtein Start\tProtein End\tIntensity\tAssigned Modifications\tObserved Modifications"
241242

242243
if hasClass {
243244
header += "\tClass"
@@ -611,11 +612,12 @@ func (evi PSMEvidenceList) PSMReport(workspace, brand, decoyTag string, channels
611612
)
612613
}
613614

614-
line = fmt.Sprintf("%s\t%.14f\t%.4f\t%.4f\t%.4f\t%.14f\t%d\t%d\t%d\t%d\t%.4f\t%s\t%s",
615+
line = fmt.Sprintf("%s\t%.14f\t%.4f\t%.4f\t%d\t%.4f\t%.14f\t%d\t%d\t%d\t%d\t%.4f\t%s\t%s",
615616
line,
616617
i.Expectation,
617618
i.Hyperscore,
618619
i.Nextscore,
620+
i.BCS,
619621
i.Probability,
620622
i.Qvalue,
621623
i.NumberOfEnzymaticTermini,

lib/rep/rep.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ type PSMEvidence struct {
155155
SPRank float64
156156
Hyperscore float64
157157
Nextscore float64
158+
BCS int
158159
SpectralSim float64
159160
Rtscore float64
160161
IMscore float64

0 commit comments

Comments
 (0)