Skip to content

Commit

Permalink
Replaced all references of Subject ID with Participant ID
Browse files Browse the repository at this point in the history
  • Loading branch information
rmanaem committed Oct 25, 2023
1 parent 13d207b commit 5e30e5f
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 38 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ _Next page criteria:_ A `participants.tsv` file must be uploaded to proceed to c

### Categorization page

The Categorization page is where you link the columns in your data table to the categories found in Neurobagel's metadata schema. Current categories include 'Subject ID', 'Age', 'Sex' and 'Diagnosis'. Aside from the 'Subject ID' which is a special case, categories represent different data types, 'Sex' and 'Diagnosis' are categorical while 'Age' is continuous.
The Categorization page is where you link the columns in your data table to the categories found in Neurobagel's metadata schema. Current categories include 'Participant ID', 'Age', 'Sex' and 'Diagnosis'. Aside from the 'Participant ID' which is a special case, categories represent different data types, 'Sex' and 'Diagnosis' are categorical while 'Age' is continuous.

![Home page with uploaded table and dictionary files](./images/readme_categorization_page.png)

Expand All @@ -135,7 +135,7 @@ The Categorization page is where you link the columns in your data table to the
1. Select a category in the category selection component on the left.
2. Select a column from your uploaded `participants.tsv` in the table on the right. (Its description from your `participants.json` - if uploaded - will be seen here as well.) This will paint the column's table row with the same color as the category you have selected. This column is now linked to that category and you will be able to annotate its values on the annotation page.

_Next page criteria:_ A column must be annotated as holding a 'Subject ID', and at least one other column must be linked with one of the other categories
_Next page criteria:_ A column must be annotated as holding a 'Participant ID', and at least one other column must be linked with one of the other categories

### Annotation page

