Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
b2f07e0
Delete PanoramaUtil.cs from the SharedBatch project, and remove usage…
vagisha Jun 5, 2024
0cc1106
Clean up.
vagisha Jun 5, 2024
d6498b8
Use WebPanoramaClient constructor in AuditLogTutorialTest
vagisha Jun 5, 2024
1589e3a
Merge branch 'master' into Skyline/work/20240529_vsharma_panoramaclie…
vagisha Jun 5, 2024
9ef5a96
Fix UI freeze. This happens when: 1. Start a config 2. Switch to the …
vagisha Apr 30, 2024
bd19e53
Added a SCIEX WIFF2 option to the "Instrument type" combo box for imp…
vagisha May 1, 2024
e55b74e
Ping software version to Panorama server.
vagisha Jun 5, 2024
37bb2ca
- Fix log message for selected Skyline settings.
vagisha May 15, 2024
ed57fff
Fix ListViewSizeChanged.
vagisha Jun 6, 2024
82b6fbd
- AutoQCConfigForm includes a field to enter the annotations file.
vagisha May 29, 2024
71aeeee
Upload to Panorama after starting config if any new files are importe…
vagisha Jun 6, 2024
6b7a16d
When starting a configuration, import annotations and upload document…
vagisha Jun 8, 2024
c131421
Catch Exception instead of an ArgumentException when validating a con…
vagisha Jun 11, 2024
a09df51
- Added MainSettings.HasAnnotationsFile() method.
vagisha Jun 13, 2024
313065d
Renamed AutoQcConfigManager.State property to AutoQcState to get rid …
vagisha Jun 15, 2024
0df23fb
Fix switching log file in the Log tab when a config is selected.
vagisha Jun 16, 2024
4fedbe5
Stop configuration if Panorama upload error is "QC folders allow new …
vagisha Jun 16, 2024
b50b7eb
Add ConfigRunner constructor (incomplete)
vagisha Jun 24, 2024
b7135e2
Change width of "Folder on Panorama" textbox in the "Panorama" tab.
vagisha Jul 12, 2024
c19bf3b
- Change status to "Error" if the annotations file could not be impor…
vagisha Jul 17, 2024
4917e34
Added more Panorama import errors that will cause a config to stop.
vagisha Jul 24, 2024
634f9be
Fix OutOfBoundsException in Logger.
vagisha Jul 24, 2024
5298d5a
- If there is a reimport queue, attempt to re-import all raw files be…
vagisha Aug 1, 2024
1127612
Create archive (sky.zip) only after the initial import of existing fi…
vagisha Aug 1, 2024
56e0103
Catch the case where a raw files's write date is before --import-on-o…
vagisha Aug 2, 2024
d55fac2
Merge remote-tracking branch 'remotes/origin/master' into Skyline/wor…
vagisha Aug 14, 2024
58070ee
Merge branch 'ProteoWizard:master' into Skyline/work/20240430_vsharma…
vagisha Aug 16, 2024
ba4471d
Updated comments, and cleanup.
vagisha Aug 18, 2024
c685999
Removed duplicated resource strings
vagisha Aug 20, 2024
828fbe2
- Fix initial path for annotations file dialog
vagisha Aug 20, 2024
834a69d
Correction in MainForm.DisableConfig
vagisha Aug 21, 2024
56d49df
Merge remote-tracking branch 'remotes/origin/master' into Skyline/wor…
vagisha Aug 21, 2024
f207a3f
- Do not attempt to upload to Panorama if the Panorama settings are n…
vagisha Aug 23, 2024
bea89eb
Merge branch 'master' into Skyline/work/20240821_vsharma_autoqc-updat…
vagisha Sep 9, 2024
5b63732
Merge branch 'Skyline/work/20240821_vsharma_autoqc-updates-all' of ht…
vagisha Sep 9, 2024
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
using System.IO;
using SharedBatch;

