Skip to content

File watcher for Signal Data Assay#1021

Open
labkey-klum wants to merge 7 commits into
developfrom
fb_signaldata_filewatcher
Open

File watcher for Signal Data Assay#1021
labkey-klum wants to merge 7 commits into
developfrom
fb_signaldata_filewatcher

Conversation

@labkey-klum

Copy link
Copy Markdown
Contributor

Rationale

Implementation of a file watcher to automate the importing of chromatogram data into the signal data assay. The file watcher is triggered on the metadata file (.csv or .tsv) extensions are allowed. The file watcher will parse the metadata file and make copies of the source data files into a server managed location.

We will register the data files as input datas to the run and the metadata file will get registered as the run output data. Once validation is completed the run will get created. The resulting run should be exactly the same as one that is created manually through the import UI. The run ID is generated automatically using the same date stamp that is used for the input data folder.

@labkey-klum labkey-klum self-assigned this Jun 8, 2026
String name = Objects.toString(row.get(INPUT_NAME), "");
String dataFilePath = Objects.toString(row.get(INPUT_DATA_FILE), "").trim();

// validate the existance of the datafile property and make a copy to the run root

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
// validate the existance of the datafile property and make a copy to the run root
// validate the existence of the datafile property and make a copy to the run root

for (Map<String, Object> row : dataRows)
{
// parse out the name and datafile properties
String name = Objects.toString(row.get(INPUT_NAME), "");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is name required (should it have an isBlank check)? also, should it use trim()?

Comment on lines +185 to +189
if (uri != null)
{
WebdavResource resource = WebdavService.get().lookup(uri.getPath());
if (resource != null)
{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should either of these if statements have else blocks that log warnings or errors if uri is null or resource is null?

}

// create and save the run
AssayProvider provider = AssayService.get().getProvider(protocol);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

minor: should we resolve the AssayProvider above when we resolve the protocol so that we can also error if the provider is not found (somewhere around line 94)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants