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

Update instrumentControl branch #4

Open
wants to merge 134 commits into
base: InstrumentControlOld
Choose a base branch
from

Conversation

avcarr2
Copy link
Owner

@avcarr2 avcarr2 commented May 21, 2022

No description provided.

acesnik and others added 30 commits March 9, 2022 12:05
* restructure base directory

* add github action workflows
* change directory before restore

* try coverlet.collector

* update nuget badge to have downloads

* codecov file location
* use nuget pack not dotnet pack
… etc.) (#609)

* correct Within calculation

* update unit tests

* join products and cleave once products

* unit tests for single cleavage products

* remove unused test

* fix broken unit tests

* fix failing unit tests

* add biomarkers during protein db load and revert add during digest

* auto add biomarkers during protein database load if checked and revert biomarkers during digest

* do not write biomarkers to xml database

* default to retain methionine in biomarker generation

* unit testage

* increase unit test coverge

* even more unit test coverage

* more unit tests

* codemaid

* addressedReviewerComments

Co-authored-by: MICHAEL SHORTREED <[email protected]>
Co-authored-by: acesnik <[email protected]>
… for tests (#620)

* use nuget pack not dotnet pack

* name

* setup nuget separately

* change release name back

* readme

* image before releases

* use multiline

* use line concatenation for a couple places

* no slash

* use &&

* break up steps more
* correct Within calculation

* update unit tests

* first correct top-down biomarker test

* remove unused test code

* quotable protease

* unquotable

* add full length proteoform proteolysis products for biomarker search with  unit tests

* new strategy for adding proteolysis products

* more complete biomarker addition

* works for protein.xml databases

* add unit test biomarkers with xml database

* clean up

* more clean up

* fix unit test

* adjust biomarker generation for three initiator methionine behaviors (cleave, retain, variable)

* make sure decoy biomarkers for standard xml proteolysis products are generated

* deal appropriately w/ n-terminal methionine cleavage

* last litle unit test tweaks

* delete unused code

* add biomarkers during protein database load

* greater clarity for biomarker proteolysis product entries

* change digest for top-down biomarker search to resolve issues in MM

* bro. shouldn't have been that hard

* cleanup

* add unit test

* don't need to cover unit tests with unit tests

* increase unit test coverage of protein.cs

* codemaid

* biomarkers on protein with no methionine

* unit test booster

* ACs comments

* more summary statemsn

* deleted mzlib.sln scarry

Co-authored-by: MICHAEL SHORTREED <[email protected]>
* fix median polish bug when proteins cannot be quantified

* comment out protein quant intensity checks in some tests. add explainer comment
* correct Within calculation

* update unit tests

* first correct top-down biomarker test

* remove unused test code

* quotable protease

* unquotable

* add full length proteoform proteolysis products for biomarker search with  unit tests

* new strategy for adding proteolysis products

* more complete biomarker addition

* works for protein.xml databases

* add unit test biomarkers with xml database

* clean up

* more clean up

* fix unit test

* adjust biomarker generation for three initiator methionine behaviors (cleave, retain, variable)

* make sure decoy biomarkers for standard xml proteolysis products are generated

* deal appropriately w/ n-terminal methionine cleavage

* last litle unit test tweaks

* delete unused code

* add biomarkers during protein database load

* greater clarity for biomarker proteolysis product entries

* change digest for top-down biomarker search to resolve issues in MM

* bro. shouldn't have been that hard

* cleanup

* add unit test

* don't need to cover unit tests with unit tests

* increase unit test coverage of protein.cs

* codemaid

* biomarkers on protein with no methionine

* unit test booster

* ACs comments

* more summary statemsn

* deleted mzlib.sln scarry

* delete empty line

* c-terminal products w/ and w/o methionine

* delete remaining initiator meth behavior dependances

* remove reference to meth behavior in biomarker test functions

* fix effected unit tests

* fix more unit tests

* Biomarkers changed to Truncations

* Biomarker to truncation

* added method summaries

* MsDataScan tests to boost coverage

* more MsDataScan tests

* more MsDataFile tests

* delete unused comment

Co-authored-by: MICHAEL SHORTREED <[email protected]>
* net6.0

* merge upstream and update workflows

* use nuget pack not dotnet pack

* name

* setup nuget separately

* change release name back

* readme

* image before releases

* replace webclient with httpclient

* use multiline

* use line concatenation for a couple places

* no slash

* use &&

* break up steps more

* fix xml writer errors and such

* more fixes

* fix httpclient

* code cleanup

* add back comments

Co-authored-by: MICHAEL SHORTREED <[email protected]>
* correct Within calculation

* update unit tests

* first correct top-down biomarker test

* remove unused test code

* quotable protease

* unquotable

* add full length proteoform proteolysis products for biomarker search with  unit tests

* new strategy for adding proteolysis products

* more complete biomarker addition

* works for protein.xml databases

* add unit test biomarkers with xml database

* clean up

* more clean up

* fix unit test

* adjust biomarker generation for three initiator methionine behaviors (cleave, retain, variable)

* make sure decoy biomarkers for standard xml proteolysis products are generated

* deal appropriately w/ n-terminal methionine cleavage

* last litle unit test tweaks

* delete unused code

* add biomarkers during protein database load

* greater clarity for biomarker proteolysis product entries

* change digest for top-down biomarker search to resolve issues in MM

* bro. shouldn't have been that hard

* cleanup

* add unit test

* don't need to cover unit tests with unit tests

* increase unit test coverage of protein.cs

* codemaid

* biomarkers on protein with no methionine

* unit test booster

* ACs comments

* more summary statemsn

* deleted mzlib.sln scarry

* delete empty line

* c-terminal products w/ and w/o methionine

* delete remaining initiator meth behavior dependances

* remove reference to meth behavior in biomarker test functions

* fix effected unit tests

* fix more unit tests

* Biomarkers changed to Truncations

* Biomarker to truncation

* added method summaries

* MsDataScan tests to boost coverage

* more MsDataScan tests

* more MsDataFile tests

* delete unused comment

* deleting the last vestiges of the term biomarker

Co-authored-by: MICHAEL SHORTREED <[email protected]>
* correct Within calculation

* update unit tests

* this is the spot

* return null if bad scan

* unit test for skipping scan with missing spectrum

* updated unit test

* test update and comments

* remove unread scans

Co-authored-by: MICHAEL SHORTREED <[email protected]>
Co-authored-by: Anthony <[email protected]>
* correct Within calculation

* update unit tests

* this is the spot

* Added Kullback Leibler to spectrum similarity

* make sure numerator not zero in log

* dont allow negative mz or intensity values

* test for negative mz and intensity

* code format

Co-authored-by: MICHAEL SHORTREED <[email protected]>
* correct Within calculation

* update unit tests

* this is the spot

* searleMeasureOfSpectralSimilarity

* Searle Similarity for identical spectra is double.maxvalue

* eliminate unnecessary check

* ternary

* add comment

Co-authored-by: MICHAEL SHORTREED <[email protected]>
* First commit

* Improved test for SpectralEntropy

* Fixed what Shortreed broke

* Deleted redundant check in SpectralEntropy method

Co-authored-by: trishorts <[email protected]>
* correct Within calculation

* update unit tests

* this is the spot

* use legacy uniprot to temporarily fullfill download requests

Co-authored-by: MICHAEL SHORTREED <[email protected]>
* fixed queries

* Returned line to original
* Added hash for identifying matching targets and decoys

* Added hash codes to pair target peptides to their decoys.

* Cleaned up code

* Added comments to better annotate pairing.

Co-authored-by: zdanaceau <[email protected]>
* Added a function to generate decoys from scrambled targets.

* Added function to generate decoys by scrambling targets

* Fixed GetPercentIdentity to account for modifications and count cleavage motifs

* Fixed comments and cleaned up code

* Added more complex test cases

* Added insulin protein as a more complex example to scramble.

* Added target/decoy pairing to GetScrambledDecoyFromTarget

* Added a test to ensure that peptides are mirrored once the maximum number of scramble attempts is reached.

Co-authored-by: zdanaceau <[email protected]>
* correct Within calculation

* update unit tests

* this is the spot

* unused namespaces

* degree and star to ammonia and water

* waterAndAmmoniaLossProductTypeMethods

* ammonia and water loss fragment product ion unit tests

Co-authored-by: MICHAEL SHORTREED <[email protected]>
* correct Within calculation

* update unit tests

* this is the spot

* unused namespaces

* degree and star to ammonia and water

* waterAndAmmoniaLossProductTypeMethods

* ammonia and water loss fragment product ion unit tests

* works bro

* renamingBCproblemsInMM

Co-authored-by: MICHAEL SHORTREED <[email protected]>
* correct Within calculation

* update unit tests

* this is the spot

* fds

* final incremental changes

Co-authored-by: MICHAEL SHORTREED <[email protected]>
* correct Within calculation

* update unit tests

* this is the spot

* add period tolerant get filename utility

* now handles compressed files skipping the compressed file extension

Co-authored-by: MICHAEL SHORTREED <[email protected]>
* correct Within calculation

* update unit tests

* this is the spot

* revert netSerializer and select AnyCPU

* revert testadapter to nunit3testadapter

* f

Co-authored-by: MICHAEL SHORTREED <[email protected]>
* Added correction to KullbackLeibler

* Added using clause to LoadPsiMod to fix failing test

* KullbackLeibler now returns null in situations where no peaks match

* Added optional param to KullbackLeibler to fine tune correction values for 0 peaks

* deleted unreachable code in KL

* added missing return

* Restructured for clarity

* Reworked Kullback Leibler to prevent modification of YArrays

* Commented out test lines

* Removed duplicated code in SpectralSim, refactored IntensityPairs to take optional Array arguments
* Added Spectral averaging extensions to mzlib
tested a few classes including Spectra Outputting

* Tested Spectral Averaging Extensions

* Fixed broken tests

* Added additional Test Coverage

* Adjusted code coverage to not look at the tests

* Dealt with some possible null reference warnings and renamed tests to fit convention

* One more potential null error

* Changed Dynamic MzML test to wait for the writing to finish and not repeat a test case

* Implemented Hash Code for MzSpectrum to resolve error and Alex's comment

* Removed Json as it was not utilized and unnecessary, adjusted the exceptions being thrown to be MzLib Exceptions

* Changed a few more exceptions to MzLib Exceptions

* Adjusted configuration manager
* correct Within calculation

* update unit tests

* this is the spot

* remove trailing tabs from quantified peaks peptides and proteins

* flashlfq ToString unit tests

Co-authored-by: MICHAEL SHORTREED <[email protected]>
… negative values. (#659)

* Fixed Obo parsing for mods.
mzhastings and others added 30 commits September 6, 2024 11:08
* created interface IQuantifiable

* created IQuantifiableRecord and IQuantifiable interfaces, deleted origional IQuantifiable in FlashLFQ

* created IdentificationAdapter class and edited IquantifiableRecord interface

* added implementation of IQuantifiableRecord to MSFraggerPSM abd wrote tests

* created test for IdentificationAdapter method

* created Dictionary linking MSFragger file names to their corresponding full file paths

* edited FileNameToFilePath method in MSFraggerPsm to account for MSFragger file name additions and wrote tests

* edited MsFraggerPsm to account for differences in result files (probabilty v peptideprophetprobability)

* removed unneeded test from TestQuantifiedPeaks

* made recommended changes by reviewers

* made recommended changes

* made recommended changes

---------

Co-authored-by: trishorts <[email protected]>
Co-authored-by: Nic Bollis <[email protected]>
* Modified decoy scrambler to no longer use static Random generator

* Added additional tests

* Better tests
* Added in base classes

* Implemented all tests

* Made initial tests pass

* Removed unnecessary namespaces

* Expanded test coverage

* Responded to Alex Comments

* Add RNA support: loading, parsing, and decoy generation

Introduced support for handling RNA data within the UsefulProteomicsDatabases project. Key changes include:

- Added `Transcriptomics\TestData` folder to `Test.csproj`.
- Changed access modifiers in `ProteinDbLoader.cs` to internal.
- Added `using` directives for `Transcriptomics` in `ProteinXmlEntry.cs`.
- Introduced methods `ParseRnaEndElement` and `ParseRnaEntryEndElement` in `ProteinXmlEntry.cs`.
- Modified `ParseAnnotatedMods` to check for RNA modifications.
- Added project reference to `Transcriptomics.csproj` in `UsefulProteomicsDatabases.csproj`.
- Added `ClassExtensions.cs` with `CreateNew` method for nucleic acids.
- Added `RnaDbLoader.cs` for RNA database loading.
- Added `RnaDecoyGenerator.cs` for generating decoy RNA sequences.

* Add new properties and caching to oligo digestion

Updated `using` directives in `TestDigestion.cs` and `OligoWithSetMods.cs` to include necessary namespaces. Added assertions in `TestDigestion.cs` for `SequenceWithChemicalFormulas` and `FullSequenceWithMassShift`. Changed `namespace` in `OligoWithSetMods.cs` to `Transcriptomics.Digestion`. Implemented and cached `SequenceWithChemicalFormulas` property in `OligoWithSetMods.cs`.

* Add RNA sequence and database handling and related test cases

- Added new files `ModomicsUnmodifiedTrimmed.fasta` and `ModomicsUnmodifiedTrimmed.fasta.gz` to `Test.csproj` with `CopyToOutputDirectory` set to `PreserveNewest`.
- Removed the `Transcriptomics\TestData` folder from `Test.csproj`.
- Introduced `Transcribe` method in `ClassExtensions.cs` for DNA to RNA transcription.
- Added summary comment to `NucleolyticOligo` class in `NucleolyticOligo.cs`.
- Added `ApplyRegex` method in `FastaHeaderFieldRegex.cs`.
- Introduced `ProteinDbWriter` class in `ProteinDbWriter.cs` for writing protein and nucleic acid databases.
- Modified `GetModsForThisProtein` to `GetModsForThisBioPolymer` in `ProteinDbWriter.cs`.
- Added `RnaDbLoader` class in `RnaDbLoader.cs` for RNA FASTA header detection and sequence loading.
- Updated user dictionary in `mzLib.sln.DotSettings` with new terms.
- Added test cases in `TestDbLoader.cs` for RNA database loading and header detection.
- Introduced `TestDecoyGeneration` class in `TestDecoyGenerator.cs` for RNA decoy generation tests.
- Added RNA sequence file `ModomicsUnmodifiedTrimmed.fasta` and its compressed version.

* Refactor and enhance RNA and oligo handling in tests

- Added `using` directives for `Transcriptomics.Digestion` and `UsefulProteomicsDatabases.Transcriptomics` in `TestDecoyGenerator.cs`.
- Introduced `TestCreateNew` in `TestDecoyGenerator.cs` to verify RNA and oligo creation.
- Added `using` directive for `MzLibUtil` in `TestDigestion.cs`.
- Added a test in `TestDigestion.cs` for exception handling with invalid sequences.
- Added `using` directives for `Omics` and related namespaces in `TestFragmentation.cs`.
- Modified `TestFragmentation_Modified` in `TestFragmentation.cs` to use `OligoWithSetMods` directly and added assertions.
- Updated `ClassExtensions.cs` to allow setting `isDecoy` in new `RNA` objects.
- Refactored `OligoWithSetMods.cs` to return a dictionary from `GetModsAfterDeserialization`.
- Updated `OligoWithSetMods.cs` to initialize `_allModsOneIsNterminus` using the returned dictionary.

* Broke out TerminusSpecificProductTypes class and removed unnecessary namespaces

* Update ProteinXmlEntry.cs

* Added gene name to RNA constructore

* Added gene name to RNA constructore

* Refactor and enhance exception handling and tests

Refactored constructors, improved exception handling, and added comprehensive tests across multiple files. Key changes include:

- `MzLibException.cs`: Updated constructor to include `innerException`.
- `TestDecoyGenerator.cs`: Added assertions for `CreateNew` method.
- `TestDigestion.cs`: Added assertions and new test for RNA digestion exception.
- Refactored modification lists and added various tests for modifications.
- `TestNucleicAcid.cs`: Refactored methods, adjusted precision, and updated terminus assignments.
- `NucleolyticOligo.cs`: Changed parameter types, updated comments, and improved variable names.
- `OligoWithSetMods.cs`: Enhanced exception messages and updated modification location checks.
- `NucleicAcid.cs`: Added `using` directive, changed exception type, and refactored methods.
- `mzLib.sln.DotSettings`: Updated user dictionary entries.

* Add test data files and methods for RNA sequence handling

Added new test data files (`20mer1.fasta`, `20mer1.fasta.gz`, `20mer1.xml`, `20mer1.xml.gz`) to the `Transcriptomics\TestData` directory in the `Test.csproj` file, ensuring they are copied to the output directory. Introduced `TestDbReadingDifferentExtensions` in `TestDbLoader.cs` to verify RNA database reading from various formats. Added `TestDigestionMaxIsoforms` in `TestDigestion.cs` to test RNA sequence digestion with max isoforms. Updated `WriteNucleicAcidXmlDatabase` in `ProteinDbWriter.cs` with remarks for future implementation. Added a TODO in `RnaDecoyGenerator.cs` regarding palindromic sequences' impact on fragment ions. Included new RNA sequence data in test files for validation.

* Added test coverage to the localize method within BioPolymerWithSetMods

---------

Co-authored-by: Nic Bollis <[email protected]>
* began neutral mz spectrum

* Refactor visibility and clean up deconvolution code

Changed `ClassicDeconvolutionAlgorithm`, `DeconvolutionAlgorithm`, and `ExampleNewDeconvolutionAlgorithmTemplate` classes and their members from `public` to `internal` to restrict visibility within the assembly. Added summary comment to `DeconvolutionAlgorithm` class. Refactored `Deconvoluter` class to remove unnecessary `using` directives and simplify the `Deconvolute` method by removing switch-case logic. Updated `IsotopicEnvelope` class by removing `MassIndex` and `StDev` properties, and modified constructor and `ScoreIsotopeEnvelope` method accordingly. Updated `MzSpectrum` class to use `StandardDeviation` extension method from `Easy.Common.Extensions`. Removed various unnecessary `using` directives from multiple files.

* Finish NeutralMassSpectrum

- Added `InternalsVisibleTo` entries for "Development" and "Test" in `MassSpectrometry.csproj`.
- Changed `MostAbundantObservedIsotopicMass` to `internal` in `IsotopicEnvelope.cs`.
- Added a new constructor to `IsotopicEnvelope` with monoisotopic mass, intensity, and charge.
- Added XML documentation and changed `GeneratePeak` to `protected virtual` in `MzSpectrum.cs`.
- Removed unused `using` directives in `MzSpectrum.cs` and `NeutralMzSpectrum.cs`.
- Modified `NeutralMzSpectrum` constructor to validate array lengths.
- Added `Charges` property to `NeutralMzSpectrum` and initialized it in the constructor.
- Overrode `GeneratePeak` in `NeutralMzSpectrum` to convert to a charged spectrum using `Charges`.

* Refactor Deconvoluter and rename NeutralMzSpectrum

Added necessary using directives in Deconvoluter.cs.
Modified Deconvoluter class for short-circuit deconvolution.
Removed redundant lines in Deconvoluter.cs.
Renamed NeutralMzSpectrum to NeutralMassSpectrum.
Updated constructor and references accordingly.

* added neutral mass file bool

* Adjsuted and tested neutral mass spectra

* Refactor Deconvoluter and add new tests

Refactored Deconvoluter.cs to use a foreach loop for yielding IsotopicEnvelopes. Reformatted multiple test methods in TestDeconvolution.cs for better readability. Added new test methods to validate Deconvolute with NeutralMassSpectrum, ensuring correct processing of spectra with various charge states and ranges.

* Make FirstX and LastX properties virtual; update tests

- Changed FirstX and LastX properties in MzSpectrum to virtual.
- Included MzLibUtil namespace in NeutralMassSpectrum class.
- Updated NeutralMassSpectrum constructor to set FirstX and LastX.
- Overrode FirstX and LastX in NeutralMassSpectrum class.
- Added test NeutralMassSpectrum_MzRange to validate m/z range.

* fixed nuspec

* Update mzLib.nuspec

---------

Co-authored-by: Nic Bollis <[email protected]>
…808)

in the MsDataScan constructor, replacing null values. This change
ensures that the ScanFilter property is properly set, improving the
accuracy and completeness of the scan data.

Co-authored-by: trishorts <[email protected]>
* created interface IQuantifiable

* created IQuantifiableRecord and IQuantifiable interfaces, deleted origional IQuantifiable in FlashLFQ

* created IdentificationAdapter class and edited IquantifiableRecord interface

* added implementation of IQuantifiableRecord to MSFraggerPSM abd wrote tests

* created test for IdentificationAdapter method

* created Dictionary linking MSFragger file names to their corresponding full file paths

* created outline for MsFraggerCombinedResults class

* finished MsFraggerCombinedResults and wrote test

* finished writing tests for MSFraggerCombinedResults

* edited big files

* edited FileNameToFilePath method in MSFraggerPsm to account for MSFragger file name additions and wrote tests

* edited MsFraggerPsm to account for differences in result files (probabilty v peptideprophetprobability)

* removed unneeded test from TestQuantifiedPeaks

* made recommended changes by reviewers

* made recommended changes

* made recommended changes

* added comments, made changes to FileNameToFilePath, and wrote test for FileNameToFilePath method w/out parameter

* file changed

* added experiment_annotation.tsv file to supported file types

* added test for FileNameToFilePath method with parameter

* wrote test for Experiment annotation file WriteResults

* resolved merge conflicts pt.2

* made recommended changes

* deleted comment

---------

Co-authored-by: trishorts <[email protected]>
Co-authored-by: Nic Bollis <[email protected]>
* started mod methods

* made the test pass

* Removed GetMods after deserialization method in favor of IBiopolymerWithSetMods backing method

* added throws to summary comment and extended mzlibexception to have an inner exception.

* Made inner exception nullable in MzLibException

---------

Co-authored-by: trishorts <[email protected]>
* Predict Retention Time function added

* breaking up mbr function, cont'd

* Decoy search is working

* Removed decoy toggle from GetIsotopicEnvelopes

* About to start MbrScorer refactor

* Refactor of MBR is working succesfully

* Deleted unused code

* got those decoys decoying naw mean

* refactore MBR to use concurrent dictionaries

* Test method with output

* Deleted unused fields and references to PearsonCorrelation in isotopicEnvelope class and CheckEnvelope method

* Deleted unused using statements in FlashLFQ engine

* Commented + removed unused variables for PredicteRetentionTime method

* Added comments, removed unused using statements

* Deleted unused variables

* Tests are still passing, but I'm about to break things

* Edited scoring method

* Umm, edited scoring, increased ppm tolerance, changed minimum rt width for variance and random rt transfers

* Did some weird filtering of donor files that should probably be reverted

* Peak Organism fix

* Basically works, QValue still underestimates

* Minor changes to peakfinding

* MSMS double checking

* Removed msms double checking

* Add check for MBR/MSMS peak collision

* Changed peak decoy selection method

* Optional PeptidesForMbr argument added, not covered in previous commit messages. Not actually this commit

* 5.3.2.4 - Changed randomRT selection method

* 5.3.2.5 - Minimum rtWindowWidth = 30 seconds

* Actually updated nuget

* 5.3.2.6 - Fixed decoy search. 2.4 and 2.5 are junk

* Changed MBR RT prediction method

* Fixed bug in rtPrediction

* Changed decoy search method and fixed issues with decoy rt scoring

* small changes to double check procedure

* Finished Merging in MbrFdr - mzLib 5341

* minor

* Actually changed nuspec

* Increased Rt Range

* Increased doublecheck count to 2500. mzLib 5343

* reduced window slightly. mzLib 5344

* amended rt scoring distribution in mbr scorer

* Mostly deleted stuff that will be introduced in a different commit

* Fixed all tests but one

* Fixed final test

* minor

* Merged in important parts from MbrDoubleCheck

* Changed decoy peak pairing

* finished update

* Updated anchors

* MbrThresholdAsParam

* Prevented decoys from being used for protein quant

* minor

* Deleted MSMS double check, changed scoring algo (removed intensity)

* reverted scoring function

* Fixed issue where decoy peaks were being used to calculate peptide intensities

* Fixed issue where low scoring peak traces could overwrite intensity values in MBR

* Removed minimum for RT window

* minor

* Fixed issue where MbrScorer would crash if too few anchor peptides pairs were passed in

* Finished test structure to use for creating censored mzMls

* Started and failed fragger stuff

* minor

* Added fragger experiment class

* Minor

* MaxQuant Reader started

* Fixed omics issue. Finished MaxQuantEvidence

* Added maxQuantEvidence, MqResultsFile, got it working

* minor

* minor

* changed nuspec

* minor

* Added renomalization function to FlashLFQ results, incremented nuspec

* minor

* idk

* minor

* Deleted unrelated changes

* Added FraggerMasterFile

* fixed errors introduced by merge

* idk

* Changing parameters

* about to break things

* Implemented better PIP donor selection

* Implemented PEP, and it's working

* Included ML.NET in nuspec

* idk

* Semi-supervised PEP

* Retrain within splits

* Working

* Added donor groups, pep is working

* Multiple peaks per donor

* Switched to 514, single donor training

* mzLib 315

* mzLib 315 for real

* Commit before decoy pairing

* Creating groups by decoy count only

* idk

* Implemented cursed algorithm for donorGroup partitioning

* mzLib 324

* mzLib 5.326

* 327

* mzLib 328

* mzLib 329

* nuspec

* Updates to window width calculations

* More changes to window width calculations

* nuspec update

* reverted donor exclusion window stuff

* Fixing merge conflicts one at a time

* minor

* Fixed errors, deleted tests with local file refs

* Merged master into Pip-ECHO FlashLFQ, fixed all the issues that arose.

* Reverted unneccessary changes

* minor

* minor

* minor

* Pep engine no longer static

* MlContext Seed

* xyz

* messed with the .yml

* More logs

* Even more logs

* dsf

* One million logs

* thread safe rng

* Fixed random issue, tests are passing

* More lgos

* Stabilized results?

* Fixed issues

* Deleted unused properties, changed ChromatographicPeak tostring

* Removed unintended changes

* started refactor

* Commit before breaking things

* Refactored donorGroup equalization, added test

* Finished tests for Pip-ECHO

* Added more unit tests, addressed Shortreed's comments

* Reverted changes to github actions .yml, updated MicrosoftML

* Update dotnet.yml

* Updated comments

* Revert nuspec

* Edited realDataMbr test to account for change to MbrScorer

* More changes to tests

* Minor

* Reverted unnecessary changes

* added additional comments

* More comments

* Fixed nuspec

---------

Co-authored-by: trishorts <[email protected]>
* Refactor for thread safety and performance

- Import `System.Collections.Concurrent` for concurrent collections.
- Change `averagedPeaks` from `List` to `ConcurrentBag` for thread safety.
- Move `binIncidences` array creation outside parallel loop to avoid redundancy.
- Modify `Parallel.ForEach` loop to use array length instead of list count.
- Remove `lock` around `averagedPeaks.Add` as `ConcurrentBag` is thread-safe.

* Test Project cleanup

* used a partitioner

* Oopsie

* Removed bag as it was an unnecessry structure
* Extended IBioPolymerWithSetMods interface, changed hashcode implementation in Peptide and Oligo wsetmods

* More changes

* Reverted most changes

* Fixed Equals methods

* Better hash, changed old tests

* Edited one last test

* Extended test coverage

* Updated tests

* Extended tests

* Tweaked tests

---------

Co-authored-by: trishorts <[email protected]>
* fixed bugs

* More Equality Tests

* One More Time

* Digestion Agent Equality and additional comments

* updated protease and expanded test coverage

---------

Co-authored-by: Nic Bollis <[email protected]>
…pheus (#818)

* Added second job

* comment out first job temp

* dsd

* dsd

* dsd

* workflow edit

* Workflow edit

* Workflow edit

* Workflow edit

* Workflow edit

* Workflow edit

* Workflow edit

* Workflow edit

* workflow edit

* workflow edit

* workflow edit

* workflow edit

* workflow edit

* workflow edit

* workflow edit

* workflow edit

* workflow edit

* workflow edit

* workflow edit

* workflow edit

* workflow edit

* workflow edit

* workflow edit

* workflow edit

* workflow edit
* Added parent accession check back to PeptideWithSetMods

* Added Test

* oopsies

* Refactor Equals methods and add IEquatable regions

Removed Equals from IBioPolymerWithSetMods interface in Omics.
Updated Equals in PeptideWithSetModifications to check OneBasedStartResidue and Parent?.Accession.
Updated Equals in OligoWithSetMods to check FullSequence and DigestionParams?.DigestionAgent.
Added IEquatable regions to PeptideWithSetModifications and OligoWithSetMods.
Organized Equals methods with #region IEquatable directives.

* workflow edit

* Even more equality tetsts

* adjusted oligo with set mods

* ugh

---------

Co-authored-by: Nic Bollis <[email protected]>
Co-authored-by: Alex <[email protected]>
* Started test

* Fixed equality by reference in IBioPolymer Equals

* Undid cherrypick, finished test

* Fixed ProteinDB Writer method to be deterministic

* Added comments

* More specific OrderBys

* Fixed broken summary comment
* Added in foundation for John to use

* removed charge from johnny decon parameters

* instantiated johhnydeconparams.decontype

* IsoDec incorporated!

* Did a little cleanup and made IsoDec run on my device

* Changed isodec to use the embedded dlls and resources

* changed around assembly references and added IsoDec to Deconvolution testing environment

* added test for negative mode

* updated nuspec to pack isodec resources

* Updated dll. Now just making monoisotopic errors but getting generally correct charge states

* IsoDec passes (updated) tests.

* began neutral mz spectrum

* Refactor visibility and clean up deconvolution code

Changed `ClassicDeconvolutionAlgorithm`, `DeconvolutionAlgorithm`, and `ExampleNewDeconvolutionAlgorithmTemplate` classes and their members from `public` to `internal` to restrict visibility within the assembly. Added summary comment to `DeconvolutionAlgorithm` class. Refactored `Deconvoluter` class to remove unnecessary `using` directives and simplify the `Deconvolute` method by removing switch-case logic. Updated `IsotopicEnvelope` class by removing `MassIndex` and `StDev` properties, and modified constructor and `ScoreIsotopeEnvelope` method accordingly. Updated `MzSpectrum` class to use `StandardDeviation` extension method from `Easy.Common.Extensions`. Removed various unnecessary `using` directives from multiple files.

* Finish NeutralMassSpectrum

- Added `InternalsVisibleTo` entries for "Development" and "Test" in `MassSpectrometry.csproj`.
- Changed `MostAbundantObservedIsotopicMass` to `internal` in `IsotopicEnvelope.cs`.
- Added a new constructor to `IsotopicEnvelope` with monoisotopic mass, intensity, and charge.
- Added XML documentation and changed `GeneratePeak` to `protected virtual` in `MzSpectrum.cs`.
- Removed unused `using` directives in `MzSpectrum.cs` and `NeutralMzSpectrum.cs`.
- Modified `NeutralMzSpectrum` constructor to validate array lengths.
- Added `Charges` property to `NeutralMzSpectrum` and initialized it in the constructor.
- Overrode `GeneratePeak` in `NeutralMzSpectrum` to convert to a charged spectrum using `Charges`.

* Refactor Deconvoluter and rename NeutralMzSpectrum

Added necessary using directives in Deconvoluter.cs.
Modified Deconvoluter class for short-circuit deconvolution.
Removed redundant lines in Deconvoluter.cs.
Renamed NeutralMzSpectrum to NeutralMassSpectrum.
Updated constructor and references accordingly.

* added neutral mass file bool

* Adjsuted and tested neutral mass spectra

* Refactor Deconvoluter and add new tests

Refactored Deconvoluter.cs to use a foreach loop for yielding IsotopicEnvelopes. Reformatted multiple test methods in TestDeconvolution.cs for better readability. Added new test methods to validate Deconvolute with NeutralMassSpectrum, ensuring correct processing of spectra with various charge states and ranges.

* Make FirstX and LastX properties virtual; update tests

- Changed FirstX and LastX properties in MzSpectrum to virtual.
- Included MzLibUtil namespace in NeutralMassSpectrum class.
- Updated NeutralMassSpectrum constructor to set FirstX and LastX.
- Overrode FirstX and LastX in NeutralMassSpectrum class.
- Added test NeutralMassSpectrum_MzRange to validate m/z range.

* fixed nuspec

* IsoDecDeconvolutionParameters and Multiple Monoisos

* Refactor IsoDec classes and enhance parameters

Updated IsoDecAlgorithm to use generic DeconvolutionParameters.
Enhanced IsoDecDeconvolutionParameters with new properties.
Refactored constructor to use camelCase parameter names.
Removed unused using directives from IsoDecAlgorithm.cs.
Ensured correct casting in IsoDecAlgorithm.
Renamed Css_Threshold to CssThreshold for consistency.

* Bug Fixes and parameter cleanup

* Fixed broken unit test and assertion structure in test deconvolution

* Cleaned up isotopic Envelope

* Refactor IsoDec classes and update parameters

Updated the `MassSpectrometry` namespace in `IsoDecAlgorithm.cs` and `IsoDecDeconvolutionParameters.cs`. In `IsoDecAlgorithm.cs`, added a type check for `DeconvolutionParameters` and replaced redundant type casting with `deconParams`. In `IsoDecDeconvolutionParameters.cs`, removed unnecessary `using` directives, moved the class under the `MassSpectrometry` namespace, added user-accessible and hard-coded parameters with comments, updated the constructor to initialize new parameters, and removed the nested class declaration.

* help me

* Changed resources from content to none

* nuspec edit

* Refactor Deconvolute method and update variable handling

- Change `_phaseModelPath` to readonly static string to prevent modification after initial set.
- Remove `process_spectrum` method declaration from the class.
- Add `try-finally` block in `Deconvolute` to ensure `matchedPeaksPtr` memory is freed even if an exception occurs.
- Move allocation of `matchedPeaksPtr` inside `try` block to allocate only if needed.
- Invert check for `process_spectrum` result to return empty enumerable if result is <= 0.
- Reformat loop processing matched peaks for better readability.
- Ensure `Marshal.FreeHGlobal` is called in `finally` block to free `matchedPeaksPtr` if not zero.

* Fixed memory allocation/deallocation issues

* simple restructure of parameter handling

* Update namespaces, references, and version number

Removed unused using directives from IsoDecAlgorithm.cs and Deconvoluter.cs.
Updated IsoSettings namespace in IsoDecAlgorithm.cs.
Simplified NUnit assertions in TestDeconvolution.cs.
Updated MassSpectrometry.csproj with HintPath and PackagePath for DLLs.
Replaced phase_model.bin with isogenmass.dll.
Incremented version number in mzLib.nuspec to 5.2.35.
Added isogenmass.dll to mzLib.nuspec for net8.0 and net8.0-windows7.0 targets.

* idk man

* look mom, I did it

* Adjusted in response to merging in master

* revised from PR and added tests for GetPeakIndicesWithinTolerance.

* Removed unnecessary changes

* Added comments to isodec algorithm

---------

Co-authored-by: trishorts <[email protected]>
Co-authored-by: jgpavek <[email protected]>
Co-authored-by: Nic Bollis <[email protected]>
* Added bassic object pools

* Refactor DigestionAgent to use HashSetPool for indices
* Added bassic object pools

* Refactor DigestionAgent to use HashSetPool for indices

Added `using` directive for `MzLibUtil`. Introduced a static readonly `HashSetPool<int>` named `HashSetPool` to manage a pool of hash sets. Updated `DigestionAgent` constructor to initialize `HashSetPool`. Refactored `GetDigestionSiteIndices` to use a hash set from `HashSetPool` for storing indices, ensuring no duplicates. Explicitly added start and end of protein sequence as cleavage sites. Implemented `try-finally` block to return hash set to pool after use. Final list of indices is now sorted before returning.

* string interpolation in BPWSM extensions

* Adjusted IEnumerable return in Protease.GetUnmodified

* Digestion Optimizations

* Moved testing class to proper subdirectory

* Adjusted ModFits to have the correct localization for peptide and protein termini

* Cleaned up hashset return

* Digestion Agent Hashset Return Cleanup

* set fixed mods now modifies in place using a pooled dictionary

* Added comments to digeston

* Refactor code for readability and efficiency

- Simplified initial check for `possibleVariableModifications.Count` and replaced `yield return null` with `yield break`.
- Adjusted indentation and loop structure for clarity.
- Refactored nested loop to remove unnecessary braces and streamline logic.
- Simplified construction of `modificationPattern` dictionary by removing redundant checks and directly using `modIndex`.

* Added many comments

* set fixed mods namechange

* Eliminated IsN or IS5' in favor of unified method

* Extracted all variable modification combination generation to parent class

* removed fixed mods changes

* removed unnecessary namespace

* Extracted AppendFixedToVariabel

* Update mzLib.nuspec

* Added shortreed comment
* Added bassic object pools

* Refactor DigestionAgent to use HashSetPool for indices

Added `using` directive for `MzLibUtil`. Introduced a static readonly `HashSetPool<int>` named `HashSetPool` to manage a pool of hash sets. Updated `DigestionAgent` constructor to initialize `HashSetPool`. Refactored `GetDigestionSiteIndices` to use a hash set from `HashSetPool` for storing indices, ensuring no duplicates. Explicitly added start and end of protein sequence as cleavage sites. Implemented `try-finally` block to return hash set to pool after use. Final list of indices is now sorted before returning.

* string interpolation in BPWSM extensions

* Adjusted IEnumerable return in Protease.GetUnmodified

* Digestion Optimizations

* Moved testing class to proper subdirectory

* Adjusted ModFits to have the correct localization for peptide and protein termini

* Cleaned up hashset return

* Digestion Agent Hashset Return Cleanup

* set fixed mods now modifies in place using a pooled dictionary

* Added comments to digeston

* Refactor code for readability and efficiency

- Simplified initial check for `possibleVariableModifications.Count` and replaced `yield return null` with `yield break`.
- Adjusted indentation and loop structure for clarity.
- Refactored nested loop to remove unnecessary braces and streamline logic.
- Simplified construction of `modificationPattern` dictionary by removing redundant checks and directly using `modIndex`.

* Added many comments

* set fixed mods namechange

* Eliminated IsN or IS5' in favor of unified method

* Extracted all variable modification combination generation to parent class

* removed fixed mods changes

* Fixed mod terminal adjustment

* removed unnecessary namespace

* Replaced List with Sorted Sets in Variable Mod Dictionary Pool

* Extracted AppendFixedToVariabel

* Refactor modification comparison handling

Encapsulated `ModificationComparer` within `DigestionProduct` by changing its access modifier to private. Simplified `PopulateVariableModifications` method by removing the `IComparer<Modification>` parameter and using a static `ModComparer` instance. Updated `ProteolyticPeptide` and `NucleolyticOligo` classes to reflect the new method signature, removing the unnecessary `modificationComparer` variable and its usage.

* supposedToBeDifferent

* dunno

* correct protein accession now

* j

* Adjusted shortreed Test

* Refactor modification comparison logic

Removed `ModificationComparer` and updated `Modification` and `ModificationMotif` classes to implement `IComparable` for custom comparison logic. Added new test cases to validate changes. Cleaned up unused code and adjusted methods to ensure proper functionality.

* Removed IComparable from Modificaiton Motiff

* Renamed xml databases to be more verbose

---------

Co-authored-by: trishorts <[email protected]>
* Changed x64;AnyCPU to only AnyCPU in all project files

* One more change

* Nuget - 3.
Me - 0

* Started initial structure

* Revert "Started initial structure"

This reverts commit f06cbc0.

* Reverted mod localization change.

* Enhance handling of terminal modifications in digestion

Improved logic in `DigestionProduct.cs` to ensure correct application of N-terminal and C-terminal modifications to biopolymers, preventing overwriting unless the new modification is more specific.

Updated assertions and modification order in test cases to reflect changes, enhancing accuracy and robustness of the digestion process.

---------

Co-authored-by: Nic Bollis <[email protected]>
* Undo Rounding

* reverted remaining test

* FixedFlashLFQ test
* edited workflow

* edited workflow

* edited workflow

* Added second artifact

* Fix

---------

Co-authored-by: trishorts <[email protected]>
Co-authored-by: trishorts <[email protected]>
* Fixed bug where recursive peak cutting functions did not function as intended

* deleted unused variable
Co-authored-by: trishorts <[email protected]>
* PTable loading happens in static constructor

* Removed all references to Loaders.LoadElements

* Updated tests to ensure invariant culture is set

---------

Co-authored-by: trishorts <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants