Giter Club home page Giter Club logo

sctransformpy's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sctransformpy's Issues

SCTransform fails on AnnData objects with np.ndarray X

Hi,
I noticed that SCTransform fails on AnnData objects that have their X stored as np.ndarray instead of a scipy matrix:

File "/data1/fteufel/miniconda_installation/envs/qsc_env/lib/python3.9/site-packages/SCTransform.py", line 104, in SCTransform
    genes_cell_count = X.sum(0).A.flatten()
AttributeError: 'numpy.ndarray' object has no attribute 'A

Workaround:

adata.X = sparse.csr_matrix(adata.X)
SCTransform(adata, inplace=True)

SCTransform takes much time

Hi, thanks for the package. I am trying to run SCTransform on the pbmc3k dataset but it takes much time. In your example notebooks, it says that it should take about 3 min but I am running this since 25 minutes and no I have no output. I put flags in the code to see what takes time and it seems that it is the line

pool.map(_parallel_wrapper, range(umi_bin.shape[1]), chunksize=pc_chunksize)

Note that it should do this 4 times (as it is in a for loop of size 4) and in 20 minutes I have not been able to run this once.

Here is my code to reproduce:

from SCTransform import SCTransform
import scanpy as sc
import matplotlib.pyplot as plt
import numpy as np
import time

adata = sc.datasets.pbmc3k()
adata_sct = SCTransform(
    adata,
    min_cells=5,
    gmean_eps=1,
    n_genes=2000,
    n_cells=None,  # use all cells
    bin_size=500,
    bw_adjust=3,
    inplace=False,
)

I have a very good CPU (64 Gb).

Any idea on what is happening ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.