Determine mutant protein sequences from RNA using assembly around variants
Actively maintained. Last release 4 days ago, commits in 14 of the last 26 weeks. A safe choice.
pip install isovarIsovar
Isovar finds the mutant protein sequence that tumor RNA actually encodes around each somatic mutation. Given variant calls (VCF) and aligned tumor RNA-seq reads (BAM), it assembles the reads that carry each mutation into cDNA and translates that cDNA in the reading frames of annotated transcripts.
The protein comes from the reads, not from the reference plus one edit, so it can include nearby variants and splice junctions that the reads show. Where coverage runs out or no reading frame can be established, the result is shorter or empty: Isovar never fills gaps with reference sequence.
Isovar is one of three OpenVax libraries that share this work. Varcode generates transcript hypotheses and predicts coding consequences; Isovar reconstructs RNA-supported sequences and reconciles the evidence; Vaxrank evaluates protein and peptide candidates. See library responsibilities.
Install
pip install isovar
Isovar requires Python 3.11 or later. Reference annotation comes from PyEnsembl; install the Ensembl release that matches your alignments before the first run, for example:
pyensembl install --release 75 --species human
To choose a specific release or use your own GTF, see choosing the reference annotation. Figures and PDF reports are included in the standard installation.
Quick start
from isovar import run_isovar, isovar_results_to_dataframe
isovar_results = run_isovar(
variants="cancer-mutations.vcf",
alignment_file="tumor-rna.bam")
for isovar_result in isovar_results:
# The protein preferred by the context/support policy, or None.
protein = isovar_result.top_protein_sequence
if protein is not None:
# num_alt_fragments: distinct fragments supporting the variant allele.
print(isovar_result.variant, isovar_result.num_alt_fragments, protein.amino_acids)
# One row per variant.
df = isovar_results_to_dataframe(isovar_results)