Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
179 commits
Select commit Hold shift + click to select a range
276a7a3
Temporarily disabling DiskSpaceTest until test is updated
aaronbanse Jul 23, 2025
492e819
Added blank properties dockable form and made skeleton for backend
aaronbanse Jul 29, 2025
6fc005e
Created DynamicPropertyObject which can create an object with custom …
aaronbanse Jul 29, 2025
77133b9
Just uploading progress so far to save on github.
aaronbanse Jul 30, 2025
0ad43ea
Revert "Just uploading progress so far to save on github."
aaronbanse Jul 30, 2025
57342d2
Reapply "Just uploading progress so far to save on github."
aaronbanse Jul 30, 2025
c093cfa
Reverted mistake trivial changes
aaronbanse Jul 31, 2025
3e25dd5
Reverted ViewMenu resources trivial reordering
aaronbanse Jul 31, 2025
6fc526f
actually fixed the diff this time
aaronbanse Jul 31, 2025
2980115
minor changes
aaronbanse Jul 31, 2025
c8de430
Forced reformatting of tabs for resx
aaronbanse Jul 31, 2025
c5342a9
reverted trivial change
aaronbanse Jul 31, 2025
0e6f2b0
Reverted trivial rearrange by visual studio
aaronbanse Jul 31, 2025
f3fafc3
reverted auto changes in skyline designer
aaronbanse Jul 31, 2025
9f210de
reverted rearrange
aaronbanse Jul 31, 2025
e1e6381
Reverted trivial resx reordering
aaronbanse Jul 31, 2025
ceaf079
Merge branch 'Skyline/work/20250102_FilesView' into Skyline/work/2025…
aaronbanse Jul 31, 2025
b08997d
Tuned property find functionality and added support for list properti…
aaronbanse Aug 1, 2025
339dd30
Merge branch 'Skyline/work/20250530_PropertiesView' of github.com:Pro…
aaronbanse Aug 1, 2025
0188f13
Changed property sheet resources to be two files to simplify property…
aaronbanse Aug 1, 2025
c3a28b6
If property has attribute attached and is accessed to be shown on the…
aaronbanse Aug 1, 2025
2b2df28
Made display name not found error message more clear
aaronbanse Aug 1, 2025
ee15514
Modified property sheet resource structure to have one central file a…
aaronbanse Aug 4, 2025
3039886
Moved PropertySheet to using GlobalizedObject instead of DynamicPrope…
aaronbanse Aug 7, 2025
25e99ef
Merge branch 'Skyline/work/20250102_FilesView' into Skyline/work/2025…
aaronbanse Aug 7, 2025
c7f84c3
Removed DynamicPropertyObject and PropertyAttributes
aaronbanse Aug 7, 2025
c3ca5bf
Merge branch 'Skyline/work/20250530_PropertiesView' of github.com:Pro…
aaronbanse Aug 7, 2025
8ba21a7
Moved PropertySheetOwner contract up to the level of DockableForms, a…
aaronbanse Aug 14, 2025
2016873
Added persistent state handling so that propertyform location and vis…
aaronbanse Aug 14, 2025
dbe7625
made a getProperties method in PropertyForm to abstract out checks fo…
aaronbanse Aug 14, 2025
858f416
Removed unused PropertySheets using directive, added F4 as hotkey to …
aaronbanse Aug 14, 2025
6c1d17e
added null check so uninitialized propertyform does not crash skyline…
aaronbanse Aug 14, 2025
c1a9b4d
Satisfied all code review comments
aaronbanse Aug 14, 2025
814617e
More minor fixes
aaronbanse Aug 14, 2025
44f38d9
reverted whitespace changes
aaronbanse Aug 14, 2025
65a2bfe
reverted last whitespace change
aaronbanse Aug 14, 2025
caf780d
Added context menu item that opens properties from files view
aaronbanse Aug 15, 2025
f33c34e
Added license to GlobalizedObject
aaronbanse Aug 15, 2025
3223230
Reverted auto resx changes
aaronbanse Aug 15, 2025
b7a3b6c
fixed weird whitespace changes
aaronbanse Aug 15, 2025
bb747e0
hopefully fixed? Hard to tell with whitespace changes
aaronbanse Aug 15, 2025
c5702e4
Removed whitespace
aaronbanse Aug 15, 2025
63daee4
Added more relevant properties to ReplicateProperties. Combined redun…
aaronbanse Aug 18, 2025
1cd3b3c
Fixed issue not satisfying ICustomTypeDescriptor
aaronbanse Aug 18, 2025
5bcbe4b
Added property types for ReplicateSampleFile and ReplicateFolder
aaronbanse Aug 18, 2025
1dbd577
Property sheet unit test half done
aaronbanse Aug 18, 2025
3e29163
Added support in GlobalizedObject for properties which need to be han…
aaronbanse Aug 18, 2025
6b5b65c
Added support for custom-handled properties in GlobalizedObject. Usef…
aaronbanse Aug 19, 2025
2ce2c29
Merge branch 'Skyline/work/20250102_FilesView' into Skyline/work/2025…
aaronbanse Aug 19, 2025
7a909c1
Added comment
aaronbanse Aug 19, 2025
f20a7aa
Whitespace change and test fix
aaronbanse Aug 19, 2025
61cb7ac
Merge branch 'Skyline/work/20250530_PropertiesView' of github.com:Pro…
aaronbanse Aug 19, 2025
d9cc6e1
Merge branch 'Skyline/work/20250102_FilesView' into Skyline/work/2025…
aaronbanse Aug 19, 2025
229a9ef
Removed magic number in PropertySheetTest
aaronbanse Aug 19, 2025
2eeaa97
trivial change
aaronbanse Aug 19, 2025
f7bb2fc
Merge branch 'Skyline/work/20250530_PropertiesView' of github.com:Pro…
aaronbanse Aug 19, 2025
3638bdf
Improved PropertySheetTest
aaronbanse Aug 19, 2025
aabcd9c
Fixed bug in PropertySheetTest, fixed inconsistent null formatting on…
aaronbanse Aug 20, 2025
47a7ad4
Added custom typeconverter to GlobalizedObject to format doubles to t…
aaronbanse Aug 20, 2025
1cc33a2
trivial change
aaronbanse Aug 20, 2025
16883ef
Added FileSize property to FileNodeProperties, which required refacto…
aaronbanse Aug 20, 2025
98ffab6
Made modifications to satisfy code check
aaronbanse Aug 20, 2025
f08368e
Fixed property formatting
aaronbanse Aug 20, 2025
c36deef
Fixed property sheet switching positions when already visible bug
aaronbanse Aug 20, 2025
2cf546f
Changed visible check in ShowPropertyForm to a non-null dockpanel che…
aaronbanse Aug 20, 2025
a4c47a3
Merge branch 'Skyline/work/20250102_FilesView' of github.com:ProteoWi…
aaronbanse Aug 20, 2025
7ffce4a
Fixed a bug where if Files View is closed or disabled while docked at…
aaronbanse Aug 20, 2025
ac7bdb1
Revert "Created DynamicPropertyObject which can create an object with…
aaronbanse Aug 20, 2025
2b4c14a
Revert "Added blank properties dockable form and made skeleton for ba…
aaronbanse Aug 20, 2025
a6c8a7a
Reverted trivial changes
aaronbanse Aug 21, 2025
177dca4
Whitespace fix
aaronbanse Aug 21, 2025
cbfbb11
Added icon to Properties View
aaronbanse Aug 21, 2025
4f1438e
Added descriptions to each FileNode property in the property sheet
aaronbanse Aug 22, 2025
e265206
Added acquisition time property
aaronbanse Aug 22, 2025
fca2fee
removed unused using directives
aaronbanse Aug 25, 2025
d9e087f
Moved GetProperties up one level to FilesTreeNode so that we can pass…
aaronbanse Aug 25, 2025
a8c267c
Exposed needed properties to keep ChromFileInfo and ChromatogramSet p…
aaronbanse Aug 25, 2025
17a3059
Fixed test to pass
aaronbanse Aug 25, 2025
84d9bfa
Hid globalizedProps in GlobalizedObject and exposed AddProperties met…
aaronbanse Aug 25, 2025
0ce0cb1
Removed fixed TODO comment
aaronbanse Aug 25, 2025
405b599
Added option for non-readonly properties in PropertySheet. Changes no…
aaronbanse Aug 25, 2025
9b61f5b
Fixed more comments from review
aaronbanse Aug 25, 2025
72c901b
Resharper-suggested code style fixes, only in GlobalizedObject. Can r…
aaronbanse Aug 26, 2025
9b9499c
More resharper minor fixes
aaronbanse Aug 26, 2025
222cf46
Fixed reused test file string dependency in FilesModelTest, PropertyS…
aaronbanse Aug 26, 2025
5e934ed
changed null check to Assume.IsNull
aaronbanse Aug 26, 2025
60d5c0c
Implemented editable properties
aaronbanse Aug 26, 2025
415bbca
Left TODOs as design considerations, localized exception handling in …
aaronbanse Aug 27, 2025
529d5ac
Improved linkage of GetModifiedDocument to the propertyDescriptor of …
aaronbanse Aug 27, 2025
23426b5
Merge branch 'Skyline/work/20250102_FilesView' into Skyline/work/2025…
aaronbanse Aug 27, 2025
8762b51
Trivial change: variable rename
aaronbanse Aug 27, 2025
4dc5aea
Merge branch 'Skyline/work/20250530_PropertiesView' of github.com:Pro…
aaronbanse Aug 27, 2025
387e226
Improve to editable properties
aaronbanse Aug 28, 2025
33d9425
Merge branch 'Skyline/work/20250102_FilesView' of github.com:ProteoWi…
aaronbanse Aug 28, 2025
1bc85d6
Merge branch 'Skyline/work/20250102_FilesView' into Skyline/work/2025…
aaronbanse Aug 28, 2025
f69b7a2
Add line missed in merge commit
aaronbanse Aug 28, 2025
b32127f
Fix document desync with property sheet
aaronbanse Aug 28, 2025
f7c0566
Update ReplicateSampleFileProperties to new model-based UpdatePropert…
aaronbanse Aug 29, 2025
6d1243c
Add BackedByDocument check to GlobalizedObject implementers to avoid …
aaronbanse Sep 2, 2025
e71cc86
Add clarifying description to BackedByDocument
aaronbanse Sep 2, 2025
b314255
trivial change
aaronbanse Sep 2, 2025
984482c
Add missing assert in PropertySheetTest
aaronbanse Sep 2, 2025
8c6f38a
Make FilesTree update propertyform on document change
aaronbanse Sep 2, 2025
d037dd2
Merge branch 'Skyline/work/20250102_FilesView' of github.com:ProteoWi…
aaronbanse Sep 2, 2025
14ba575
Merge branch 'Skyline/work/20250102_FilesView' into Skyline/work/2025…
aaronbanse Sep 2, 2025
edb9912
Property form no longer responsible for listening to DocumentChangedE…
aaronbanse Sep 3, 2025
2be985d
Reverting reliance on model for property object updating, since prope…
aaronbanse Sep 3, 2025
037586c
Add support for readonly annotations in property sheet reflecting the…
aaronbanse Sep 3, 2025
60749af
Presence of get/set on properties of property objects now reflects if…
aaronbanse Sep 3, 2025
e78cd06
Fix duplicate description in PropertySheetFileNodeResources
aaronbanse Sep 3, 2025
72cbec5
Merge branch 'Skyline/work/20250102_FilesView' of github.com:ProteoWi…
aaronbanse Sep 4, 2025
ba178e6
Merge changes making Files immutable. Integrate with properties
aaronbanse Sep 4, 2025
43c160a
Fix compatibility with new Files changes
aaronbanse Sep 4, 2025
8487b14
Minor changes
aaronbanse Sep 4, 2025
72f76e3
Readonly Annotations now show all possible annotations, even if they …
aaronbanse Sep 4, 2025
4614350
Editable annotations now working, merge CustomHandledGlobalizedProper…
aaronbanse Sep 5, 2025
b1bd85b
Revert merge of CustomHandledGlobalizedPropertyDescriptor and Globali…
aaronbanse Sep 5, 2025
94f0848
Reverted automatically-applied trivial change from VS
aaronbanse Sep 5, 2025
4b5f36a
Remove interface file that was moved to GlobalizedObject.cs
aaronbanse Sep 5, 2025
928bc37
Merge branch 'Skyline/work/20250102_FilesView' of github.com:ProteoWi…
aaronbanse Sep 5, 2025
81a11a3
Make FileNodeProperties not abstract so that the default GetPropertie…
aaronbanse Sep 8, 2025
1c48a53
Generalize document modifiying functions to support all object types,…
aaronbanse Sep 8, 2025
53ca4ad
Temporarily removed failing test function in FilesTreeFormTest.cs
aaronbanse Sep 8, 2025
d6e323e
Add support for drop-down list annotations in property view
aaronbanse Sep 8, 2025
1307130
Merge branch 'Skyline/work/20250102_FilesView' of github.com:ProteoWi…
aaronbanse Sep 9, 2025
cb47a47
Merge branch 'Skyline/work/20250102_FilesView' into Skyline/work/2025…
aaronbanse Sep 9, 2025
26ed9c5
Structural improvements to property sheet updating
aaronbanse Sep 9, 2025
ff283f2
Fix PropertySheetTest
aaronbanse Sep 9, 2025
3dce731
Make PropertySheetTest Comprehensive, remove deprecated GlobalizedObj…
aaronbanse Sep 9, 2025
3cedee8
Satisfy code check
aaronbanse Sep 10, 2025
1e6f706
Merge branch 'Skyline/work/20250102_FilesView' into Skyline/work/2025…
aaronbanse Sep 10, 2025
a4c8226
Fix AcquisitionTime description typo
aaronbanse Sep 10, 2025
aa4f9a2
Trivial changes, whitespace fixes
aaronbanse Sep 10, 2025
f097430
Code Review Changes
aaronbanse Sep 10, 2025
e20f46a
Merge changes to new head
aaronbanse Sep 10, 2025
2dca941
Fix FilesTreeFormTest failure- Accidentally removed IsBackedByFile =>…
aaronbanse Sep 11, 2025
d6643b5
FilesTreePropertyGridTest fix, issue leftover from IsBackByFile erasu…
aaronbanse Sep 11, 2025
1330eb7
Change CustomHandledGlobalizedPropertyDescriptor to use factory patte…
aaronbanse Sep 11, 2025
c12b623
Merge branch 'Skyline/work/20250102_FilesView' into Skyline/work/2025…
aaronbanse Sep 25, 2025
93b7649
Add localization test to FilesTreePropertyGridTest
aaronbanse Sep 25, 2025
d91f68c
Merge branch 'Skyline/work/20250102_FilesView' into Skyline/work/2025…
aaronbanse Sep 29, 2025
045ea5f
Initial commit setting up propertygrid for sequencetree
aaronbanse Sep 29, 2025
232a9ce
Merge branch 'Skyline/work/20250530_PropertiesView' of github.com:Pro…
aaronbanse Sep 29, 2025
bbd6c29
Account for annotation prefix added to annotation prop names in test
aaronbanse Sep 29, 2025
4e27838
Initial PeptideDocNodeProperties commit
aaronbanse Sep 29, 2025
b6d2aaa
temp commit for testing
aaronbanse Oct 1, 2025
7df48d7
Initial commit for new SkylineObject-based property architecture
aaronbanse Oct 8, 2025
fda8fd1
Handle category for annotation properties
aaronbanse Oct 8, 2025
8423a7c
Mostly working commit for Nick to look at - tests not passing
aaronbanse Oct 9, 2025
cff1527
whitespace fixes and unused code removal
aaronbanse Oct 9, 2025
d48b4c1
reverst EditAnnotation until suitable replacement is found
aaronbanse Oct 9, 2025
330873c
Fixed property grid test failure by switching to listening to documen…
aaronbanse Oct 9, 2025
6302a16
Reapply commit 838f33e72a42f7fc429642bc8cc7d7c653c9797a
nickshulman Oct 9, 2025
6c74c8b
In-progress commit, SequenceTreePropertyGridTest and AnnotationsPrope…
aaronbanse Oct 9, 2025
c53e358
Merge branch 'Skyline/work/20251009_PropertiesView_Testing' of github…
aaronbanse Oct 9, 2025
814d544
Merge Files into PropertiesView
aaronbanse Oct 13, 2025
877596a
Fixed merge issue from Files
aaronbanse Oct 13, 2025
2c7dea7
Fixed another small merge issue
aaronbanse Oct 13, 2025
01c82ef
Added test functionality for SequenceTree Properties, moved shared fu…
aaronbanse Oct 13, 2025
3b17750
Remove now unused EditAnnotation function I added earlier
aaronbanse Oct 13, 2025
290fb4f
Add comments explaining num props test
aaronbanse Oct 13, 2025
154e9d0
Move logic for "built-in" reports into new class (#3644)
nickshulman Oct 14, 2025
f99ceb5
Code review fixes
aaronbanse Oct 14, 2025
9ef6926
Changed base class of property objects to be RootSkylineObject from S…
aaronbanse Oct 14, 2025
2f087e0
Add Spectral Library data object for propertygrid
aaronbanse Oct 14, 2025
0886d58
Merge branch 'master' of github.com:ProteoWizard/pwiz
aaronbanse Oct 14, 2025
76250da
Merge BuiltInReports changes
aaronbanse Oct 14, 2025
0a50474
Properties displayed now based on document grid default columns
aaronbanse Oct 14, 2025
e12c1ea
Test fixes
aaronbanse Oct 14, 2025
eab9fed
Added properties support for Transitions
aaronbanse Oct 15, 2025
ca46b56
Reverted submodule changes
aaronbanse Oct 15, 2025
e2c3ded
Changed test file structure to .data pattern, and let FilesTreeProper…
aaronbanse Oct 15, 2025
f8bb85b
Implemented SpectralLibrary properties
aaronbanse Oct 15, 2025
c27331a
Finished SpectralLibrary Properties implementation
aaronbanse Oct 16, 2025
1b3ccdb
SpectralLibrary property improvements
aaronbanse Oct 16, 2025
6a0c34f
Catch argumentexception due to duplicate replicate names and set name…
aaronbanse Oct 16, 2025
b431b4e
Property grid now shows message dialog after conflicting rename of re…
aaronbanse Oct 16, 2025
84b9581
Allow duplicate replicate name exception to propogate up to errdlg bo…
aaronbanse Oct 20, 2025
e59928e
Add test for duplicate replicate name behavior
aaronbanse Oct 20, 2025
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
294 changes: 294 additions & 0 deletions pwiz_tools/Skyline/Controls/Databinding/BuiltInReports.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,294 @@
/*
* Original author: Nicholas Shulman <nicksh .at. u.washington.edu>,
* MacCoss Lab, Department of Genome Sciences, UW
*
* Copyright 2025 University of Washington - Seattle, WA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections.Generic;
using System.Linq;
using JetBrains.Annotations;
using pwiz.Common.DataBinding;
using pwiz.Skyline.Model.Databinding.Entities;
using pwiz.Skyline.Model.DocSettings;

namespace pwiz.Skyline.Controls.Databinding
{
public class BuiltInReports
{
public BuiltInReports(Model.SrmDocument document)
{
Document = document;
HasCustomIons = document.CustomMolecules.Any();
HasOnlyCustomIons = HasCustomIons && !document.Peptides.Any();
}
public Model.SrmDocument Document { get; }
public bool HasCustomIons { get; }
public bool HasOnlyCustomIons { get; }

/// <summary>
/// Returns the list of columns that should be shown on a report with rows of the specified type.
/// Returns null if this class does not know anything about that type of rows.
/// </summary>
[CanBeNull]
public IEnumerable<PropertyPath> GetDefaultColumns(Type rowType)
{
AnnotationDef.AnnotationTarget? annotationTarget = null;
List<PropertyPath> propertyPaths = new List<PropertyPath>();
if (rowType == typeof(TransitionResult))
{
annotationTarget = AnnotationDef.AnnotationTarget.transition_result;
propertyPaths.AddRange(new[]
{
Property(nameof(TransitionResult.PrecursorResult))
.Property(nameof(PrecursorResult.PeptideResult)).Property(nameof(PeptideResult.ResultFile))
.Property(nameof(ResultFile.Replicate)),
Property(nameof(TransitionResult.Note)),
Property(nameof(TransitionResult.RetentionTime)),
Property(nameof(TransitionResult.Fwhm)),
Property(nameof(TransitionResult.StartTime)),
Property(nameof(TransitionResult.EndTime)),
Property(nameof(TransitionResult.Background)),
Property(nameof(TransitionResult.AreaRatio)),
Property(nameof(TransitionResult.Height)),
Property(nameof(TransitionResult.PeakRank))
});
}
else if (rowType == typeof(PrecursorResult))
{
annotationTarget = AnnotationDef.AnnotationTarget.precursor_result;
propertyPaths.AddRange(new[]
{

Property(nameof(PrecursorResult.PeptideResult)).Property(nameof(PeptideResult.ResultFile))
.Property(nameof(ResultFile.Replicate)),
Property(nameof(PrecursorResult.Note)),
Property(nameof(PrecursorResult.PrecursorPeakFoundRatio)),
Property(nameof(PrecursorResult.BestRetentionTime)),
Property(nameof(PrecursorResult.MaxFwhm)),
Property(nameof(PrecursorResult.MinStartTime)),
Property(nameof(PrecursorResult.MaxEndTime)),
Property(nameof(PrecursorResult.TotalArea)),
Property(nameof(PrecursorResult.TotalBackground)),
Property(nameof(PrecursorResult.TotalAreaRatio)),
Property(nameof(PrecursorResult.MaxHeight)),
Property(nameof(PrecursorResult.LibraryDotProduct)),
Property(nameof(PrecursorResult.IsotopeDotProduct))
}
);
}
else if (rowType == typeof(PeptideResult))
{
PropertyPath ppReplicate =
Property(nameof(PeptideResult.ResultFile)).Property(nameof(ResultFile.Replicate));
propertyPaths.AddRange(new[]
{
ppReplicate,
Property(nameof(PeptideResult.PeptidePeakFoundRatio)),
Property(nameof(PeptideResult.PeptideRetentionTime)),
Property(nameof(PeptideResult.RatioToStandard))
});
propertyPaths.AddRange(GetAnnotations(AnnotationDef.AnnotationTarget.replicate)
.Select(ppAnnotation => ppReplicate.Concat(ppAnnotation)));
}
else if (rowType == typeof(MultiTransitionResult))
{
annotationTarget = AnnotationDef.AnnotationTarget.transition_result;
propertyPaths.AddRange(new []
{
Property(nameof(MultiTransitionResult.Note)),
Property(nameof(MultiTransitionResult.File))
});
}
else if (rowType == typeof(MultiPrecursorResult))
{
annotationTarget = AnnotationDef.AnnotationTarget.precursor_result;
propertyPaths.AddRange(new []
{
Property(nameof(MultiPrecursorResult.Note)),
Property(nameof(MultiPrecursorResult.File))
});
}
else if (rowType == typeof(Protein))
{
annotationTarget = AnnotationDef.AnnotationTarget.protein;
propertyPaths.AddRange(new[]
{
PropertyPath.Root,
Property(nameof(Protein.Description)),
});
if (!HasOnlyCustomIons)
{
propertyPaths.AddRange(new[]
{
Property(nameof(Protein.Accession)),
Property(nameof(Protein.PreferredName)),
Property(nameof(Protein.Gene)),
Property(nameof(Protein.Species)),
Property(nameof(Protein.Sequence))
});
}
propertyPaths.Add(Property(nameof(Protein.Note)));
}
else if (rowType == typeof(Peptide))
{
annotationTarget = AnnotationDef.AnnotationTarget.peptide;
propertyPaths.AddRange(new[]
{
PropertyPath.Root,
Property(nameof(Peptide.Protein)),

});
if (!HasOnlyCustomIons)
{
propertyPaths.Add(Property(nameof(Peptide.ModifiedSequence)));
}
if (HasCustomIons)
{
propertyPaths.AddRange(new[]
{
Property(nameof(Peptide.MoleculeName)),
Property(nameof(Peptide.MoleculeFormula))
});
}
propertyPaths.Add(Property(nameof(Peptide.StandardType)));
if (!HasOnlyCustomIons)
{
propertyPaths.AddRange(new[]
{
Property(nameof(Peptide.FirstPosition)),
Property(nameof(Peptide.LastPosition)),
Property(nameof(Peptide.MissedCleavages)),
});
}
propertyPaths.AddRange(new []
{
Property(nameof(Peptide.PredictedRetentionTime)),
Property(nameof(Peptide.AverageMeasuredRetentionTime))
});
if (HasCustomIons)
{
propertyPaths.AddRange(new[]
{
Property(nameof(Peptide.ExplicitRetentionTime)),
Property(nameof(Peptide.ExplicitRetentionTimeWindow))
});
}
propertyPaths.Add(Property(nameof(Peptide.Note)));
}
else if (rowType == typeof(Precursor))
{
annotationTarget = AnnotationDef.AnnotationTarget.precursor;
propertyPaths.AddRange(new[]
{
PropertyPath.Root,
Property(nameof(Precursor.Peptide)),
Property(nameof(Precursor.Charge)),
Property(nameof(Precursor.IsotopeLabelType)),
});
if (HasCustomIons)
{
propertyPaths.AddRange(new[]
{
Property(nameof(Precursor.IonName)),
Property(nameof(Precursor.IonFormula)),
Property(nameof(Precursor.NeutralFormula)),
Property(nameof(Precursor.Adduct))
});
}
propertyPaths.Add(Property(nameof(Precursor.Mz)));
if (!HasOnlyCustomIons)
{
propertyPaths.Add(Property(nameof(Precursor.ModifiedSequence)));
}
propertyPaths.AddRange(new[]
{
Property(nameof(Precursor.PrecursorExplicitCollisionEnergy)),
Property(nameof(Precursor.Note)),
Property(nameof(Precursor.LibraryName)),
Property(nameof(Precursor.LibraryType)),
Property(nameof(Precursor.LibraryProbabilityScore))
});
}
else if (rowType == typeof(Transition))
{
annotationTarget = AnnotationDef.AnnotationTarget.transition;
propertyPaths.AddRange(new[]
{
PropertyPath.Root,
Property(nameof(Transition.Precursor)),
Property(nameof(Transition.ProductCharge)),
Property(nameof(Transition.ProductMz)),
});
if (!HasOnlyCustomIons)
{
propertyPaths.Add(Property(nameof(Transition.FragmentIon)));
}

if (HasCustomIons)
{
propertyPaths.AddRange(new[]
{
Property(nameof(Transition.ProductIonFormula)),
Property(nameof(Transition.ProductNeutralFormula)),
Property(nameof(Transition.ProductAdduct))
});
}

if (!HasOnlyCustomIons)
{
propertyPaths.Add(Property(nameof(Transition.Losses)));
}
propertyPaths.AddRange(new[]
{
Property(nameof(Transition.Quantitative)),
Property(nameof(Transition.Note))
});
}
else if (rowType == typeof(Replicate))
{
annotationTarget = AnnotationDef.AnnotationTarget.replicate;
propertyPaths.AddRange(new[]
{
PropertyPath.Root,
Property(nameof(Replicate.SampleType)),
Property(nameof(Replicate.AnalyteConcentration))
});
}
else
{
return null;
}

if (annotationTarget.HasValue)
{
propertyPaths.AddRange(GetAnnotations(annotationTarget.Value));
}

return propertyPaths;
}

private IEnumerable<PropertyPath> GetAnnotations(AnnotationDef.AnnotationTarget annotationTarget)
{
return Document.Settings.DataSettings.AnnotationDefs.Where(annotationDef =>
annotationDef.AnnotationTargets.Contains(annotationTarget)).Select(annotationDef=>Property(AnnotationDef.ANNOTATION_PREFIX + annotationDef.Name));
}

private static PropertyPath Property(string name)
{
return PropertyPath.Root.Property(name);
}
}
}
Loading