1. SCIV usage

1.1 Standard pipeline

1.1.1 Import library and environment setup

Create environment and download SCIV package.

conda create --name sciv python=3.12
conda activate sciv
pip install sciv

Import package and view version information.

import sciv

sciv.__version__

1.1.2 Download example files

We need to download the scATAC-seq and fine-mapping result files. These two files can be implemented by calling the following functions.

Download PBMC case file: GSE139369_ELM_sim_snapATAC2.h5ad

adata = sciv.dl.read_sc_atac_file()

Download the fine-mapping results for monocytes, red blood cells, CD4+ and CD8+ T cells.

variants, trait_info = sciv.dl.read_trait_file()

1.1.3 Run SCIV

Obtain TRS results by executing the SCIV process using the sciv.ml.core function.

  1. Create Python file:

touch sciv_pbmc.py
  1. The file content is as follows:

# -*- coding: UTF-8 -*-

import sciv

if __name__ == '__main__':

    # scATAC-seq data
    adata = sciv.dl.read_sc_atac_file()

    # read variant information
    variants, trait_info = sciv.dl.read_trait_file()

    # run
    trs = sciv.ml.core(
        adata=adata,
        variants=variants,
        trait_info=trait_info,
        save_path="./result",
        model_dir="./result/poisson_vi",
        is_file_exist_loading=True
    )

    print(trs)
  1. Executable the file:

python3 sciv_pbmc.py

1.2 SCIV execution process for each step