MCPcopy Index your code
hub / github.com/bluenote-1577/devider

github.com/bluenote-1577/devider @v0.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.0.1 ↗ · + Follow
125 symbols 241 edges 13 files 12 documented · 10%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

devider - long-read haplotypes from mixtures of "small" sequences

devider is a method that separates long reads (Nanopore or PacBio) of a mixture of sequences into groups with similar alleles. This is called "phasing" or "haplotyping".

devider is a "local haplotyping" method, so it works best when the sequence-of-interest is approximately the size of the reads. For bacterial genome-scale haplotyping, consider another tool such as floria.

Example use cases:

  • mixed viral long-read samples (e.g. co-infections or quasispecies)
  • amplicon/enriched sequencing of specific genes
  • haplotyping small sections of multi-strain bacterial communities

High-depth, heterogeneous sequencing that spans a 1kb gene.

Separated groups ("haplotypes") after running devider.

Why devider?

Similar tools exist for detection of similar haplotypes in mixtures. devider was developed to fill the following gaps:

  • Speed and low-memory - devider scales approximately linearly with sequencing depth and # of SNPs. > 30,000x coverage genes can be haplotyped in minutes.
  • High heterogeneity and coverage - devider uses a de Bruijn Graph approach, which works with very diverse samples (> 10 haplotypes)
  • Ease-of-use + interpretable outputs - conda installable, engineered in rust, simple command line. Outputs are easy to interpret (haplotagged BAM or MSA).

Install

[!NOTE] As of 2024-10-12, conda install is not ready yet. Will be available in the next few days.

Conda (preferred)

mamba install -c bioconda devider
devider -h 

Static binary (only x86_64 architectures)

wget https://github.com/bluenote-1577/devider/releases/download/latest/devider
chmod +x devider
./devider

See the installation instructions on the wiki if you want want to compile devider (written in Rust) or you're not on x86-64 CPUs.

Quick Start after install

Option 1 (more flexible): Running devider with VCF + BAM

git clone https://github.com/bluenote-1577/devider
cd devider
devider -b hiv_test/3000_95_3.bam  -v hiv_test/3000_95_3.vcf.gz  -r hiv_test/OR483991.1.fasta -o devider_output

# results folder
ls devider_output

Option 2 (easier): Running devider with reads

git clone https://github.com/bluenote-1577/devider
cd devider
run_devider_pipeline -i hiv_test/3000_95_3.fastq.gz -r hiv_test/OR4839901.1.fasta -o devider_pipeline_output 

# results folder
ls devider_pipeline_output

# intermediate files (bam + vcf files)
ls devider_pipeline_output/pipeline_files

[!NOTE] If you did not install via conda, do the following instead. sh mamba install -c bioconda tabix samtools lofreq minimap2 git clone https://github.com/bluenote-1577/devider ./devider/scripts/run_devider_pipeline -i reads.fq.gz -r reference.fa -o pipeline_output

How to use devider

Citation

Forthcoming.

Core symbols most depended-on inside this repo

phred_scale
called by 16
src/utils_frags.rs
cmp
called by 14
src/types_structs.rs
print_varmer_d
called by 14
src/dbg.rs
partial_cmp
called by 7
src/types_structs.rs
print_dbg
called by 7
src/dbg.rs
get_unitigs
called by 6
src/dbg.rs
set_to_seq_dict
called by 5
src/utils_frags.rs
filter_dbg
called by 4
src/dbg.rs

Shape

Function 97
Class 18
Method 8
Enum 2

Languages

Rust100%

Modules by API surface

src/dbg.rs30 symbols
src/utils_frags.rs29 symbols
src/types_structs.rs29 symbols
src/file_writer.rs13 symbols
src/file_reader.rs13 symbols
src/graph_processing.rs6 symbols
src/parse_cmd_line.rs2 symbols
src/consensus.rs1 symbols
src/bin/devider.rs1 symbols
src/alignment.rs1 symbols

For agents

$ claude mcp add devider \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact