Skip to content

Commit

Permalink
parametrize census config
Browse files Browse the repository at this point in the history
  • Loading branch information
ebezzi committed Jun 3, 2024
1 parent 5f19a27 commit 48670ff
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions tools/models/scvi/scvi-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ census:
null
obs_query_model: # Required when loading data for model training. Do not change.
'is_primary_data == True and nnz >= 300'
version:
"2024-05-20"
hvg:
top_n_hvg:
8000
Expand Down
5 changes: 3 additions & 2 deletions tools/models/scvi/scvi-create-latent-update.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
with open(file) as f:
config = yaml.safe_load(f)

census = cellxgene_census.open_soma(census_version="2024-05-20")

census_config = config.get("census")
experiment_name = census_config.get("organism")
obs_value_filter = census_config.get("obs_query")

version = census_config.get("version")
census = cellxgene_census.open_soma(census_version=version)

hv = pd.read_pickle("hv_genes.pkl")
hv_idx = hv[hv].index

Expand Down
5 changes: 3 additions & 2 deletions tools/models/scvi/scvi-prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@
with open(file) as f:
config = yaml.safe_load(f)

census = cellxgene_census.open_soma(census_version="2023-12-15")

census_config = config.get("census")
experiment_name = census_config.get("organism")
obs_query = census_config.get("obs_query")
obs_query_model = census_config.get("obs_query_model")

version = census_config.get("version")
census = cellxgene_census.open_soma(census_version=version)

if obs_query is None:
obs_value_filter = obs_query_model
else:
Expand Down

0 comments on commit 48670ff

Please sign in to comment.