-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add pciseq #7
base: main
Are you sure you want to change the base?
Add pciseq #7
Conversation
@@ -61,7 +73,7 @@ | |||
}, | |||
tables={ | |||
"table": ad.AnnData( | |||
obs=sdata.tables["table"].obs[["cell_id", "region"]], | |||
obs=pd.DataFrame(cell_id_col), # have to make the series a dataframe for some reason |
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.
adata.obs must be a data frame, can kick out the comment
'coordinate_system': 'global', | ||
'output': '../pciSeq_assigned_transcripts.zarr', | ||
|
||
'input_scrnaseq': '../brain_scrnaseq_subsample_WMB-10X.h5ad', |
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.
Did you test with task_ist_preprocessing/resources_test/task_ist_preprocessing/mouse_brain_combined/scrnaseq_reference.h5ad
?
good to stick with the given resources in the VIASH START END section
} | ||
## VIASH END | ||
|
||
# # Set coordinate system to default if not given |
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.
can kick out unnecessary comments
# Assign cell ids to transcripts | ||
print('Assigning transcripts to cell ids', flush=True) | ||
y_coords = transcripts.y.compute().to_numpy(dtype=np.int64) | ||
x_coords = transcripts.x.compute().to_numpy(dtype=np.int64) |
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.
does pciseq require integer positions?
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.
use floats if fine for pciseq
# - segmentation 3D, transcripts 2D | ||
# - segmentation 2D, transcripts 3D | ||
|
||
# Subset sdata to transcripts with cell ids |
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.
is this needed?
shutil.rmtree(par["output"]) | ||
sdata_transcripts_only.write(par['output']) | ||
|
||
# TODO: is this a problem? |
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.
Am also confused why this is always printed, it's not a problem. When writing the object (as done here) and loading again, everything is fine.
Describe your changes
Added the pciSeq method to assignment methods
Modified the basic assignment method to create new cell_id index only from segmentation image, not prior AnnData
Checklist before requesting a review
I have performed a self-review of my code
Check the correct box. Does this PR contain:
Proposed changes are described in the CHANGELOG.md
CI Tests succeed and look good!