-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ticket/PSB-260: Bug fix to VBN #2731
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
46b1a60
to
44809f2
Compare
a08c5c4
to
0c74c3c
Compare
@@ -12,48 +12,67 @@ class BehaviorSessionMetadataSchema(RaisingSchema): | |||
age_in_days = Int(required=True, description="Subject age") | |||
behavior_session_id = Int( | |||
required=True, | |||
allow_none=True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If allow_none
is True, then required should be False
if first_row["omitted"]: | ||
input_df = input_df.drop(first_row.name, axis=0) | ||
else: | ||
first_row = input_df.iloc[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first_row = input_df.iloc[0]
if not pd.isna(first_row["omitted"]):
if first_row["omitted"]:
input_df = input_df.drop(first_row.name, axis=0)
this needs to be modularized and not repeated
""" | ||
if column_name not in bs_row.index: | ||
warn(f"Warning, {column_name} not in metadata table. Unless this " | ||
"has been added it to skip_metadata_key or " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typos
|
||
return behavior_session_metadata | ||
|
||
def _retrieve_column(self, bs_row: pd.Series, column_name: str): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like this is retrieving a value from a series, the name implies it's retrieving a column from a dataframe
Warn that the column is missing. Add include_experiment_description to write nwb.
8bb542a
to
9e79b44
Compare
Expand logic to drop an omitted stimulus as first to the replay block of VBN.
Added logic to allow for VBN data to run through behavior nwb creation. Missing column not in VBN behavior_sessions metadata table.