Skip to content

qwerty239qwe/scTenifoldpy

Repository files navigation

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

About

A python package implements scTenifoldnet and scTenifoldknk

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages