Skip to content

Commit

Permalink
DIA search workflow UI changes (#3134)
Browse files Browse the repository at this point in the history
- reworked DIA workflow radio button to work with and without DIA-Umpire
- added DIA-Umpire checkbox to converter settings page, which is now always shown for DIA workflow
- added GPF checkbox to extract chromatograms page, which is now always shown for DIA workflow
- fixed MsFraggerSearchEngine to fill in percolator_qvalue from DIA searches properly, and if a PSM id in pepXML can't be found in the percolator TSV file, to put in percolator_qvalue=1
- changed MsFraggerSearchEngine to use Alexey's recommended DDA search settings for low resolution DIA data (e.g. Stellar) when the workflow is DIA
- fixed support for MSFragger output_report_topN > 1 but limited it to 1 for DIA until the output format changes to keep all ranks in the same pepXML
* added faster TestDiaSearch test (sharing TestDiaSearch DiaUmpire code)
* updated audit logs
* removed default value from audit log for IsGpf and UseDiaUmpire
* fixed MSFragger to look for correct pepXML file extension based on data_type parameter instead of workflow setting
* fixed compile error with C++17
* added cleanup of DIA Umpire output files for Test*DiaUmpireTutorial
* added tracking of Default (initial) values to AbstractDdaSearchEngine.Setting
* fixed expat warnings
* fixed copy button for KeyValueGridDlg and SimpleFileDownloaderDlg
* removed no longer necessary PIN file scan number adjustment logic
  • Loading branch information
chambm authored Nov 18, 2024
1 parent 7c9ae80 commit 0a7a939
Show file tree
Hide file tree
Showing 54 changed files with 1,354 additions and 541 deletions.
1 change: 1 addition & 0 deletions libraries/expat.jam
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ rule init ( version ? : location : options * )
<location-prefix>expat
<toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
<toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
<toolset>msvc:<cxxflags>/wd4100 # warning C4100: 'enc': unreferenced formal parameter
<define>HAVE_EXPAT_CONFIG_H
<define>XML_LARGE_SIZE
<implicit-dependency>expat_config.h
Expand Down
4 changes: 2 additions & 2 deletions pwiz_tools/Shared/CommonUtil/SystemUtil/ProcessRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,10 @@ public void Run(ProcessStartInfo psi, string stdin, IProgressMonitor progress, r
? Path.Combine(Environment.CurrentDirectory, psi.FileName)
: psi.FileName;
// ReSharper disable LocalizableElement
sbError.AppendFormat("\r\nCommand-line: {0} {1}\r\nWorking directory: {2}{3}", processPath,
sbError.AppendFormat("\r\nCommand-line: {0} {1}\r\nWorking directory: {2}{3}\r\nExit code: {4}", processPath,
// ReSharper restore LocalizableElement
string.Join(" ", proc.StartInfo.Arguments), psi.WorkingDirectory,
stdin != null ? "\r\nStandard input:\r\n" + stdin : "");
stdin != null ? "\r\nStandard input:\r\n" + stdin : "", exit);
throw new IOException(sbError.ToString());
}

Expand Down
5 changes: 4 additions & 1 deletion pwiz_tools/Skyline/Alerts/KeyValueGridDlg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using pwiz.Skyline.Properties;
using pwiz.Skyline.Util;
Expand Down Expand Up @@ -73,6 +74,7 @@ public static void Show<TValue>(IWin32Window parent, string title, IDictionary<s
var keyToControl = new Dictionary<string, Control>();
var controlToSetting = new Dictionary<object, TValue>();
int row = 1;
var ctlTextRepresentation = new StringBuilder();
foreach (var kvp in gridValues.OrderBy(kvp => kvp.Key))
{
var lbl = new Label
Expand Down Expand Up @@ -140,13 +142,14 @@ public static void Show<TValue>(IWin32Window parent, string title, IDictionary<s
layout.Controls.Add(valueControl, 1, row);
keyToControl[kvp.Key] = valueControl;
controlToSetting[valueControl] = kvp.Value;
ctlTextRepresentation.AppendLine($@"{kvp.Key} = {valueToString(kvp.Value)}");
row++;
}

var activeScreen = parent == null ? Screen.PrimaryScreen : Screen.FromHandle(parent.Handle);
int defaultHeight = Math.Min(3 * activeScreen.Bounds.Height / 4, layout.GetRowHeights().Sum() + 50);

using (var dlg = new MultiButtonMsgDlg(layout, Resources.OK))
using (var dlg = new MultiButtonMsgDlg(layout, Resources.OK, ctlTextRepresentation.ToString()))
{
dlg.Text = title;
dlg.ClientSize = new Size(400, defaultHeight);
Expand Down
8 changes: 5 additions & 3 deletions pwiz_tools/Skyline/Alerts/MultiButtonMsgDlg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ public MultiButtonMsgDlg(string message, string btnYesText, string btnNoText, bo
/// </summary>
/// <param name="ctl">The control to show</param>
/// <param name="btnText">The text to show in the non-Cancel button (DialogResult.OK)</param>
public MultiButtonMsgDlg(Control ctl, string btnText) : this(string.Empty, btnText)
/// <param name="ctlContentAsText">A text representation of the control's contents.</param>
public MultiButtonMsgDlg(Control ctl, string btnText, string ctlContentAsText) : this(ctlContentAsText, btnText)
{
messageScrollPanel.Hide();
splitContainer.Panel1.Controls.Add(ctl);
Expand Down Expand Up @@ -119,8 +120,9 @@ public MultiButtonMsgDlg(string message, MessageBoxButtons buttons, DialogResult
/// <param name="btnNoText">The text to show in the second, non-default button (DialogResult.No)</param>
/// <param name="allowCancel">When this is true a Cancel button is the button furthest to the
/// right. Otherwise, only the two named buttons are visible.</param>
public MultiButtonMsgDlg(Control ctl, string btnYesText, string btnNoText, bool allowCancel)
: this(string.Empty, btnYesText, btnNoText, allowCancel)
/// <param name="ctlContentAsText">A text representation of the control's contents.</param>
public MultiButtonMsgDlg(Control ctl, string btnYesText, string btnNoText, bool allowCancel, string ctlContentAsText)
: this(ctlContentAsText, btnYesText, btnNoText, allowCancel)
{
messageScrollPanel.Hide();
splitContainer.Panel1.Controls.Add(ctl);
Expand Down
6 changes: 5 additions & 1 deletion pwiz_tools/Skyline/Alerts/SimpleFileDownloaderDlg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using pwiz.Skyline.Controls;
using pwiz.Skyline.Util;
Expand All @@ -34,6 +35,7 @@ public static class SimpleFileDownloaderDlg
/// </summary>
public static DialogResult Show(Control parent, string title, IEnumerable<FileDownloadInfo> requiredFiles)
{
var ctlTextRepresentation = new StringBuilder();
var layout = new TableLayoutPanel
{
Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top,
Expand Down Expand Up @@ -63,6 +65,7 @@ public static DialogResult Show(Control parent, string title, IEnumerable<FileDo
};
layout.Controls.Add(downloadMessageLabel, 0, 0);
layout.SetColumnSpan(downloadMessageLabel, 2);
ctlTextRepresentation.AppendLine(downloadMessage);

int row = 2;
var gridLabels = new List<Label>();
Expand Down Expand Up @@ -90,6 +93,7 @@ public static DialogResult Show(Control parent, string title, IEnumerable<FileDo
gridLabels.Add(name);
gridLabels.Add(url);
++row;
ctlTextRepresentation.AppendFormat(@"{0}{1}{2}{3}", name.Text, '\t', url.Text, Environment.NewLine);
}

var activeScreen = parent == null ? Screen.PrimaryScreen : Screen.FromHandle(parent.Handle);
Expand All @@ -102,7 +106,7 @@ public static DialogResult Show(Control parent, string title, IEnumerable<FileDo
label.Width += 10;
}

using (var dlg = new MultiButtonMsgDlg(layout, AlertsResources.AlertDlg_GetDefaultButtonText__Yes, AlertsResources.AlertDlg_GetDefaultButtonText__No, false))
using (var dlg = new MultiButtonMsgDlg(layout, AlertsResources.AlertDlg_GetDefaultButtonText__Yes, AlertsResources.AlertDlg_GetDefaultButtonText__No, false, ctlTextRepresentation.ToString()))
{
dlg.Text = title;
dlg.ClientSize = new Size(defaultWidth, defaultHeight);
Expand Down

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

Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ public BuildPeptideSearchLibraryControl(IModifyDocumentContainer documentContain
if (_isRunPeptideSearch)
{
panel1.Hide();
radioDIA.Text = SkylineResources.BuildPeptideSearchLibraryControl_RunPeptideSearchRadioDIAText_DIA_with_DIA_Umpire;
helpTip.SetToolTip(radioDIA, SkylineResources.BuildPeptideSearchLibraryControl_BuildPeptideSearchLibraryControl_Library_from_DIA_deconvoluted_to_single_precursor_MS_MS_spectra_and_chromatograms_from_raw_DIA_spectra_of_same_runs);
InputFileType = ImportPeptideSearchDlg.InputFile.dda_raw;
if (ImportPeptideSearch.IsDIASearch)
InputFileType = ImportPeptideSearchDlg.InputFile.dia_raw;
else
InputFileType = ImportPeptideSearchDlg.InputFile.dda_raw;
}
else
{
Expand Down Expand Up @@ -115,7 +116,8 @@ public BuildPeptideSearchLibrarySettings(BuildPeptideSearchLibraryControl contro

public BuildPeptideSearchLibrarySettings(IEnumerable<BuildLibraryGridView.File> files, IrtStandard standard,
bool includeAmbiguousMatches, bool filterForDocumentPeptides,
ImportPeptideSearchDlg.Workflow workFlow, ImportPeptideSearchDlg.InputFile inputFileType, SrmDocument.DOCUMENT_TYPE docType)
ImportPeptideSearchDlg.Workflow workFlow,
ImportPeptideSearchDlg.InputFile inputFileType, SrmDocument.DOCUMENT_TYPE docType)
{
SearchFileNames = files?.ToArray() ?? Array.Empty<BuildLibraryGridView.File>();
Standard = standard;
Expand Down Expand Up @@ -669,8 +671,6 @@ public bool PerformDDASearch
get { return InputFileType != ImportPeptideSearchDlg.InputFile.search_result; }
}

public bool DIAConversionNeeded => InputFileType == ImportPeptideSearchDlg.InputFile.dia_raw;

private void OnGridChange(object sender, EventArgs e)
{
if (!PerformDDASearch)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
<value>6, 42</value>
</data>
<data name="radioDIA.Size" type="System.Drawing.Size, System.Drawing">
<value>369, 17</value>
<value>84, 17</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="radioDIA.TabIndex" type="System.Int32, mscorlib">
Expand Down Expand Up @@ -468,7 +468,7 @@ like BiblioSpec .blib, EncyclopeDIA .elib, SpectraST .sqt</value>
<value>gridSearchFiles</value>
</data>
<data name="&gt;&gt;gridSearchFiles.Type" xml:space="preserve">
<value>pwiz.Skyline.FileUI.PeptideSearch.BuildLibraryGridView, Skyline, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</value>
<value>pwiz.Skyline.FileUI.PeptideSearch.BuildLibraryGridView, Skyline-daily, Version=24.1.1.263, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;gridSearchFiles.Parent" xml:space="preserve">
<value>panelPeptideSearch</value>
Expand Down
Loading

0 comments on commit 0a7a939

Please sign in to comment.