namespace AutoQC
{

public class AnnotationsFileWatcher
{
private readonly Logger _logger;
private readonly ConfigRunner _configRunner;

private readonly FileSystemWatcher _fileWatcher;

public AnnotationsFileWatcher(Logger logger, ConfigRunner configRunner)
{
_fileWatcher = InitFileSystemWatcher();

_logger = logger;
_configRunner = configRunner;
}

private FileSystemWatcher InitFileSystemWatcher()
{
var fileWatcher = new FileSystemWatcher();
fileWatcher.Changed += (s, e) => FileChanged();
fileWatcher.Error += (s, e) => OnFileWatcherError(e);
return fileWatcher;
}

public void Init(AutoQcConfig config)
{
var mainSettings = config.MainSettings;

_fileWatcher.EnableRaisingEvents = false;

_fileWatcher.NotifyFilter = NotifyFilters.CreationTime | NotifyFilters.LastWrite;

_fileWatcher.Filter = Path.GetFileName(mainSettings.AnnotationsFilePath);

_fileWatcher.Path = Path.GetDirectoryName(mainSettings.AnnotationsFilePath);
}

public void StartWatching()
{
_fileWatcher.EnableRaisingEvents = true;
}

public void Stop()
{
_fileWatcher.EnableRaisingEvents = false;
}

private void FileChanged()
{
_logger.Log("Annotations file was updated.");
_configRunner.AnnotationsFileUpdated = true;
}

private void OnFileWatcherError(ErrorEventArgs e)
{
_logger.LogError(string.Format("There was an error watching the annotations file {0}.", _fileWatcher.Filter), e.GetException().ToString());
}
}
}
1 change: 1 addition & 0 deletions pwiz_tools/Skyline/Executables/AutoQC/AutoQC/AutoQC.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
<ItemGroup>
<Compile Include="AutoQcConfig.cs" />
<Compile Include="AutoQcConfigManager.cs" />
<Compile Include="AnnotationsFileWatcher.cs" />
<Compile Include="InvalidConfigSetupForm.cs">
<SubType>Form</SubType>
</Compile>
Expand Down

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

26 changes: 23 additions & 3 deletions pwiz_tools/Skyline/Executables/AutoQC/AutoQC/AutoQCConfigForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ public partial class AutoQcConfigForm : Form
private readonly DateTime _initialCreated;

private SkylineTypeControl _skylineTypeControl;
private string _lastEnteredPath;
private string _lastEnteredPath; // last entered path to Skyline .sky file
private string _lastEnteredAnnotationsFilePath;
private TabPage _lastSelectedTab;
private SkylineSettings _currentSkylineSettings;

Expand Down Expand Up @@ -130,6 +131,10 @@ private void SetInitialMainSettings(MainSettings mainSettings)
textAquisitionTime.Text = mainSettings.AcquisitionTime.ToString();
comboBoxInstrumentType.SelectedItem = mainSettings.InstrumentType;
comboBoxInstrumentType.SelectedIndex = comboBoxInstrumentType.FindStringExact(mainSettings.InstrumentType);
if (mainSettings.HasAnnotationsFile())
{
textAnnotationsFilePath.Text = mainSettings.AnnotationsFilePath;
}
}

private void SetDefaultMainSettings()
Expand All @@ -153,7 +158,8 @@ private MainSettings GetMainSettingsFromUi()
var resultsWindow = textResultsTimeWindow.Text;
var instrumentType = comboBoxInstrumentType.SelectedItem.ToString();
var acquisitionTime = textAquisitionTime.Text;
var mainSettings = new MainSettings(skylineFilePath, folderToWatch, includeSubfolders, qcFileFilter, removeResults, resultsWindow, instrumentType, acquisitionTime);
var annotationsFilePath = textAnnotationsFilePath.Text;
var mainSettings = new MainSettings(skylineFilePath, folderToWatch, includeSubfolders, qcFileFilter, removeResults, resultsWindow, instrumentType, acquisitionTime, annotationsFilePath);
return mainSettings;
}

Expand Down Expand Up @@ -182,6 +188,20 @@ private void btnFolderToWatch_Click(object sender, EventArgs e)
}
}

private void btnAnnotationsFilePath_Click(object sender, EventArgs e)
{
var dialog = new OpenFileDialog
{
Filter = TextUtil.FileDialogFilter("CSV (Comma delimited)", TextUtil.EXT_CSV),
InitialDirectory = FileUtil.GetInitialDirectory(_lastEnteredAnnotationsFilePath, textSkylinePath.Text)
};
if (dialog.ShowDialog(this) == DialogResult.OK)
{
textAnnotationsFilePath.Text = dialog.FileName;
_lastEnteredAnnotationsFilePath = dialog.FileName;
}
}

private void comboBoxFileFilter_SelectedIndexChanged(object sender, EventArgs e)
{
var selectedItem = comboBoxFileFilter.SelectedItem;
Expand Down Expand Up @@ -317,7 +337,7 @@ private void Save()
State.BaseState.AssertUniqueName(newConfig.Name, _action == ConfigAction.Edit);
newConfig.Validate(true);
}
catch (ArgumentException e)
catch (Exception e)
{
AlertDlg.ShowError(this, e.Message);
return;
Expand Down
Loading