Expand Down
2 changes: 1 addition & 1 deletion components/next-page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
instructions: {
"home": "",
"categorization": "One column must be categorized as 'Subject ID' and all assessment tools must be grouped to proceed",
"categorization": "One column must be categorized as 'Participant ID' and all assessment tools must be grouped to proceed",
"annotation": ""
}
}
Expand Down
6 changes: 3 additions & 3 deletions cypress/component/category-select-table.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const computed = {

return [

"Subject ID",
"Participant ID",
"Age",
"Sex",
"Diagnosis",
Expand All @@ -23,7 +23,7 @@ const computed = {

categoryClasses: {

"Subject ID": "category-style-1",
"Participant ID": "category-style-1",
"Age": "category-style-2",
"Sex": "category-style-3",
"Diagnosis": "category-style-4",
Expand All @@ -35,7 +35,7 @@ const computed = {

const categoryColorMap = {

"Subject ID": "rgb(164, 208, 90)",
"Participant ID": "rgb(164, 208, 90)",
"Age": "rgb(127, 23, 167)",
"Sex": "rgb(70, 76, 174)",
"Diagnosis": "rgb(236, 197, 50)",
Expand Down
6 changes: 3 additions & 3 deletions cypress/component/column-linking-table.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe("The column-linking-table component", () => {

return [

"Subject ID",
"Participant ID",
"Age",
"Sex",
"Diagnosis",
Expand Down Expand Up @@ -69,7 +69,7 @@ describe("The column-linking-table component", () => {

categoryClasses: {

"Subject ID": "category-style-1",
"Participant ID": "category-style-1",
"Age": "category-style-2",
"Sex": "category-style-3",
"Diagnosis": "category-style-4",
Expand All @@ -88,7 +88,7 @@ describe("The column-linking-table component", () => {

props = {

selectedCategory: "Subject ID"
selectedCategory: "Participant ID"
};

});
Expand Down
12 changes: 6 additions & 6 deletions cypress/e2e/app/simple-e2etest.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe("End to end test using a simple UI path through the app", () => {

categories: [

["Subject ID", 1],
["Participant ID", 1],
["Age", 1]
]
};
Expand Down Expand Up @@ -62,23 +62,23 @@ describe("End to end test using a simple UI path through the app", () => {

if ( cy.datasetMeetsTestCriteria("categorization", p_dataset, testCriteria) ) {

// 2. Go through categorization page, categorizing subject ID and age columns in the table
// 2. Go through categorization page, categorizing Participant ID and age columns in the table

// A. Assert nav and next button are not yet be enabled
cy.assertNextPageAccess("annotation", false);

// B. Categorize "participant_id" as "Subject ID"
cy.categorizeColumn("Subject ID", p_dataset["category_columns"]["Subject ID"][0]);
// B. Categorize "participant_id" as "Participant ID"
cy.categorizeColumn("Participant ID", p_dataset["category_columns"]["Participant ID"][0]);

// C. Assert nav and next button are not yet enabled
// For annotation page to be enabled, subject ID and
// For annotation page to be enabled, Participant ID and
// at least one other column must be categorized.
cy.assertNextPageAccess("annotation", false);

// D. Categorize "age" as "Age"
cy.categorizeColumn("Age", p_dataset["category_columns"]["Age"][0]);

// Since Age and subject ID have been categorized
// Since Age and Participant ID have been categorized
// annotation page is no accessible.
cy.assertNextPageAccess("annotation", true);

Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/page/annotation-pagetests.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe("tests on annotation page ui with programmatic state loading and store

categories: [

["Subject ID", 1],
["Participant ID", 1],
["Age", 1]
]
};
Expand Down Expand Up @@ -96,7 +96,7 @@ describe("tests on annotation page ui with programmatic state loading and store

categories: [

["Subject ID", 1],
["Participant ID", 1],
["Sex", 1]
]
};
Expand Down Expand Up @@ -139,7 +139,7 @@ describe("tests on annotation page ui with programmatic state loading and store

categories: [

["Subject ID", 1],
["Participant ID", 1],
["Diagnosis", 1]
]
};
Expand Down
36 changes: 18 additions & 18 deletions cypress/e2e/page/categorization-pagetests.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@ describe("Tests on categorization page ui via programmatic state loading and sto
});

// Description of task:
// 1. Selects 'Subject ID' category
// 2. Links one column as containing subject ID
// 1. Selects 'Participant ID' category
// 2. Links one column as containing Participant ID
// Expected results: Annotation nav and Next page button are enabled
it("Single column categorization; categorize subject ID", () => {
it("Single column categorization; categorize Participant ID", () => {

// 0. Categories required for this test and the number of required columns for each category
const testCriteria = {

categories: [

["Subject ID", 1]
["Participant ID", 1]
]
};

Expand All @@ -65,27 +65,27 @@ describe("Tests on categorization page ui via programmatic state loading and sto
// 1. Assert annotation nav and next page button are disabled
cy.assertNextPageAccess("annotation", false);

// 2. Categorize first subject id column in table as 'Subject ID'
cy.categorizeColumn("Subject ID", p_dataset["category_columns"]["Subject ID"][0]);
// 2. Categorize first participant id column in table as 'Participant ID'
cy.categorizeColumn("Participant ID", p_dataset["category_columns"]["Participant ID"][0]);

// 3. Assert that annotation nav and next page button are disabled
cy.assertNextPageAccess("annotation", false);
}
});

// Description of task:
// 1. Selects 'Subject ID' category + 'Age' category
// 2. Links one column as a subject ID
// 1. Selects 'Participant ID' category + 'Age' category
// 2. Links one column as a Participant ID
// 3. Links another column as age
// Expected results: Annotation nav and Next page button are enabled
it("Multiple column categorization; categorize subject ID and age", () => {
it("Multiple column categorization; categorize participant ID and age", () => {

// 0. Categories required for this test and the number of required columns for each category
const testCriteria = {

categories: [

["Subject ID", 1],
["Participant ID", 1],
["Age", 1]
]
};
Expand All @@ -95,8 +95,8 @@ describe("Tests on categorization page ui via programmatic state loading and sto
// 1. Assert annotation nav and next page button are disabled
cy.assertNextPageAccess("annotation", false);

// 2. Categorize a column in the table as 'Subject ID'
cy.categorizeColumn("Subject ID", p_dataset["category_columns"]["Subject ID"][0]);
// 2. Categorize a column in the table as 'Participant ID'
cy.categorizeColumn("Participant ID", p_dataset["category_columns"]["Participant ID"][0]);

// 3. Categorize a column in the table as 'Age'
cy.categorizeColumn("Age", p_dataset["category_columns"]["Age"][0]);
Expand All @@ -107,29 +107,29 @@ describe("Tests on categorization page ui via programmatic state loading and sto
});

// Description of task:
// 1. Selects 'Subject ID' category
// 2. Links one column as a subject ID
// 1. Selects 'Participant ID' category
// 2. Links one column as a Participant ID
// Expected results: Color of linked column changes
it("Make sure the color changes after clicking", () => {

cy.get("[data-cy='column-linking-table'] tbody > tr")
.contains(p_dataset["category_columns"]["Subject ID"][0])
.contains(p_dataset["category_columns"]["Participant ID"][0])
.parent()
.invoke("css", "background-color")
.then((p_oldColor) => {

// Act

// 1. Categorize a row in the column linking table with 'Subject ID' category from
// 1. Categorize a row in the column linking table with 'Participant ID' category from
// the category select table
cy.categorizeColumn("Subject ID", p_dataset["category_columns"]["Subject ID"][0]);
cy.categorizeColumn("Participant ID", p_dataset["category_columns"]["Participant ID"][0]);

// Assert

// 2. Check that the new color of the categorized row is different than its previous
// background color
cy.get("[data-cy='column-linking-table'] tbody > tr")
.contains(p_dataset["category_columns"]["Subject ID"][0])
.contains(p_dataset["category_columns"]["Participant ID"][0])
.parent()
.should("not.have.css", "background-color", p_oldColor);
});
Expand Down
2 changes: 1 addition & 1 deletion cypress/unit/store-getter-getAnnotationComponent.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe("The getAnnotationComponent getter", () => {

categories: {

"Subject ID": {},
"Participant ID": {},
"Age": {

componentName: "annot-continuous-values"
Expand Down
2 changes: 1 addition & 1 deletion cypress/unit/store-mutation-updateAnnotationCount.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe("updateAnnotationCount", () => {

categories: {

"Subject ID": {},
"Participant ID": {},
"Age": { componentName: "annot-continuous-values" },
"Sex": { componentName: "annot-categorical" },
"Diagnosis": { componentName: "annot-categorical" }
Expand Down

0 comments on commit 5e30e5f

Please sign in to comment.