Skip to content

madscort/marbl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

marbl

Matrix Assignment of Rare Variants using Bayesian Logic

marbl is a command-line tool for assigning genetic variants to individual samples sequenced using the two-dimensional overlapped pool sequencing method DoBSeq. Samples are arranged experimentally in a matrix of row and column pools. A variant carried by a single individual appears uniquely in one row and one column pool with the specific individual at the intersection. marbl esimates assignment probabilities for rare variants as well as the most likely carrier of variants called in only a single pool dimension using an empirical Bayesian modelling approach.

A detailed description of the algorithm can be found in Low-cost rare variant detection for population scale genetic screening.

Installation

pip install marbl-pool

Input files

Sample table (--sampletable)

Tab-separated file listing each pool ID and its matrix dimension (row or column):

B0_H0    row
B0_H1    row
B0_V0    column
B0_V1    column

Decode table (--decodetable, optional)

Tab-separated file mapping each matrix cell to a sample ID:

sample_A    B0_H0    B0_V0
sample_B    B0_H0    B0_V1
sample_C    B0_H1    B0_V0
sample_D    B0_H1    B0_V1

VCF files (--vcf-folder)

One bgzipped, indexed VCF per pool

mpileup files (--mpileup-folder)

One mpileup per pool (plain or gzipped), generated with samtools mpileup.

Usage

marbl \
  --sampletable pooltable.tsv \
  --decodetable decodetable.tsv \
  --vcf-folder vcfs/ \
  --mpileup-folder mpileups/ \
  --output results/

Key options

Option Default Description
--prior-odds 10 Prior odds ratio M1/M0
--theta-cand-max 0.4 Maximum VAF for candidate pool estimation
--theta-bg-max 0.1 Maximum VAF for background pool estimation
--posterior-estimator-prior 1000 Strength of the empirical Bayes prior
--max-threads 0 (all) Number of parallel workers
--use-fallback off Use a fixed theoretical VAF instead of empirical estimates
--use-empirical-bg off Use raw empirical read counts as background model parameters.

Output files

File Description
matrix_context.json/.tsv Pool and cell layout
sites.tsv Union of all variant sites across pools
{pool}_pileup.tsv Per-pool allele depth at every site
variant_combinations.tsv All candidate (sample, variant) pairs with type flags
dataset.tsv Feature matrix used as model input
predictions.tsv Final assignments with posterior probabilities

Variants with probability > 0.5 and is_pool_pin == 0 are considered recovered assignments.

License

MIT

About

Matrix Assignment of Rare Variants using Bayesian Logic

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages