Code Monkey home page Code Monkey logo

sctenifoldpy's Introduction

scTenifoldpy

PyPI pyversions Pattern GitHub license

This package is a Python version of scTenifoldNet and scTenifoldKnk. If you are a R/MATLAB user, please install them to use their functions. Also, please cite the original paper properly if you are using this in a scientific publication. Thank you!

Installation

pip install scTenifoldpy

Usages

scTenifold can be imported as a normal Python package:

scTenifoldNet

from scTenifold.data import get_test_df
from scTenifold import scTenifoldNet

df_1, df_2 = get_test_df(n_cells=1000), get_test_df(n_cells=1000)
sc = scTenifoldNet(df_1, df_2, "X", "Y", qc_kws={"min_lib_size": 10})
result = sc.build()

scTenifoldKnk

from scTenifold.data import get_test_df
from scTenifold import scTenifoldKnk

df = get_test_df(n_cells=1000)
sc = scTenifoldKnk(data=df,
                   ko_method="default",
                   ko_genes=["NG-1"],  # the gene you wants to knock out
                   qc_kws={"min_lib_size": 10, "min_percent": 0.001},
                   )
result = sc.build()

Command Line tool

Once the package is installed, users can use commandline tool to generate all the results
Use this command to create a config.yml file,

python -m scTenifold config -t 1 -p ./net_config.yml

Next, open the config file, add data path, and edit the parameters.
Then use the command below to produce the scTenifoldNet results:

python -m scTenifold net -c ./net_config.yml -o ./output_folder

Or use the command below to produce the knockout results:

python -m scTenifold knk -c ./knk_config.yml -o ./output_folder

sctenifoldpy's People

Contributors

qwerty239qwe avatar yjgeno avatar

Stargazers

Leandro A. Bugnon avatar Gawain avatar Jiwon Kim avatar Johnson Zhou avatar Nureen Hanisah Mohamad Zaki avatar Jianxiang Shi avatar Steven Chiu avatar  avatar

Watchers

KJ avatar James Cai avatar  avatar Nureen Hanisah Mohamad Zaki avatar

sctenifoldpy's Issues

Timeout error during histogram QC

Hi, thank you for creating this alternative to the R package!
I'm having trouble finding how to disable the histogram or redirecting the output into a png/pdf during the qc step, as it's causing a Timeout error.
Appreciate your help!

kws.json does not return value for "ko_genes" (Version 0.1.3)

Hi,
It seems like the kws.json file has empty value for "ko_genes" when I use an arg from argparse module.

When input directly (per the tutorial in the docs)
knk.run_step('ko', ko_genes = ["NG-6"], ko_method = 'default')

KeyError: "None of [Index(['NG-6'], dtype='object')] are in the [index]"

knk.run_step('ko', ko_genes = f'[{args.gene}]', ko_method = 'default')

>>> knk.ko_genes
[]

Also:
knk.run_step('ko', ko_genes = 'NG-6', ko_method = 'default')

>>> knk.ko_genes
[]

What is the correct format for the ko_gene input?

scTenifoldKnk does not return diffRegulation

Hello,
Thank you for making this package available with python. However, some of the results seem to be missing for the KO, compared to the R package. I was trying to use the python version for scTenifoldKnk and it appears that the differential regulation is not returned. My output folder includes kws.json, nc, qc, and td for results but not dr. Looking through core/_base.py
I think the issue might perhaps be on line 164 , where 'td' might be listed again instead of 'dr'.

If this is not the source of the issue and you have insight to what else may be the cause, I'd appreciate any assistance with this. Thank you in advance!

ModuleNotFoundError: No module named 'scTenifold.core'

Thank you for your great package. I have problems loading the scTenifold.data import get_test_dfmodule after installation of scTenifoldpy. How could I fix this?

pip install scTenifoldpy

from scTenifold.data import get_test_df

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-f1722669da56> in <module>
----> 1 from scTenifold.data import get_test_df

~/anaconda3/lib/python3.8/site-packages/scTenifold/__init__.py in <module>
----> 1 from scTenifold.core import *
      2 
      3 
      4 __all__ = ['scTenifoldNet', 'scTenifoldKnk',
      5            "sc_QC", "make_networks", "manifold_alignment", "d_regulation"]

ModuleNotFoundError: No module named 'scTenifold.core'

Doc: Tutorials

Write scTenifold tutorials

  • data processing
  • building networks
  • virtual KO
  • visualization

Dev: Add more EDA function

Implement EDA functions

  • basic stat info of data
  • more visualization functions (heatmap, clustermap,...)
  • map cell score to low dim plots

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.