Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

--cscore=1: A total of 0 anchor was found #471

Closed
Li-Tianran opened this issue May 21, 2022 · 2 comments
Closed

--cscore=1: A total of 0 anchor was found #471

Li-Tianran opened this issue May 21, 2022 · 2 comments

Comments

@Li-Tianran
Copy link

Li-Tianran commented May 21, 2022

Hi Dr. Tang,

From #141 I knew that the reciprocal best will have a C-score of 1, so I tried using python -m jcvi.compara.catalog ortholog test1 test2 --cscore=1 --no_strip_names, the result showed that after cscore filter there were no gene leaved. The log :
DEBUG running the cscore filter (cscore>=1.00) .. blastfilter.py:108
DEBUG after filter (11->0) .. blastfilter.py:111

Then I set --cscore=.99, and tried using python -m jcvi.formats.blast cscore --cutoff=.99 test1.test2.last to caculate their cscores. There were 8 genes after cscore filter, and their cscore were all 1.00. The log and the cscore result:
DEBUG running the cscore filter (cscore>=0.99) .. blastfilter.py:108
DEBUG after filter (11->8) .. blastfilter.py:111
GrD5_01G00030 GbiG1_01G00030 1.00
GrD5_01G00040 GbiG1_01G00020 1.00
GrD5_01G00050 GbiG1_01G00010 1.00
GrD5_01G00060 GbiG1_01G00040 1.00
GrD5_01G00070 GbiG1_01G00070 1.00
GrD5_01G00080 GbiG1_01G00070 1.00
GrD5_01G00090 GbiG1_01G00090 1.00
GrD5_01G00100 GbiG1_01G00100 1.00

Since these genes' cscores are 1.00, why can't I get them by setting --cscore=1? And I noticed python -m jcvi.formats.blast cscore --cutoff=1 test1.test2.last was also no output, but the .last file showed these 8 genes pairs were the reciprocal best? What mistake may I make? Many thanks!

The .last file:
Fields: query id, subject id, % identity, alignment length, mismatches, gap opens, q. start, q. end, s. start, s. end, evalue, bit score
GrD5_01G00030 GbiG1_01G00030 97.56 246 6 0 1 246 1 246 3.4e-118 372
GrD5_01G00040 GbiG1_01G00020 92.11 76 5 1 155 81 8 83 6.5e-22 91.7
GrD5_01G00050 GbiG1_01G00010 97.90 1758 37 0 1 1758 1 1758 0 2.66e+03
GrD5_01G00060 GbiG1_01G00040 97.90 429 9 0 1 429 1 429 1.8e-190 651
GrD5_01G00060 GbiG1_01G00030 98.45 193 3 0 756 948 54 246 4.2e-83 297
GrD5_01G00070 GbiG1_01G00070 98.02 858 17 0 1 858 1 858 0 1.3e+03
GrD5_01G00070 GbiG1_01G00080 96.19 735 27 1 120 854 1 734 0 1.06e+03
GrD5_01G00080 GbiG1_01G00070 98.01 854 17 0 28 881 1 854 0 1.3e+03
GrD5_01G00080 GbiG1_01G00080 96.77 742 23 1 147 888 1 741 0 1.09e+03
GrD5_01G00090 GbiG1_01G00090 99.34 910 6 0 254 1163 227 1136 0 1.42e+03
GrD5_01G00100 GbiG1_01G00100 99.05 1266 12 0 1 1266 1 1266 0 1.97e+03

@tanghaibao
Copy link
Owner

@Li-Tianran

This is due to the comparison between float numbers is not exact.
https://stackoverflow.com/questions/4915462/how-should-i-do-floating-point-comparison

@Li-Tianran
Copy link
Author

OK, I am sorry to ignore this. Thanks for your quick reply!!!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants