-
Notifications
You must be signed in to change notification settings - Fork 4
unsupported operand type error #6
Copy link
Copy link
Open
Description
Hello,
I am running counterr to check the accuracy of ONT error-corrected reads as follows:
$ counterr -bam NecatEC_to_ref.bam -genome ../reference.fa -output_dir CMS281_Necat_to_p3 -lim 1000 -mapq_thres 10
and I get this error:
The output directory does not exist. Creating one.
Traceback (most recent call last):
File "/home/copettid/anaconda3/envs/py36/bin/counterr", line 12, in <module>
sys.exit(main())
File "/home/copettid/anaconda3/envs/py36/lib/python3.6/site-packages/counterr/counterr.py", line 105, in main
means_in, stds_in, lens_in, means_out, stds_out, lens_out = mapQ_stats_aligned_readsegment(reads_pass, verbose=verbose)
File "/home/copettid/anaconda3/envs/py36/lib/python3.6/site-packages/counterr/counters.py", line 95, in mapQ_stats_aligned_readsegment
means_in.append(np.mean(Q_in))
File "<__array_function__ internals>", line 6, in mean
File "/home/copettid/anaconda3/envs/py36/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 3257, in mean
out=out, **kwargs)
File "/home/copettid/anaconda3/envs/py36/lib/python3.6/site-packages/numpy/core/_methods.py", line 163, in _mean
ret = ret / rcount
TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'
This is how the output folder looks like:
-rwx------. 1 copettid mpb 5.2K Jan 31 17:56 CMS281_Necat_to_p3/report.pdf
CMS281_Necat_to_p3/stats:
total 0
CMS281_Necat_to_p3/figures:
total 3.0M
-rwx------. 1 copettid mpb 86K Jan 31 17:56 per_read_Q_mean_med_pass_vs_fail.png
-rwx------. 1 copettid mpb 82K Jan 31 17:56 per_read_Q_pass_fail_mean_vs_med.png
-rwx------. 1 copettid mpb 31K Jan 31 17:56 per_read_Q_pass_fail_mean_vs_std.png
The pdf file is corrupted and two of the three figures have all failed reads

The bam file was generated with minimap2, then filtered to remove unmapped, multimapped, and reads with supplementary alignments (samtools view -F 2052 -F 256).
I wonder if it is an issue with the tool/installation or the dataset.
Thanks,
Dario
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels