Skip to content

Commit

Permalink
Gene level parsimony option in protein association dialog (#2764)
Browse files Browse the repository at this point in the history
- added gene level parsimony option in protein association dialog
* bumped schema to 23.12 for gene level parsimony
* fixed Skyline build system to copy vendor DLLs to both Debug and Release directories so vendor reader tests don't fail in Debug config
* removed MinPeptidesPerProtein test from TestHugeAssociateProteins because it's now hidden in the Refine -> Associate Proteins dialog
* greatly improved speed by using Nick's ReferenceValue for PeptideDocNodes
* fixed issues with cancellation in some parsimony calculations
  • Loading branch information
chambm authored Jan 18, 2024
1 parent b263a3b commit 072abd4
Show file tree
Hide file tree
Showing 28 changed files with 1,007 additions and 192 deletions.
43 changes: 26 additions & 17 deletions Jamroot.jam
Original file line number Diff line number Diff line change
Expand Up @@ -765,30 +765,39 @@ rule install-type ( properties * )
}

import string ;
rule install-vendor-api-dependencies-to-locations ( locations + : properties * )
{
local dependencies ;
if <toolset>msvc in $(properties) && <link>static in $(properties) && ! [ without-binary-msdata ]
{
for loc in $(locations)
{
local location = <location>$(loc) ;
if [ path.exists pwiz_aux/msrc/utility/vendor_api/ABI ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/ABI//install_pwiz_vendor_api_abi_dlls/$(location) ; }
if [ path.exists pwiz_aux/msrc/utility/vendor_api/ABI ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/ABI//install_pwiz_vendor_api_abi_sqlite/$(location) ; }
if [ path.exists pwiz_aux/msrc/utility/vendor_api/ABI/T2D ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/ABI/T2D//install_pwiz_vendor_api_abi_t2d/$(location) ; }
if [ path.exists pwiz_aux/msrc/utility/vendor_api/Agilent ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/Agilent//install_pwiz_vendor_api_agilent/$(location) ; }
if [ path.exists pwiz_aux/msrc/utility/vendor_api/Bruker ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/Bruker//install_pwiz_vendor_api_bruker/$(location) ; }
# wait for CCS<->DT support in Mobllion # if [ path.exists pwiz_aux/msrc/utility/vendor_api/Mobilion ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/Mobilion//install_pwiz_vendor_api_mbi/$(location) ; }
if [ path.exists pwiz_aux/msrc/utility/vendor_api/Shimadzu ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/Shimadzu//install_pwiz_vendor_api_shimadzu/$(location) ; }
if [ path.exists pwiz_aux/msrc/utility/vendor_api/thermo ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/thermo//install_pwiz_vendor_api_thermo/$(location) ; }
if [ path.exists pwiz_aux/msrc/utility/vendor_api/UIMF ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/UIMF//install_pwiz_vendor_api_uimf/$(location) ; }
if [ path.exists pwiz_aux/msrc/utility/vendor_api/UNIFI ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/UNIFI//install_pwiz_vendor_api_unifi/$(location) ; }
if [ path.exists pwiz_aux/msrc/utility/vendor_api/Waters ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/Waters//install_pwiz_vendor_api_waters/$(location) ; }
if <vendor-api-support>on in $(properties) { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_tools/prototype//ThermoRawMetaDumpInstall/$(location) ; }
}
}
return $(dependencies) ;
}

rule install-vendor-api-dependencies ( properties * )
{
properties = $(properties) [ vendor-api-support $(properties) ] ;
local location = [ feature.get-values <location> : $(properties) ] ;
if $(location) { location = [ string.join <location> [ path.make $(location[1]) ] ] ; }
location ?= [ install-location $(properties) ] ;

local dependencies ;
if <toolset>msvc in $(properties) && <link>static in $(properties) && ! [ without-binary-msdata ]
{
if [ path.exists pwiz_aux/msrc/utility/vendor_api/ABI ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/ABI//install_pwiz_vendor_api_abi_dlls/$(location) ; }
if [ path.exists pwiz_aux/msrc/utility/vendor_api/ABI ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/ABI//install_pwiz_vendor_api_abi_sqlite/$(location) ; }
if [ path.exists pwiz_aux/msrc/utility/vendor_api/ABI/T2D ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/ABI/T2D//install_pwiz_vendor_api_abi_t2d/$(location) ; }
if [ path.exists pwiz_aux/msrc/utility/vendor_api/Agilent ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/Agilent//install_pwiz_vendor_api_agilent/$(location) ; }
if [ path.exists pwiz_aux/msrc/utility/vendor_api/Bruker ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/Bruker//install_pwiz_vendor_api_bruker/$(location) ; }
# wait for CCS<->DT support in Mobllion # if [ path.exists pwiz_aux/msrc/utility/vendor_api/Mobilion ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/Mobilion//install_pwiz_vendor_api_mbi/$(location) ; }
if [ path.exists pwiz_aux/msrc/utility/vendor_api/Shimadzu ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/Shimadzu//install_pwiz_vendor_api_shimadzu/$(location) ; }
if [ path.exists pwiz_aux/msrc/utility/vendor_api/thermo ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/thermo//install_pwiz_vendor_api_thermo/$(location) ; }
if [ path.exists pwiz_aux/msrc/utility/vendor_api/UIMF ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/UIMF//install_pwiz_vendor_api_uimf/$(location) ; }
if [ path.exists pwiz_aux/msrc/utility/vendor_api/UNIFI ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/UNIFI//install_pwiz_vendor_api_unifi/$(location) ; }
if [ path.exists pwiz_aux/msrc/utility/vendor_api/Waters ] { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_aux/msrc/utility/vendor_api/Waters//install_pwiz_vendor_api_waters/$(location) ; }
if <vendor-api-support>on in $(properties) { dependencies += <dependency>$(PWIZ_ROOT_PATH)/pwiz_tools/prototype//ThermoRawMetaDumpInstall/$(location) ; }
}
return $(dependencies) ;
return [ install-vendor-api-dependencies-to-locations $(location) : $(properties) ] ;
}

rule install-identdata-dependencies ( properties * )
Expand Down
9 changes: 9 additions & 0 deletions pwiz_tools/Skyline/CommandArgUsage.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pwiz_tools/Skyline/CommandArgUsage.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1018,4 +1018,7 @@ Useful in sample mixtures including multiple species.</value>
<data name="_verbose_errors" xml:space="preserve">
<value>Adds additional information to the program output in the case of an error, that may be helpful to Skyline developers.</value>
</data>
<data name="_associate_proteins_gene_level_parsimony" xml:space="preserve">
<value>Associate peptides with genes (or gene groups) instead of proteins, and apply parsimony options to that association.</value>
</data>
</root>
6 changes: 5 additions & 1 deletion pwiz_tools/Skyline/CommandArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1399,6 +1399,8 @@ public bool ImportingSearch

public static readonly Argument ARG_AP_GROUP_PROTEINS = new Argument(@"associate-proteins-group-proteins",
(c, p) => c.AssociateProteinsGroupProteins = p.IsNameOnly || bool.Parse(p.Value));
public static readonly Argument ARG_AP_GENE_LEVEL = new Argument(@"associate-proteins-gene-level-parsimony",
(c, p) => c.AssociateProteinsGeneLevelParsimony = p.IsNameOnly || bool.Parse(p.Value));
public static readonly Argument ARG_AP_SHARED_PEPTIDES = DocArgument.FromEnumType<SharedPeptides>(@"associate-proteins-shared-peptides",
(c, p) => c.AssociateProteinsSharedPeptides = p);
public static readonly Argument ARG_AP_MINIMAL_LIST = new Argument(@"associate-proteins-minimal-protein-list",
Expand All @@ -1409,16 +1411,18 @@ public bool ImportingSearch
(c, p) => c.AssociateProteinsMinPeptidesPerProtein = p.ValueInt) { WrapValue = true };

private static readonly ArgumentGroup GROUP_ASSOCIATE_PROTEINS = new ArgumentGroup(() => Resources.CommandLine_AssociateProteins_Associating_peptides_with_proteins, false,
ARG_AP_GROUP_PROTEINS, ARG_AP_SHARED_PEPTIDES, ARG_AP_MINIMAL_LIST, ARG_AP_MIN_PEPTIDES, ARG_AP_REMOVE_SUBSETS)
ARG_AP_GROUP_PROTEINS, ARG_AP_GENE_LEVEL, ARG_AP_SHARED_PEPTIDES, ARG_AP_MINIMAL_LIST, ARG_AP_MIN_PEPTIDES, ARG_AP_REMOVE_SUBSETS)
{ LeftColumnWidth = 45 };

public bool? AssociateProteinsGroupProteins { get; private set; }
public bool? AssociateProteinsGeneLevelParsimony { get; private set; }
public bool? AssociateProteinsFindMinimalProteinList { get; private set; }
public bool? AssociateProteinsRemoveSubsetProteins { get; private set; }
public SharedPeptides? AssociateProteinsSharedPeptides { get; private set; }
public int? AssociateProteinsMinPeptidesPerProtein { get; private set; }
public bool AssociatingProteins => AssociateProteinsFindMinimalProteinList.HasValue ||
AssociateProteinsGroupProteins.HasValue ||
AssociateProteinsGeneLevelParsimony.HasValue ||
AssociateProteinsMinPeptidesPerProtein.HasValue ||
AssociateProteinsRemoveSubsetProteins.HasValue ||
AssociateProteinsSharedPeptides.HasValue;
Expand Down
1 change: 1 addition & 0 deletions pwiz_tools/Skyline/CommandLine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2189,6 +2189,7 @@ private bool AssociateProteins(CommandArgs commandArgs)
var proteinAssociation = new ProteinAssociation(Document, progressMonitor);
proteinAssociation.UseFastaFile(fastaPath, DigestProteinToPeptides, progressMonitor);
proteinAssociation.ApplyParsimonyOptions(commandArgs.AssociateProteinsGroupProteins.GetValueOrDefault(),
commandArgs.AssociateProteinsGeneLevelParsimony.GetValueOrDefault(),
commandArgs.AssociateProteinsFindMinimalProteinList.GetValueOrDefault(),
commandArgs.AssociateProteinsRemoveSubsetProteins.GetValueOrDefault(),
commandArgs.AssociateProteinsSharedPeptides.GetValueOrDefault(),
Expand Down
21 changes: 21 additions & 0 deletions pwiz_tools/Skyline/EditUI/AssociateProteinsDlg.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 072abd4

Please sign in to comment.