Skip to content

xz-stjude/covepitope-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CovEpitope Python SDK

This is a companion Python package for the CovEpitope web application. It contains scripts that help process data for CovEpitope.

Table of content

Installation

This SDK depends on the CoNGA package by Philip Bradley (@phbradley). Therefore you need to install CoNGA before installing the SDK. The README of CoNGA details various ways to install it, but here is how I typically do it using Conda.

Install Anaconda/Miniconda

Please refer to the official installation instructions to install Anaconda/Miniconda.

Install CoNGA

It is recommended to create a new Conda environment for this installation.

First, create a file named conda_env.yaml with the following content:

name: conga-covepitope
channels:
  - conda-forge
  - bioconda
  - intel
  - defaults
dependencies:
  - conda-forge::python=3.6
  - conda-forge::ipython
  - conda-forge::leidenalg
  - conda-forge::louvain
  - conda-forge::notebook
  - conda-forge::numba
  - conda-forge::pytables
  - conda-forge::python-igraph
  - conda-forge::scikit-learn
  - conda-forge::seaborn
  - conda-forge::statsmodels
  - intel::tbb

Save this file and run the following bash command in the same directory to create the new Conda environment:

conda env create -f conda_env.yaml
conda activate conga-covepitope

Clone the latest CoNGA source code from its GitHub repo and compile the C++ source code into binary:

git clone https://github.com/phbradley/conga.git && cd conga && (cd tcrdist_cpp && make)

Install the CoNGA python package by running:

pip install -e .

Note: It is very important to use the -e option. Otherwise, some data files will not be copied properly.

Install the CovEpitope Python SDK

Run the following command in Bash:

git clone https://github.com/xz-stjude/covepitope-py.git
cd covepitope-py
pip install .

And you are all set! A command called covepitope_convert_from_10x should be installed to your shell. You can see how to run it by executing the following command in your bash shell:

covepitope_convert_from_10x -h

Usage

Convert the 10x filtered contig annotation to the vertices/edges CSV files needed for CovEpitope visualization (assuming the FCA file generated by 10x is named filtered_contig_annotations.csv):

covepitope_convert_from_10x filtered_contig_annotations.csv vertices.csv edges.csv

After running the above command, you should be able to see the vertices.csv and edges.csv appearing in the current directory. Upload these two files onto CovEpitope's web interface to see the visualization.

Contact

If you have any trouble installing or using this package, please contact me (Xun Zhu) at [email protected].

About

The Python SDK for CovEpitope

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages