scverse / scverse/scanpy

scRNA-seq CRISPR data: sc.read_10x_h5 does not include guide sequence in the count matrix and .var

Open
#2,398 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area - IO
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.