<jupyter_start><jupyter_text>3. Performing virtual knock-out on the data<jupyter_code>import scTenifold as st
from scTenifold.data import get_test_df
df = get_test_df(100, 100)
knk = st.scTenifoldKnk(data=df,
                       ko_genes=["NG-1"],  # the gene you wants to knock out
                       qc_kws={"min_lib_size": 10})<jupyter_output><empty_output><jupyter_text>Run scTenifoldKnk.build()Just like scTenifoldNet, this method will use all kws inside the instance to run scTenifold pipeline (qc_kws, nc_kws, ko_kws, td_kws, ma_kws, dr_kws)<jupyter_code>knk.build()<jupyter_output><empty_output><jupyter_text>Run step separately<jupyter_code>knk = st.scTenifoldKnk(data=df,
                       qc_kws={"min_lib_size": 10})
knk.run_step("qc")
knk.run_step("nc", n_cpus=1)
knk.network_dict["WT"]
knk.run_step("td")
knk.tensor_dict["WT"]
knk.run_step("ko", ko_genes=["NG-1"], ko_method="default")
knk.tensor_dict["KO"]
knk.run_step("ma")
knk.run_step("dr", sorted_by="adjusted p-value")
knk.d_regulation<jupyter_output><empty_output><jupyter_text>Save outputed objects: pcNets, tensor decompositions, manifold alignments, regulation dataframe<jupyter_code>knk.save("./path")<jupyter_output><empty_output><jupyter_text>to load the result, use<jupyter_code>knk2 = st.scTenifoldKnk.load("./path")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13452914798206278, 'fraction_numerical': 0.011210762331838564, 'mean_word_length': 6.160427807486631, 'pattern_counts': {'":': 2, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '95117', 'license': 'MIT', 'n_tokens_mistral': 555, 'n_tokens_neox': 518, 'n_words': 85, 'path': 'docs/source/3_knock_out.ipynb', 'repo_name': 'qwerty239qwe/scTenifoldpy', 'size': '1338'}