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

Gene level parsimony option in protein association dialog #2764

Merged
merged 7 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from 5 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
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",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of having a name-only argument, do you think we should have an argument called "associate-proteins-parsimony-level" where the valid values are "protein" (default) or "gene"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I considered that in concert with using a combobox in the Associate Proteins dialog rather than 2 checkboxes. It was easier to implement as just an additional checkbox, and I didn't see a significant reason to prefer a combobox, but if you see one then I'm happy to consider it.

(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; }
chambm marked this conversation as resolved.
Show resolved Hide resolved
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