Chromatogram File Utils
Project description
cfutils
Chromatogram File Utils
for sanger sequencing data visualizing, alignment, mutation calling, and trimming etc.
Demo
code to generate demo above
import matplotlib.pyplot as plt
from cfutils.parser import parse_abi, parse_fasta
from cfutils.align import align
from cfutils.show 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]
print(selected_mutation)
fig, ax = plt.subplots(1, 1, figsize=(15, 6))
plot_chromatograph(
query_record, ax, xlim=[selected_mutation - 10, selected_mutation + 10])
highlight_base(selected_mutation, query_record, ax)
plt.savefig('./test.pdf')
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 git@github.com:yech1990/cfutils.git
install dependance
make init
do unittest
make test
How to use?
in command line
cfutils mut --query ./data/B5-M13R_B07.ab1 --subject data/3kref.fa
as python modual
import cfutils as cf
ChangeLog
- build as python package for pypi
- fix bug that highlihgting wrong base
TODO
- call mutation by alignment and plot Chromatogram graphic
- add a doc
- change xaxis by peak location
- fix bug that chromatogram switch pos after trim
- wrap as a cli app
- return quality score in output
- fix issue that selected base is not in the middle
Project details
Release history Release notifications | RSS feed
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.dev30.tar.gz
(371.6 kB
view details)
File details
Details for the file cfutils-0.0.0.dev30.tar.gz
.
File metadata
- Download URL: cfutils-0.0.0.dev30.tar.gz
- Upload date:
- Size: 371.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20bb77600b0775390b52751818b5fb6843ff1aa9d1a24f66b1c9803206b28c70 |
|
MD5 | 251eddd248fbc03970b4473cf9f83daa |
|
BLAKE2b-256 | 6d819a0ec6b669fe17bc503516d83aba480a0d647a5009b1b0eb28593bf36d08 |