Skip to content

Commit

Permalink
fixing ineff. assig.
Browse files Browse the repository at this point in the history
  • Loading branch information
Felipe da Veiga Leprevost committed May 18, 2020
1 parent 42b2ee8 commit 19bbbd2
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
15 changes: 9 additions & 6 deletions lib/ext/comet/win/win.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,33 @@ func WinParameterFile(winParam string) {
return
}

// Win32 deploys win32 bits comt parameter file
// Win32 deploys win32 bits comet parameter file
func Win32(win32 string) {

bin, e := Asset("comet.2019011.win32.exe")
if e != nil {
msg.DeployAsset(errors.New("Comet Windows binary file"), "fatal")
msg.DeployAsset(errors.New("Comet Windows binary file"), "Cannot read Comet bin")
}

e = ioutil.WriteFile(win32, bin, sys.FilePermission())
if e != nil {
msg.DeployAsset(errors.New("Comet Windows binary file"), "fatal")
msg.DeployAsset(errors.New("Comet Windows binary file"), "Cannot deploy Comet")
}

return
}

// Win64 deploys win64 bits comt parameter file
// Win64 deploys win64 bits comet parameter file
func Win64(win64 string) {

bin, e := Asset("comet.2019011.win64.exe")
e = ioutil.WriteFile(win64, bin, sys.FilePermission())
if e != nil {
msg.DeployAsset(errors.New("Comet Windows binary file"), "Cannot read Comet bin")
}

e = ioutil.WriteFile(win64, bin, sys.FilePermission())
if e != nil {
msg.DeployAsset(errors.New("Comet Windows binary file"), "fatal")
msg.DeployAsset(errors.New("Comet Windows binary file"), "Cannot deploy Comet")
}

return
Expand Down
2 changes: 1 addition & 1 deletion lib/fin/fin.go
Original file line number Diff line number Diff line change
Expand Up @@ -1241,7 +1241,7 @@ func binaryread(r io.Reader, data interface{}) {
// data, and returns the position in the file afterwards
func readAt(rs io.ReadSeeker, pos uint64, v Version, data reader) uint64 {

spos, e1 := rs.Seek(int64(pos), 0)
_, e1 := rs.Seek(int64(pos), 0)
if e1 != nil {
msg.Custom(errors.New("error seeking file"), "fatal")
}
Expand Down
3 changes: 2 additions & 1 deletion lib/id/pep.go
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,8 @@ func printModel(v, path string, xAxis, obs, pos, neg []float64) {
func tdclassifier(p PeptideIdentification, tag string) bool {

// default for TRUE ( DECOY)
var class = true
//var class = true
var class bool

if strings.HasPrefix(string(p.Protein), tag) {
class = true
Expand Down
10 changes: 5 additions & 5 deletions lib/qua/qua.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func RunIsobaricLabelQuantification(p met.Quantify, mods bool) met.Quantify {

mappedPurity := calculateIonPurity(p.Dir, p.Format, mz, sourceMap[sourceList[i]])

var labels = make(map[string]iso.Labels)
var labels map[string]iso.Labels
if p.Level == 3 {
labels = prepareLabelStructureWithMS3(p.Dir, p.Format, p.Brand, p.Plex, p.Tol, mz)

Expand All @@ -122,7 +122,7 @@ func RunIsobaricLabelQuantification(p met.Quantify, mods bool) met.Quantify {
psmMap[j.Spectrum] = psm
}
}
mappedPurity = nil
//mappedPurity = nil

for _, j := range mappedPSM {
v, ok := psmMap[j.Spectrum]
Expand All @@ -132,7 +132,7 @@ func RunIsobaricLabelQuantification(p met.Quantify, mods bool) met.Quantify {
psmMap[j.Spectrum] = psm
}
}
mappedPSM = nil
//mappedPSM = nil

}

Expand All @@ -143,7 +143,7 @@ func RunIsobaricLabelQuantification(p met.Quantify, mods bool) met.Quantify {
evi.PSM[i].Labels = v.Labels
}
}
psmMap = nil
//psmMap = nil

// classification and filtering based on quality filters
logrus.Info("Filtering spectra for label quantification")
Expand Down Expand Up @@ -186,7 +186,7 @@ func RunIsobaricLabelQuantification(p met.Quantify, mods bool) met.Quantify {
func RunBioQuantification(c met.Data) {

// create clean reference db for clustering
clusterFasta := createCleanDataBaseReference(c.UUID, c.Temp)
//clusterFasta := createCleanDataBaseReference(c.UUID, c.Temp)

// run cdhit, create cluster file
logrus.Info("Clustering")
Expand Down

0 comments on commit 19bbbd2

Please sign in to comment.