Skip to content

jasonwong-lab/cfDNA_deconv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cfDNA_deconv

A Python package for deconvoluting cell-free DNA (cfDNA) composition from methylation data generated by short-read (Illumina) or Nanopore sequencing. Tested on Python 3.8.12 environment.

Key Features

  • Short-read support: Outputs ReadsRatio and RPKM metrics
  • Nanopore support: Outputs ReadsRatio metric
  • Conda-installable: Resolves dependency conflicts with pinned versions
  • User-friendly CLI: Intuitive commands with help text
  • Error handling: Robust logging and input validation

Installation

Prerequisites

  • Conda (Miniconda/Anaconda) installed (tested on Python 3.8.12)
  • Linux-based OS (tested on GNU bash, version 4.4.20, x86_64-redhat-linux-gnu)
  • Git (for installing RLM/mbtools)

Step 1: Create a Conda Environment

conda create -n cfDNA_deconv_env
conda activate cfDNA_deconv_env

Step 2: Install External Dependencies (Samtools/RLM/mbtools)

Note: RLM installation:

git clone --recurse-submodules https://github.com/sarahet/RLM.git
mkdir build && cd build
cmake ../RLM
make

Note: For installing mbtools:

git clone https://github.com/jts/mbtools.git
cd mbtools
cargo build --release

Note: Samtools installation:

conda config --add channels bioconda
conda config --add channels conda-forge
conda install samtools -c bioconda```
 
### Step 3: Install cfDNA_deconv via Conda
```bash
git clone https://github.com/jasonwong-lab/cfDNA_deconv.git
cd cfDNA_deconv 
pip install . --no-cache-dir --force-reinstall 
# Build and install the Conda package:
conda build conda-recipe/
conda install --use-local cfDNA_deconv```
 
### Step 4: Verify Installation
```bash 
cfDNA_deconv --help```
 
## Usage
1. Short-Read Sequencing Data:
```bash 
cDNA_deconv short-read \ 
  --marker-dir ./supplemental/markers \ 
  --ref-dir ./supplemental/reference \ 
  --bam-file ./supplemental/examples/S2_WGBS_sort.bam \ 
  --output-dir ./results/shortread \ 
  --mode PE \ 
  --aligner bismark \ 
  --cores 8```
2. Nanopore Sequencing Data:
```bash 
cDNA_deconv nanopore \ 
  --marker-dir ./supplemental/markers \ 
  --ref-dir ./supplemental/reference \ 
  --mbtools-path /path/to/mbtools \ 
  --bam-file ./supplemental/examples/S2_Nanopore_sort.bam \ 
  --output-dir ./results/nanopore \ 
  --cores 8```

About

For deconvolution of cfDNA or other DNA mixture composition by leveraging read-level methylation signals

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages