Skip to content

[SYNPY-1786] Added examples for getting data into a grid#1335

Open
andrewelamb wants to merge 12 commits intodevelopfrom
SYNPY-1786
Open

[SYNPY-1786] Added examples for getting data into a grid#1335
andrewelamb wants to merge 12 commits intodevelopfrom
SYNPY-1786

Conversation

@andrewelamb
Copy link
Contributor

@andrewelamb andrewelamb commented Mar 5, 2026

Problem:

Curator Extension users asked for simple example scripts for adding data into a grid for both file-based and record-based curation.

Solution:

Two simple examples were added.

@andrewelamb andrewelamb requested a review from a team as a code owner March 5, 2026 15:51
@andrewelamb andrewelamb marked this pull request as draft March 5, 2026 15:51
@andrewelamb andrewelamb changed the title added examples for getting data into a grid [SYNPY-1786] Added examples for getting data into a grid Mar 5, 2026
@andrewelamb andrewelamb marked this pull request as ready for review March 5, 2026 15:54

# 5. Store the record set with the path to the CSV file as an annotation.
# TODO: Add functionality to store data in a RecordSet programmatically
# This doesn't store the data in the RecordSet
Copy link
Member

Choose a reason for hiding this comment

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

What does this comment mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I clarified it, but essentially it's a placeholder for SYNPY-1781

Copy link
Member

Choose a reason for hiding this comment

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

Got it. Technically you can already do this but we would have to merge the CSV client side and upload a new complete copy of the data.

We should wait though to use the import featurem

Copy link
Member

@BryanFauble BryanFauble left a comment

Choose a reason for hiding this comment

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

Thanks for adding these examples, they'll be really helpful for folks getting started with Grid curation. There are a few small things to clean up before we merge.

Note: This comment was drafted with AI assistance and reviewed by me for accuracy.

@andrewelamb andrewelamb requested a review from BryanFauble March 5, 2026 18:14
Copy link
Contributor

@linglp linglp left a comment

Choose a reason for hiding this comment

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

@andrewelamb Thanks for putting together the documentation. In your example, you are reading the data model CSV and trying to use its rows as annotation data, and even when I tested with our own example CSVs, headers like "Valid Values" (it should be ValidValues) will trigger an error.

Also, based on my understanding, Bulk RNA-seq Assay or Biospecimen would be better examples for file-based tasks since they describe actual data files. Patient records is tabular data records rather than file-based in my opinions.

After you finish all the changes, could you run both scripts on your end to make sure that everything is working smoothly? I had some issues when I tested it out on my end.

@andrewelamb andrewelamb requested a review from linglp March 5, 2026 20:39
Copy link
Contributor

@linglp linglp left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks

@andrewelamb
Copy link
Contributor Author

@BryanFauble It looks like you requested a change, could you re-review?

syn.login()

# 3. Get annotations from CSV file
annotations = pd.read_csv(CSV_PATH).to_dict(orient="records")
Copy link
Member

@thomasyu888 thomasyu888 Mar 6, 2026

Choose a reason for hiding this comment

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

This currently bypasses the grid altogether by pushing data in as annotations. Can we add a TODO comment here?

Nit: Could we leverage the entity view API to push the CSV directly into the entity view?

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.

4 participants