Skip to main content

Chromatogram File Utils

Project description


Chromatogram File Utils

for sanger sequencing data visualizing, alignment, mutation calling, and trimming etc.


plot chromatogram with mutation

code to generate demo above

import matplotlib.pyplot as plt
from cfutils.parser import parse_abi, parse_fasta
from cfutils.align import align
from import highlight_base, plot_chromatograph

query_record = parse_abi('./data/B5-M13R_B07.ab1', trim=False)
subject_record = parse_fasta('./data/3kref.fa')
mutations = align(query_record, subject_record, ignore_ambig=True)
selected_mutation = mutations[5][2]
fig, ax = plt.subplots(1, 1, figsize=(15, 6))
    query_record, ax, xlim=[selected_mutation - 10, selected_mutation + 10])
highlight_base(selected_mutation, query_record, ax)

How to install?

form pypi

(use this way ONLY, if you don't know what't going on)

pip install cfutils

manipulate the source code

clone from github

git clone 

install dependance

make init

do unittest

make test

How to use?

import cfutils as cf


  • build as python package for pypi
  • fix bug that highlihgting wrong base


  • call mutation by alignment and plot Chromatogram graphic
  • add a doc
  • change xaxis by peak location
  • fix bug that chromatogram switch pos after trim

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cfutils-0.0.0.dev27.tar.gz (384.5 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page