BasisResearch / chirho

An experimental language for causal reasoning
https://basisresearch.github.io/chirho/getting_started.html
Apache License 2.0
168 stars 11 forks source link

Add single-cell RNA seq example #237

Closed agrawalraj closed 1 year ago

agrawalraj commented 1 year ago

We can look at this open-source project to easily load in single-cell RNA seq data in batches in pytorch:

https://chanzuckerberg.github.io/cellxgene-census/notebooks/experimental/pytorch.html

agrawalraj commented 1 year ago

When I tried installing cellxgene-census, the alias dependency requires version 23.1.0 or above. I initially had an earlier version and got the error TypeError: field() got an unexpected keyword argument 'alias'. To use the PyTorch dataloader by importing import cellxgene_census.experimental.ml as census_ml, you need to install torchdata (missing dependency in the cellxgene-census package).

qinqian commented 1 year ago

scvi has a more mature api for batch operation of single cell data with pytorch datasets. please see here.