iprada / Circle-Map

A method for circular DNA detection based on probabilistic mapping of ultrashort reads
MIT License
62 stars 20 forks source link

UserWarning: Failed on interval chrom #46

Open xdli009 opened 4 years ago

xdli009 commented 4 years ago

Hi, When I follow the tutorial for identification of circular DNA using Circle Map Realign,I encounter an error. My command Input: Circle-Map Realign -i 019_sort_circular_read_candidates.bam -qbam 019_qname.bam -sbam 019_sort.bam -fasta 019_new.fna -o 019_circle.bed The standard output gives an error:

2020-09-03 09:08:43: Realigning reads using Circle-Map

2020-09-03 09:08:43: Clustering structural variant reads

2020-09-03 09:08:44: Splitting clusters to to processors

[E::idx_find_and_load] Could not retrieve index file for '019_qname.bam'
  0%|             Traceback (most recent call last):                                                                                                | 0/100 [00:00<?, ?it/s]
  File "/beegfs/home/lxd/miniconda3/envs/pgcgap/lib/python3.7/site-packages/circlemap/realigner.py", line 222, in realign
    plus_base_freqs = background_freqs(plus_coding_interval)
  File "/beegfs/home/lxd/miniconda3/envs/pgcgap/lib/python3.7/site-packages/circlemap/utils.py", line 876, in background_freqs
    return{nucleotide: seq.count(nucleotide)/len(seq) for nucleotide in 'ATCG'}
  File "/beegfs/home/lxd/miniconda3/envs/pgcgap/lib/python3.7/site-packages/circlemap/utils.py", line 876, in <dictcomp>
    return{nucleotide: seq.count(nucleotide)/len(seq) for nucleotide in 'ATCG'}
ZeroDivisionError: division by zero
/beegfs/home/lxd/miniconda3/envs/pgcgap/lib/python3.7/site-packages/circlemap/realigner.py:391: UserWarning: Failed on interval chrom    019_contig161
start            25534
end              25834
Name: 2, dtype: object due to the error division by zero
  str(interval), str(e)))
  1%|█▎                                                                                                                                     | 1/100 [00:01<02:59,  1.81s/it]
2020-09-03 09:08:46: An error happenend during execution. Exiting
0it [00:01, ?it/s]

Thanks a lot, hope to get your suggestions!

iprada commented 4 years ago

Hi @xdli009,

That is strange. I have never seen that error. Which reference genome are you using?

Best,

Inigo