scRNA-seq CRISPR data: sc.read_10x_h5 does not include guide sequence in the count matrix and .var
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.6k
- Forks
- 779
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 27
Description
The regular read_10x_h5() function neglects the gRNA in scRNA-seq CRISPR data which were provided to cell ranger (does not show In adata.X and adata.var). However, with the read_mtx() it is included in the adata.X and the gene_ids can be manually added read in from the features.tsv.gz file. @vitkl.
Example
adata = sc.read_mtx('matrix.mtx.gz')
print(adata.X.T.shape)
adata_raw=sc.read_10x_h5('filtered_feature_bc_matrix.h5')
print(adata_raw.X.shape)
(12797, 36685)
(12797, 36601)
Versions
- anndata 0.8.0
- scanpy 1.9.1
Contributor guide
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
Start at sc.read_10x_h5 and compare its handling of CRISPR features with sc.read_mtx, using the issue's matrix dimensions and features.tsv.gz reference as the expected behavior. Confirm that guide sequences are represented in adata.X and adata.var, then verify the example with the reported Scanpy 1.9.1 and anndata 0.8.0 versions.
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
- 45/100