Skip to content

Commit

Permalink
Add references
Browse files Browse the repository at this point in the history
  • Loading branch information
yihming committed May 14, 2022
1 parent dbcb6e7 commit 132d343
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pegasusio/hdf5_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,9 @@ def _process_attrs(


def write_10x_h5(data: MultimodalData, output_file: str) -> None:
"""Follow 10x hdf5 format description (https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/advanced/h5_matrices).
Restricted to GEX modality only.
"""
unidata = data._unidata
nmat = len(unidata.matrices)
compression_method = "gzip"
Expand All @@ -356,6 +359,7 @@ def write_10x_h5(data: MultimodalData, output_file: str) -> None:
assert unidata.get_modality() == "rna", "Only Gene Expression count matrix is accepted!"

def _create_h5_string_dataset(group, name, data, shape=None, fillvalue=None):
"""Inspired by 10x cellranger create_hdf5_string_dataset function (https://github.com/10XGenomics/cellranger/blob/master/lib/python/cellranger/io.py#L323-L358)"""
kwargs = {
'chunks': (chunk_size,),
'maxshape': (None,),
Expand Down

0 comments on commit 132d343

Please sign in to comment.