-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error running Amplicon with diversity option #83
Comments
I'm running into the same error, also on v1.99.2, but even in $ shorah amplicon -b SEARCH-40821__D102066b__I02__210723_A00953_0359_BHGY7MDSX2__003.trimmed.sorted.bam -f NC_045512.2.fas
Traceback (most recent call last):
File "/usr/local/bin/shorah", line 14, in <module>
main()
File "/usr/local/lib/python3.6/site-packages/shorah/cli.py", line 210, in main
args.func(args)
File "/usr/local/lib/python3.6/site-packages/shorah/cli.py", line 89, in amplicon_run
amplicon.main(args)
File "/usr/local/lib/python3.6/site-packages/shorah/amplicon.py", line 387, in main
h = list(open('coverage.txt'))[0]
IndexError: list index out of range So I'm not sure that this error is unique to the
In addition to the log file,
The edits proposed by XU-Nuo seem to fix the issue for |
Thank you for reporting. I hope I'll have time to check this next week... |
Same issue here. I wonder if the problem might be the arguments sent to b2w. Lines 377-378 in amplicon.py:
I'm not sure I understand what b2w does exactly, but this parameter combination of window length equal to reference length and minimum overlap equal to 95% of that always creates empty output files ( |
Shorah Version:
1.99.2
Command to reproduce:
Expected Behavior:
The analysis outputs the
entropy.pdf
andentropy.csv
besides everything else when running without the-d
option.Actual Behavior:
The
entropy.pdf
andentropy.csv
are generated, but the software terminates with error:Output from
shorah.log
I have traced back in the code and it turns out that the region index return by function
highest_entropy()
insrc/shorah/amplicon.py
does not match my expectation. When all my reads have the same length, it will skip the steps finding the max entropy (shorah/src/shorah/amplicon.py
Line 300 in 0334e4d
rsto
is lower thatrsta
in this case. So I tried to fix this issue by changing line 298 fromto
Also, in line 305, the
high_ent_stop
should ends where the region ends as the return value to match the the logic invoked the function, so I subtract 1 fromhigh_ent_start + trimmed_mean
, fromto
By applying these two changes, I am able to run the amplicon function on my data with equal length with the
-d
option, as the region is now fixed for this rare margin case. I don't know if I understand this part right and make the correct modification. Would you verify it for me to see if this is a bug?The text was updated successfully, but these errors were encountered: