Unexpected behavior in AnnDataSet subset
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 323
- Forks
- 43
- PR merge metrics
- No merged PRs in 30d
Description
Hi there,
When I run code like this:
data = snap.read_dataset("concatenated.h5ads",mode='r+')
data.obs['doubcall']=list(np.random.choice([True,False],data.shape[0]))
data.subset(obs_indices=pd.Series(data.obs_names)[~data.obs['doubcall']],out="concatenated_nodoublet")
It creates a directory concatenated_nodoublet, but this contains no files, while all of the h5ads within the AnnDataSet are copied in the locations where they are pointed to, with the suffix .h5ad.h5ad. I'm also wondering if this function is supposed write a new AnnDataSet file so that the datasets in this new directory can be easily accessed? Or does it inplace modify the original h5ads file?
Thanks!
Matthew
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the example using snap.read_dataset and AnnDataSet.subset with the shown concatenated.h5ads input. Inspect how the subset output directory and referenced .h5ad paths are handled, then establish whether a new AnnDataSet file should be created or the original files modified. Done means the output has usable files with consistent paths and documented access behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100