bede / kindel Goto Github PK
View Code? Open in Web Editor NEWIndel-aware consensus from aligned BAMs
License: GNU General Public License v3.0
Indel-aware consensus from aligned BAMs
License: GNU General Public License v3.0
Hi,
For very bad alignments with a lot of gaps, is it possible to fill them using the reference instead N's?
Thanks!
Depend on aligner? Segemehl, BBMap? Graphmap?
Accept reference as an optional argument and use to calculate length in absense of LN
field
Throw exception with missing LN field and no reference
Function should return instance of Consensus
object etc.
When I run Kindel using --realign on the test data. I get the following error. Has something not installed correctly?
kindel consensus --realign -t 6.1.sub_test.bam
loading sequences: 16457it [00:01, 14571.11it/s]
Traceback (most recent call last):
File "/usr/local/bin/kindel", line 11, in
sys.exit(main())
File "/home/.local/lib/python3.6/site-packages/kindel/cli.py", line 79, in main
parser.dispatch()
File "/home/.local/lib/python3.6/site-packages/argh/helpers.py", line 55, in dispatch
return dispatch(self, *args, **kwargs)
File "/home/.local/lib/python3.6/site-packages/argh/dispatching.py", line 174, in dispatch
for line in lines:
File "/home/.local/lib/python3.6/site-packages/argh/dispatching.py", line 277, in _execute_command
for line in result:
File "/home/.local/lib/python3.6/site-packages/argh/dispatching.py", line 260, in _call
result = function(*positional, **keywords)
File "/home/.local/lib/python3.6/site-packages/kindel/cli.py", line 24, in consensus
uppercase)
File "/home/.local/lib/python3.6/site-packages/kindel/kindel.py", line 377, in bam_to_consensus
clip_decay_threshold, mask_ends)
NameError: name 'mask_ends' is not defined
Hi, thanks for making this software available!
I am running into an error with kindel consensus
:
kindel consensus align.sam > test.fasta
...
building consensus: 100%|████████████████████████████████████████████████████████████| 90/90 [00:00<00:00, 140853.49it/s]
Traceback (most recent call last):
File "/env/kindel/bin/kindel", line 8, in <module>
sys.exit(main())
File "/env/kindel/lib/python3.6/site-packages/kindel/cli.py", line 83, in main
parser.dispatch()
File "/env/kindel/lib/python3.6/site-packages/argh/helpers.py", line 55, in dispatch
return dispatch(self, *args, **kwargs)
File "/env/kindel/lib/python3.6/site-packages/argh/dispatching.py", line 174, in dispatch
for line in lines:
File "/env/kindel/lib/python3.6/site-packages/argh/dispatching.py", line 277, in _execute_command
for line in result:
File "/env/kindel/lib/python3.6/site-packages/argh/dispatching.py", line 260, in _call
result = function(*positional, **keywords)
File "/env/kindel/lib/python3.6/site-packages/kindel/cli.py", line 28, in consensus
uppercase)
File "/env/kindel/lib/python3.6/site-packages/kindel/kindel.py", line 417, in bam_to_consensus
uppercase)
File "/env/kindel/lib/python3.6/site-packages/kindel/kindel.py", line 385, in build_report
report += '- min, max observed depth[50:-50]: {}, {}\n'.format(min(aligned_depth[50:-50]),
ValueError: min() arg is an empty sequence
I suspect the problem must be in the data somewhere because I am running kindel consensus
over a list of files, and it only errors out on some of them. If it would help with troubleshooting I can send the sam
file.
name: kindel
channels:
- bioconda
- defaults
dependencies:
- _libgcc_mutex=0.1=main
- ca-certificates=2020.10.14=0
- certifi=2020.6.20=py36_0
- ld_impl_linux-64=2.33.1=h53a641e_7
- libedit=3.1.20191231=h14c3975_1
- libffi=3.3=he6710b0_2
- libgcc-ng=9.1.0=hdf63c60_0
- libstdcxx-ng=9.1.0=hdf63c60_0
- ncurses=6.2=he6710b0_1
- openssl=1.1.1h=h7b6447c_0
- pip=20.2.3=py36_0
- python=3.6.12=hcff3b4d_2
- readline=8.0=h7b6447c_0
- setuptools=50.3.0=py36hb0f4dca_1
- sqlite=3.33.0=h62c20be_0
- tk=8.6.10=hbc83047_0
- wheel=0.35.1=py_0
- xz=5.2.5=h7b6447c_0
- zlib=1.2.11=h7b6447c_3
- pip:
- argh==0.26.2
- biopython==1.78
- kindel==0.4.2
- numpy==1.19.2
- ordereddict==1.1
- pandas==1.1.3
- python-dateutil==2.8.1
- pytz==2020.1
- scipy==1.5.2
- simplesam==0.1.3.1
- six==1.15.0
- tqdm==4.50.2
14.1
Reproducer
from kindel import kindel
r = kindel.bam_to_consensus(f'{r_root}/kindel/bam/14.1.100k.bam')
str(r[0][0].seq)
Review handling of N
, H
, P
, X
and =
ops. X
and =
were introduced in 1.4 and remove the need to concurrently examine the MD
tag
https://samtools.github.io/hts-specs/SAMv1.pdf
Fix regression in v0.2.0+ reported by @tomas-fer via email
Temporary solution: $ pip3 install -Iv kindel==0.1.4
Maybe just replace with bokeh?
Thank you for providing this useful tool to the community. I was wondering if base quality is considered when determining min-depth for the consensus call such as iVar (https://andersen-lab.github.io/ivar/html/manualpage.html#autotoc_md19)?
Add before next release
classifiers=[
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6"]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.