-
Notifications
You must be signed in to change notification settings - Fork 2
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
Change -f 4 output. #7
Open
ghuls
wants to merge
9
commits into
weng-lab:master
Choose a base branch
from
ghuls:change_f4_output
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use log1pexp(x) instead of log1p(exp(x)) as this results in a slightly faster (5%) binary as log1p() and exp() do not need to be calculated for each x value. +// Return "log(1+exp(x))" evaluated carefully for largish "x". +// This is also called the "softplus": https://en.wikipedia.org/wiki/Rectifier_(neural_networks) +// transformation, being a smooth approximation to "max(0,x)". +// +// See: +// - Martin Maechler (2012) "Accurately Computing log(1 − exp(− |a|))": http://cran.r-project.org/web/packages/Rmpfr/vignettes/log1mexp-note.pdf +// - Julia LegExpFunctions package: https://github.com/JuliaStats/LogExpFunctions.jl/blob/master/src/basicfuns.jl +inline double log1pexp(double x) {
Replace std::bind2nd with lambda to avoid: warning: 'bind2nd<std::plus<double>, double>' is deprecated [-Wdeprecated-declarations] when specifying C++11 or greater.
Add braces around all statements (if, else, for, while, ...) for better readability.
Reformat code with clang-format (version 12): clang-format -style=LLVM -i *.cpp *.hpp Fix the following errors in cbust.cpp and remove_overlapping_segments.hpp after reformatting: error: ‘>>’ should be ‘> >’ within a nested template argument list Not all clang-format changes are applied (like formating of lines that print text).
Remove unused functions.
Fix asserts: bg and scores have size 0. So test if the capacity is big enough instead.
Only print sequence name and score for -f 4.
Sort only top X clusters per sequence by score if -t is specified.
Update Makefile to create faster binaries: - cbust_static: Compile a static binary with a recent version of gcc and glibc to run on an old distribution as CentOS7. Resulting binary can be twice as fast. - cbust_amd_libm_aocc: Compile a static binary with AMD math library (compiled with AOCC) for a slightly faster binary than cbust, or cbust_static. - cbust_amd_libm_gcc: Compile a static binary with AMD math library (compiled with GCC) for a slightly faster binary than cbust, or cbust_static.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change -f 4 output as last 2 column were not very useful.
Provide smart log1pexp(x) function to replace calling log1p(exp(x)) unconditionally.
Add new ways to compile faster binaries.
Fix some wrong asserts.
Remove unused functions.
Reformat code and add braces around all statements.