readcomb - fast detection of recombinant reads in BAMs
readcomb is a collection of command line and Python tools for fast detection
of recombination events in pooled high-throughput sequencing data. readcomb
searches for changes in parental haplotype phase across individual reads and classifies
recombination events based on various properties of the observed recombinant haplotypes.
readcomb was designed for use with the model alga Chlamydomonas reinhardtii and
currently only supports haploids. Although the means of specifically detecting gene
conversion are more specific to C. reinhardtii, everything else in readcomb is
generalizable to the detection of recombination events in any haploid species.
Installation
pip install readcomb
Dependencies
- cyvcf2 - Fast retrieval and filtering of VCF files and VCF objects written in C
- pysam - Interface for SAM and BAM files and provides SAM and BAM objects
- pandas - Support for data tables
- tqdm - Provides updating progress bars for command line programs
- samtools - Used for preprocessing of VCF and BAM files
Usage:
bamprep
Command line preprocessing script for BAM files. bamprep will prepare an
index file, filter out unusuable reads, and output a BAM sorted by read name.
readcomb requires BAMs sorted by read name for fast parsing and filtering.
readcomb-bamprep --bam [bam_filepath] --out [outdir]
Optional parameters:
--samtools- Path to samtools binary--threads [int]- Number of threads samtools should use (default 1)--index_csi- Create CSI index instead of BAI--no_progress- Disable index creation - this will speed upbamprepbut will mean no progress bars when filtering
vcfprep
Command line preprocessing script for VCF files
readcomb-vcfprep --vcf [vcf_filepath] --out [output_filepath]
Optional arguments
--snps_only- Keep only SNPs--indels_only- Keep only indels--no_hets- Remove heterozygote calls--min_GQ [int]- Minimum genotype quality at both sites (default 30)
filter
Command line multiprocessing script for identification of bam sequences with phase changes
readcomb-filter --bam [bam_filepath] --vcf [vcf_filepath]
Optional arguments:
-p, --processes [processes], Number of processes available for filter (default 4)-m, --mode [phase_change|no_match], Filtering mode (defaultphase_change)-l, --log [log_filepath], Filename for log metric output-o, --out [output_filepath], File to write filtered output to (defaultrecomb_diagnosis)
classification
Python module for detailed classification of sequences containing phase changes
>>> import readcomb.classification as rc
>>> from cyvcf2 import VCF
>>> bam_filepath = 'data/example_sequences.bam'
>>> vcf_filepath = 'data/example_variants.vcf.gz'
>>> pairs = rc.pairs_creation(bam_filepath, vcf_filepath) # generate list of Pair objects
>>> cyvcf_object = VCF(vcf_filepath) # cyvcf2 file object
>>> print(pairs[0])
Record name: chromosome_1-199370
Read1: chromosome_1:499417-499667
Read2: chromosome_1:499766-500016
VCF: data/example_variants.vcf.gz
>>> pairs[0].classify(cyvcf_object) # run classification algorithm
>>> print(pairs[0])
Record name: chromosome_1-199370
Read1: chromosome_1:499417-499667
Read2: chromosome_1:499766-500016
VCF: data/example_variants.vcf.gz
Unmatched Variant(s): False
Condensed: [['CC2936', 499417, 499626], ['CC2935', 499626, 499736], ['CC2936', 499736, 500016]]
Call: gene_conversion
Condensed Masked: [['CC2936', 499487, 499626], ['CC2935', 499626, 499736], ['CC2936', 499736, 499946]]
Call Masked: gene_conversion
License
GNU General Public License v3 (GPLv3+)
Development
Currently in alpha
Metadata
Release files for readcomb 0.4.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| readcomb-0.4.13.tar.gz | 41.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| readcomb-0.4.13-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 96.2 kB
Release files / readcomb-0.4.13.tar.gz
| Download URL | readcomb-0.4.13.tar.gz |
|---|---|
| Size | 41.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9fa825663cda1c27dcc8296eb10c5593e29e86b0c79307f7916c7ad78d6f1fc3
|
|
BLAKE2b-256 checksum How to use checksums |
3a88df82229087d3b2b16e7149c31e15d2239ac4273ecf7261b4cef1c8264507
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.6.9
|
Release files / readcomb-0.4.13-py3-none-any.whl
| Download URL | readcomb-0.4.13-py3-none-any.whl |
|---|---|
| Size | 55.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
03d61e3a9be7c2bee33fb0881183c3f55d0ef9eb8d800bdb102149f1d0cc9a44
|
|
BLAKE2b-256 checksum How to use checksums |
6e12bbc08d12092c01def7e5919aa04846c043d8abe3cc92ca28f4baba40f3aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.6.9
|
Security for readcomb 0.4.13
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.