Skip to content

Commit

Permalink
Avoid setting units if not exists. Use global base directory in results
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettmflynn committed Apr 10, 2024
1 parent a3a6bf7 commit 3c2e48c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
25 changes: 15 additions & 10 deletions schemas/base-metadata.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,16 +156,21 @@ export const preprocessMetadataSchema = (schema: any = baseMetadataSchema, globa
order: ["channel_name", "group_name", "shank_electrode_number", ...UV_PROPERTIES]
})

ecephys.properties["Units"].title = "Summarized Units"

updateEcephysTable("Units", copy, {
properties: {
clu_id: {
title: 'Cluster ID',
}
},
order: ["unit_id", "unit_name", "clu_id", "group_id"]
})
if (ecephys.properties["Units"]) {

ecephys.properties["Units"].title = "Summarized Units"


updateEcephysTable("Units", copy, {
properties: {
clu_id: {
title: 'Cluster ID',
}
},
order: ["unit_id", "unit_name", "clu_id", "group_id"]
})

}

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,9 @@ export class GuidedPathExpansionPage extends Page {

await this.form.validate();

const globalBaseDirectory = this.workflow.base_directory.value;


const finalStructure = {};
for (let key in structure) {
const entry = { ...structure[key] };
Expand All @@ -337,9 +340,13 @@ export class GuidedPathExpansionPage extends Page {
if (fstring.split(".").length > 1) entry.file_path = fstring;
else entry.folder_path = fstring;
delete entry.format_string_path;

if (!entry.base_directory && globalBaseDirectory) entry.base_directory = globalBaseDirectory

finalStructure[key] = entry;
}


if (Object.keys(finalStructure).length === 0) {
const message =
"Please configure at least one interface. <br/><small>Otherwise, revisit <b>Pipeline Workflow</b> to update your configuration.</small>";
Expand Down

0 comments on commit 3c2e48c

Please sign in to comment.