W-L / deviaTE

Python tool for the analysis and visualization of mobile genetic elements
GNU General Public License v3.0
19 stars 7 forks source link

more than one primary alignment & unsupported operand type(s) for +: 'NoneType' and 'str' #5

Closed vmerel closed 2 years ago

vmerel commented 4 years ago

Hello,

I recently got the following error messages running deviaTE on Drosophila samples with custom libraries:

[bam_sort_core] merging from 8 files and 1 in-memory blocks... Traceback (most recent call last): File "/var/lib/miniconda3/envs/deviaTE_env/bin/deviaTE_fuse", line 56, in raise ValueError('more than one primary alignment') ValueError: more than one primary alignment

Traceback (most recent call last): File "/var/lib/miniconda3/envs/deviaTE_env/bin/deviaTE_fuse", line 70, in fam_strand = seg.reference_name + '+' TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Here is the command used: deviaTE_prep \ --input /mnt/Samples/$fastq \ --library /home/ubuntu/Library.fa \ --quality_encoding phred+33

I am using a conda environment on ubuntu (conda create deviaTE==0.3.7 -c r -c defaults -c conda-forge -c bioconda -c w-l -n deviaTE_env)

Can you help with this ?

Thank you, Vincent.

W-L commented 4 years ago

Hi, thanks for reporting this issue! This error is caused during the process of identifying the breakpoints of internally deleted TEs. Specifically, when there is a read that maps in so many different ways, possibly explaining different internal breakpoints, that the complexity of figuring out the exact alignment is too high. This can for example be caused by either a read or a region in the reference with very low complexity. To know what's going on exactly, I would need to the data you used. As an alternative, if knowing about internally deleted elements is not essential for you, you could run the same command you used before and additionally add the option --no_fuse, e.g.:

deviaTE_prep --input /mnt/Samples/$fastq --library /home/ubuntu/Library.fa --quality_encoding phred+33 --no_fuse

I hope this helps