Skip to content

Commit

Permalink
fix sparse reading
Browse files Browse the repository at this point in the history
  • Loading branch information
VolkerBergen committed Aug 22, 2018
1 parent 1279d84 commit 59aee04
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
4 changes: 3 additions & 1 deletion scvelo/plotting/velocity.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

def velocity(adata, var_names=None, basis='umap', mode='deterministic', fits='all', layers='all', color=None,
fontsize=8, color_map='RdBu_r', size=.2, alpha=.5, ax=None, **kwargs):
"""Plots spliced against unspliced expressions with steady-state fit along with expression and velocity in embedding
"""Phase and velocity plot for set of genes
The phase plot shows Plots spliced against unspliced expressions with steady-state fit along with expression and velocity in embedding
Arguments
---------
Expand Down
6 changes: 3 additions & 3 deletions scvelo/preprocessing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ def read_loom_layers(file_name, backup_url=None):
print("OS error: {0}".format(OSError))

with loompy.connect(file_name, 'r') as lc:
X = lc.layer['spliced'][:, :].sparse().T.tocsr()
X = lc.layer['spliced'].sparse().T.tocsr()

layers = OrderedDict()
layers['spliced'] = lc.layer["spliced"][:, :].sparse().T.tocsr()
layers['unspliced'] = lc.layer["unspliced"][:, :].sparse().T.tocsr()
layers['spliced'] = lc.layer["spliced"].sparse().T.tocsr()
layers['unspliced'] = lc.layer["unspliced"].sparse().T.tocsr()

obs = dict(lc.col_attrs)
obs['obs_names'] = obs.pop('CellID')
Expand Down
2 changes: 1 addition & 1 deletion scvelo/preprocessing/fractions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


def print_fraction_of_abundances(adata, cleanup_layers=True, copy=False):
"""Computes the fraction of abundances of spliced, unspliced and ambiguous counts
"""Fraction of spliced/unspliced/ambiguous abundances
Arguments
---------
Expand Down
4 changes: 3 additions & 1 deletion scvelo/tools/velocity_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ def compute(self, ixs):


def velocity_graph(adata, vkey='velocity', n_recurse_neighbors=2, n_neighbors=None, n_jobs=1, sqrt_transform=False, copy=False):
"""Computes a velocity graph based on cosine similarities between velocities and potential cell state transitions
"""Computes a velocity graph based on cosine similarities
The cosine similarities are computed between velocities and potential cell state transitions
Arguments
---------
Expand Down

0 comments on commit 59aee04

Please sign in to comment.