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

reordering struct fields #307

Merged
merged 1 commit into from
Jan 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions lib/fil/razor.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import (
// RazorCandidate is a peptide sequence to be evaluated as a razor
type RazorCandidate struct {
Sequence string
MappedProtein string
MappedproteinsSID map[string]string
MappedProteinsTNP map[string]int
MappedProteinsW map[string]float64
MappedProteinsGW map[string]float64
MappedProteinsTNP map[string]int
MappedproteinsSID map[string]string
MappedProtein string
}

// a Map fo Razor candidates
Expand Down
2 changes: 1 addition & 1 deletion lib/gth/gth.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ type Release struct {
AssetsURL string `json:"assets_url"`
UploadURL string `json:"upload_url"`
HTMLURL string `json:"html_url"`
ID int `json:"id"`
TagName string `json:"tag_name"`
TargetCommitish string `json:"target_commitish"`
Name string `json:"name"`
ID int `json:"id"`
Draft bool `json:"draft"`
}

Expand Down
32 changes: 16 additions & 16 deletions lib/id/pep.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,50 +33,48 @@ type PepXML struct {
SpectraFile string
SearchEngine string
DecoyTag string
SearchParameters []spc.Parameter
Database string
Prophet string
Modifications mod.Modifications
Models []spc.DistributionPoint
PeptideIdentification PepIDList
SearchParameters []spc.Parameter
Models []spc.DistributionPoint
}

// PeptideIdentification struct
type PeptideIdentification struct {
Index uint32
Spectrum string
SpectrumFile string
Scan int
Peptide string
Protein string
ModifiedPeptide string
CompesationVoltage string
AlternativeProteins map[string]int
AssumedCharge uint8
LocalizationRange string
MSFragerLocalization string
MSFraggerLocalizationScoreWithPTM string
MSFraggerLocalizationScoreWithoutPTM string
Spectrum string
SpectrumFile string
PrevAA string
NextAA string
AssumedCharge uint8
HitRank uint8
MissedCleavages uint8
NumberTolTerm uint8
NumberOfEnzymaticTermini uint8
IsRejected uint8
NumberTotalProteins uint16
TotalNumberIons uint16
NumberMatchedIons uint16
Index uint32
Scan int
NumberofMissedCleavages int
IsoMassD int
UncalibratedPrecursorNeutralMass float64
PrecursorNeutralMass float64
PrecursorExpMass float64
RetentionTime float64
CalcNeutralPepMass float64
Massdiff float64
LocalizedPTMSites map[string]int
LocalizedPTMMassDiff map[string]string
LocalizationRange string
MSFragerLocalization string
MSFraggerLocalizationScoreWithPTM string
MSFraggerLocalizationScoreWithoutPTM string
Probability float64
IsoMassD int
Expectation float64
Xcorr float64
DeltaCN float64
Expand All @@ -88,7 +86,9 @@ type PeptideIdentification struct {
DiscriminantValue float64
Intensity float64
IonMobility float64
IsRejected uint8
LocalizedPTMMassDiff map[string]string
LocalizedPTMSites map[string]int
AlternativeProteins map[string]int
Modifications mod.Modifications
}

Expand Down
24 changes: 12 additions & 12 deletions lib/id/pro.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
type ProtXML struct {
FileName string
DecoyTag string
Groups GroupList
RunOptions string
Groups GroupList
}

// GroupIdentification tag
Expand All @@ -38,41 +38,41 @@ type GroupIdentification struct {

// ProteinIdentification struct
type ProteinIdentification struct {
GroupNumber uint32
GroupSiblingID string
ProteinName string
Description string
UniqueStrippedPeptides []string
Length string
UniqueStrippedPeptides []string
IndistinguishableProtein []string
GroupNumber uint32
TotalNumberPeptides int
Picked int
PercentCoverage float32
PctSpectrumIDs float32
GroupProbability float64
Probability float64
Confidence float64
TopPepProb float64
IndistinguishableProtein []string
TotalNumberPeptides int
PeptideIons []PeptideIonIdentification
HasRazor bool
Picked int
PeptideIons []PeptideIonIdentification
}

// PeptideIonIdentification struct
type PeptideIonIdentification struct {
PeptideSequence string
ModifiedPeptide string
PeptideParentProtein []string
Charge uint8
InitialProbability float64
Weight float64
GroupWeight float64
CalcNeutralPepMass float64
NumberOfEnzymaticTermini uint8
NumberOfInstances int
SharedParentProteins int
Razor int
InitialProbability float64
Weight float64
GroupWeight float64
CalcNeutralPepMass float64
IsNondegenerateEvidence bool
IsUnique bool
PeptideParentProtein []string
Labels iso.Labels
Modifications mod.Modifications
}
Expand Down
126 changes: 61 additions & 65 deletions lib/met/met.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,74 +88,79 @@ type Database struct {
// Comet options and parameters
type Comet struct {
Param string `yaml:"param"`
ParamFile []byte
RawExtension string `yaml:"raw"`
RawFiles []string
ParamFile []byte
Print bool
NoIndex bool `yaml:"noindex"`
}

// MSFragger options and parameters
type MSFragger struct {
JarPath string `yaml:"path"`
Memory int `yaml:"memory"`
Threads int `yaml:"num_threads"`
Extension string `yaml:"extension"`
DataType int `yaml:"data_type"`
DatabaseName string `yaml:"database_name"`
PrecursorMassLower int `yaml:"precursor_mass_lower"`
PrecursorMassUpper int `yaml:"precursor_mass_upper"`
PrecursorMassUnits int `yaml:"precursor_mass_units"`
PrecursorTrueTolerance int `yaml:"precursor_true_tolerance"`
PrecursorTrueUnits int `yaml:"precursor_true_units"`
FragmentMassTolerance float64 `yaml:"fragment_mass_tolerance"`
FragmentMassUnits int `yaml:"fragment_mass_units"`
CalibrateMass int `yaml:"calibrate_mass"`
UseAllModsInFirstSearch int `yaml:"use_all_mods_in_first_search"`
WriteCalibratedMGF int `yaml:"write_calibrated_mgf"`
DecoyPrefix string `yaml:"decoy_prefix"`
EvaluateMassCalibration int `yaml:"evaluate_mass_calibration"`
Deisotope int `yaml:"deisotope"`
Deneutralloss int `yaml:"deneutralloss"`
IsotopeError string `yaml:"isotope_error"`
MassOffsets string `yaml:"mass_offsets"`
PrecursorMassMode string `yaml:"precursor_mass_mode"`
LocalizeDeltaMass int `yaml:"localize_delta_mass"`
DeltaMassExcludeRanges string `yaml:"delta_mass_exclude_ranges"`
FragmentIonSeries string `yaml:"fragment_ion_series"`
IonSeriesDefinitions string `yaml:"ion_series_definitions"`

SearchEnzymeName1 string `yaml:"search_enzyme_name_1"`
SearchEnzymeCut1 string `yaml:"search_enzyme_cut_1"`
SearchEnzymeNocut1 string `yaml:"search_enzyme_nocut_1"`
AllowedMissedCleavage1 int `yaml:"allowed_missed_cleavage_1"`
SearchEnzymeSense1 string `yaml:"search_enzyme_sense_1"`

SearchEnzymeName2 string `yaml:"search_enzyme_name_2"`
SearchEnzymeCut2 string `yaml:"search_enzyme_cut_2"`
SearchEnzymeNocut2 string `yaml:"search_enzyme_nocut_2"`
AllowedMissedCleavage2 int `yaml:"allowed_missed_cleavage_2"`
SearchEnzymeSense2 string `yaml:"search_enzyme_sense_2"`

//SearchEnzymeName string `yaml:"search_enzyme_name"`
//SearchEnzymeCutafter string `yaml:"search_enzyme_cutafter"`
//SearchEnzymeButNotAfter string `yaml:"search_enzyme_butnotafter"`
//AllowedMissedCleavage int `yaml:"allowed_missed_cleavage"`

JarPath string `yaml:"path"`
Extension string `yaml:"extension"`
DatabaseName string `yaml:"database_name"`
DecoyPrefix string `yaml:"decoy_prefix"`
IsotopeError string `yaml:"isotope_error"`
MassOffsets string `yaml:"mass_offsets"`
PrecursorMassMode string `yaml:"precursor_mass_mode"`
DeltaMassExcludeRanges string `yaml:"delta_mass_exclude_ranges"`
FragmentIonSeries string `yaml:"fragment_ion_series"`
IonSeriesDefinitions string `yaml:"ion_series_definitions"`
SearchEnzymeSense1 string `yaml:"search_enzyme_sense_1"`
SearchEnzymeName2 string `yaml:"search_enzyme_name_2"`
SearchEnzymeCut2 string `yaml:"search_enzyme_cut_2"`
SearchEnzymeNocut2 string `yaml:"search_enzyme_nocut_2"`
SearchEnzymeName1 string `yaml:"search_enzyme_name_1"`
SearchEnzymeCut1 string `yaml:"search_enzyme_cut_1"`
SearchEnzymeNocut1 string `yaml:"search_enzyme_nocut_1"`
SearchEnzymeSense2 string `yaml:"search_enzyme_sense_2"`
OutputFormat string `yaml:"output_format"`
PrecursorCharge string `yaml:"precursor_charge"`
DigestMassRange string `yaml:"digest_mass_range"`
ClearMzRange string `yaml:"clear_mz_range"`
RemovePrecursorRange string `yaml:"remove_precursor_range"`
LabileSearchMode string `yaml:"labile_search_mode"`
RestrictDeltaMassTo string `yaml:"restrict_deltamass_to"`
DiagnosticFragments string `yaml:"diagnostic_fragments"`
YTypeMasses string `yaml:"Y_type_masses"`
VariableMod01 string `yaml:"variable_mod_01"`
VariableMod02 string `yaml:"variable_mod_02"`
VariableMod03 string `yaml:"variable_mod_03"`
VariableMod04 string `yaml:"variable_mod_04"`
VariableMod05 string `yaml:"variable_mod_05"`
VariableMod06 string `yaml:"variable_mod_06"`
VariableMod07 string `yaml:"variable_mod_07"`
RawFiles []string
Memory int `yaml:"memory"`
Threads int `yaml:"num_threads"`
DataType int `yaml:"data_type"`
PrecursorMassLower int `yaml:"precursor_mass_lower"`
PrecursorMassUpper int `yaml:"precursor_mass_upper"`
PrecursorMassUnits int `yaml:"precursor_mass_units"`
PrecursorTrueTolerance int `yaml:"precursor_true_tolerance"`
PrecursorTrueUnits int `yaml:"precursor_true_units"`
FragmentMassUnits int `yaml:"fragment_mass_units"`
CalibrateMass int `yaml:"calibrate_mass"`
UseAllModsInFirstSearch int `yaml:"use_all_mods_in_first_search"`
WriteCalibratedMGF int `yaml:"write_calibrated_mgf"`
EvaluateMassCalibration int `yaml:"evaluate_mass_calibration"`
Deisotope int `yaml:"deisotope"`
Deneutralloss int `yaml:"deneutralloss"`
LocalizeDeltaMass int `yaml:"localize_delta_mass"`
AllowedMissedCleavage1 int `yaml:"allowed_missed_cleavage_1"`
AllowedMissedCleavage2 int `yaml:"allowed_missed_cleavage_2"`
NumEnzymeTermini int `yaml:"num_enzyme_termini"`
ClipNTermM int `yaml:"clip_nTerm_M"`
AllowMultipleVariableModsOnResidue int `yaml:"allow_multiple_variable_mods_on_residue"`
MaxVariableModsPerPeptide int `yaml:"max_variable_mods_per_peptide"`
MaxVariableModsCombinations int `yaml:"max_variable_mods_combinations"`
OutputFormat string `yaml:"output_format"`
OutputReportTopN int `yaml:"output_report_topN"`
OutputMaxExpect int `yaml:"output_max_expect"`
ReportAlternativeProteins int `yaml:"report_alternative_proteins"`
OverrideCharge int `yaml:"override_charge"`
PrecursorCharge string `yaml:"precursor_charge"`
DigestMinLength int `yaml:"digest_min_length"`
DigestMaxLength int `yaml:"digest_max_length"`
DigestMassRange string `yaml:"digest_mass_range"`
MaxFragmentCharge int `yaml:"max_fragment_charge"`
TrackZeroTopN int `yaml:"track_zero_topN"`
ZeroBinAcceptExpect int `yaml:"zero_bin_accept_expect"`
Expand All @@ -166,24 +171,12 @@ type MSFragger struct {
UseTopNPeaks int `yaml:"use_topN_peaks"`
MinFragmentsModelling int `yaml:"min_fragments_modelling"`
MinMatchedFragments int `yaml:"min_matched_fragments"`
MinimumRatio float64 `yaml:"minimum_ratio"`
ClearMzRange string `yaml:"clear_mz_range"`
RemovePrecursorPeak int `yaml:"remove_precursor_peak"`
RemovePrecursorRange string `yaml:"remove_precursor_range"`
IntensityTransform int `yaml:"intensity_transform"`
MassDiffToVariableMod int `yaml:"mass_diff_to_variable_mod"`
LabileSearchMode string `yaml:"labile_search_mode"`
RestrictDeltaMassTo string `yaml:"restrict_deltamass_to"`
DiagnosticIntensityFilter int `yaml:"diagnostic_intensity_filter"`
DiagnosticFragments string `yaml:"diagnostic_fragments"`
YTypeMasses string `yaml:"Y_type_masses"`
VariableMod01 string `yaml:"variable_mod_01"`
VariableMod02 string `yaml:"variable_mod_02"`
VariableMod03 string `yaml:"variable_mod_03"`
VariableMod04 string `yaml:"variable_mod_04"`
VariableMod05 string `yaml:"variable_mod_05"`
VariableMod06 string `yaml:"variable_mod_06"`
VariableMod07 string `yaml:"variable_mod_07"`
FragmentMassTolerance float64 `yaml:"fragment_mass_tolerance"`
MinimumRatio float64 `yaml:"minimum_ratio"`
AddCtermPeptide float64 `yaml:"add_Cterm_peptide"`
AddCtermProtein float64 `yaml:"add_Cterm_protein"`
AddNTermPeptide float64 `yaml:"add_Nterm_peptide"`
Expand All @@ -209,8 +202,11 @@ type MSFragger struct {
AddTryptophan float64 `yaml:"add_W_tryptophan"`
AddTyrosine float64 `yaml:"add_Y_tyrosine"`
Param string `yaml:"param"`
RawFiles []string
ParamFile []byte
//SearchEnzymeName string `yaml:"search_enzyme_name"`
//SearchEnzymeCutafter string `yaml:"search_enzyme_cutafter"`
//SearchEnzymeButNotAfter string `yaml:"search_enzyme_butnotafter"`
//AllowedMissedCleavage int `yaml:"allowed_missed_cleavage"`
}

// PeptideProphet options and parameters
Expand Down Expand Up @@ -421,9 +417,9 @@ type Report struct {
// TMTIntegrator options and parameters
type TMTIntegrator struct {
JarPath string `yaml:"path"`
Memory int `yaml:"memory"`
Param string `yaml:"param"`
Files []string
Memory int `yaml:"memory"`
ParamFile []byte
}

Expand Down
6 changes: 3 additions & 3 deletions lib/mod/mod.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ type Modification struct {
Variable string
Position string
Type string
MonoIsotopicMass float64
AverageMass float64
MassDiff float64
AminoAcid string
IsProteinTerminus string
Terminus string
MonoIsotopicMass float64
AverageMass float64
MassDiff float64
IsobaricMods map[string]float64
}

Expand Down
12 changes: 6 additions & 6 deletions lib/mzn/mzn.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,26 +58,26 @@ type Precursor struct {

// Mz struct
type Mz struct {
Stream []byte
DecodedStream []float64
Precision string
Compression string
Stream []byte
DecodedStream []float64
}

// Intensity struct
type Intensity struct {
Stream []byte
DecodedStream []float64
Precision string
Compression string
Stream []byte
DecodedStream []float64
}

// IonMobility struct
type IonMobility struct {
Stream []byte
DecodedStream []float64
Precision string
Compression string
Stream []byte
DecodedStream []float64
}

func (a Spectra) Len() int { return len(a) }
Expand Down
Loading