diff --git a/.gitignore b/.gitignore index a16ba6e..f53ba36 100644 --- a/.gitignore +++ b/.gitignore @@ -95,50 +95,6 @@ Network Trash Folder Temporary Items .apdisk -# ----------------------------------------------------------------------------- -# JetBrains -# ----------------------------------------------------------------------------- - -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider -# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 - -# User-specific stuff -.idea/**/workspace.xml -.idea/**/tasks.xml -.idea/**/usage.statistics.xml -.idea/**/dictionaries -.idea/**/shelf - -# Generated files -.idea/**/contentModel.xml - -# Sensitive or high-churn files -.idea/**/dataSources/ -.idea/**/dataSources.ids -.idea/**/dataSources.local.xml -.idea/**/sqlDataSources.xml -.idea/**/dynamic.xml -.idea/**/uiDesigner.xml -.idea/**/dbnavigator.xml - -# Gradle -.idea/**/gradle.xml -.idea/**/libraries - -# Gradle and Maven with auto-import -# When using Gradle or Maven with auto-import, you should exclude module files, -# since they will be recreated, and may cause churn. Uncomment if using -# auto-import. -# .idea/artifacts -# .idea/compiler.xml -# .idea/jarRepositories.xml -# .idea/modules.xml -# .idea/*.iml -# .idea/modules -# *.iml -# *.ipr - -# CMake cmake-build-*/ # Mongo Explorer plugin @@ -156,31 +112,18 @@ out/ # JIRA plugin atlassian-ide-plugin.xml -# Cursive Clojure plugin -.idea/replstate.xml - # Crashlytics plugin (for Android Studio and IntelliJ) com_crashlytics_export_strings.xml crashlytics.properties crashlytics-build.properties fabric.properties -# Editor-based Rest Client -.idea/httpRequests -# Android studio 3.1+ serialized cache file -.idea/caches/build_file_checksums.ser - -# ----------------------------------------------------------------------------- -# VSCode -# ----------------------------------------------------------------------------- - -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json *.code-workspace # Local History for Visual Studio Code .history/ + + +/.vscode/ +/.idea/ diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 73f69e0..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml -# Editor-based HTTP Client requests -/httpRequests/ diff --git a/.idea/ULTRA.iml b/.idea/ULTRA.iml deleted file mode 100644 index f08604b..0000000 --- a/.idea/ULTRA.iml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml deleted file mode 100644 index cb12a05..0000000 --- a/.idea/codeStyles/Project.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml deleted file mode 100644 index 79ee123..0000000 --- a/.idea/codeStyles/codeStyleConfig.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 79b3c94..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 300b38e..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 65c053b..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "files.associations": { - "Dockerfile_*": "dockerfile", - "cmath": "cpp" - } -} \ No newline at end of file diff --git a/src/cli.cpp b/src/cli.cpp index 0ac98a9..c65770f 100644 --- a/src/cli.cpp +++ b/src/cli.cpp @@ -111,6 +111,10 @@ void Settings::prepare_settings() { "Do not output BED or JSON annotation") ->group("Output"); + app.add_flag("--disable_summary", this->disable_summary, + "Disable summary statistics") + ->group("Output"); + app.add_flag( "--fdr", this->estimate_fdr, "Estimate the False Discovery rate (runtime will be twice as long)") @@ -207,6 +211,7 @@ void Settings::prepare_settings() { app.add_option("--tune_fdr", this->tune_fdr, "FDR to be tuned against (see README)") + ->default_val(this->tune_fdr) ->group("Parameter Tuning"); app.add_flag("--tune_only", this->tune_only, diff --git a/src/cli.hpp b/src/cli.hpp index e924cda..44ebbec 100644 --- a/src/cli.hpp +++ b/src/cli.hpp @@ -5,7 +5,7 @@ #ifndef ULTRA_CLI_HPP #define ULTRA_CLI_HPP -#define ULTRA_VERSION_STRING "1.1.0" +#define ULTRA_VERSION_STRING "1.2.0" #define DEBUG_STRING "" #ifdef DEBUG_PRAGMA #undef DEBUG_STRING @@ -30,6 +30,7 @@ struct Settings { // Output settings std::string out_file = ""; bool pval = false; + bool disable_summary = false; bool disable_streaming_out = false; float p_value_loc = 4.27294921875; float p_value_scale = 1.8913602828979492; diff --git a/src/main.cpp b/src/main.cpp index a2c7a61..4f869fa 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -105,7 +105,7 @@ int main_wrapper(int argc, const char *argv[]) { param_strings.size(), real_coverage, fdr, arg_string.c_str()); } - printf("-----------\n"); + printf("----------------------------\n"); if (best_coverage_index >= 0) { double real_coverage = (double)coverage[best_coverage_index] / (double)seq_length; @@ -113,7 +113,7 @@ int main_wrapper(int argc, const char *argv[]) { (double)shuffled_coverage[best_coverage_index] / (double)seq_length; double fdr = false_coverage / real_coverage; - printf("Best coverage within FDR limit: %.5f, %.5f, %s\n", real_coverage, + printf("Best coverage within FDR limit (%.3f): %.5f, %.5f, %s\n", settings->tune_fdr, real_coverage, fdr, param_strings[best_coverage_index].c_str()); delete settings; @@ -126,7 +126,7 @@ int main_wrapper(int argc, const char *argv[]) { } settings->assign_settings(); } else { - printf("No parameters found within FDR limit.\n"); + printf("No parameters found within FDR limit (%.3f).\n", settings->tune_fdr); exit(0); } @@ -148,6 +148,12 @@ int main_wrapper(int argc, const char *argv[]) { settings->mask_with_n); fclose(f); } + if (!settings->disable_summary) { + seq_length = ultra->reader->fastaReader->total_seq_length; + double coverage_ratio = (double)true_coverage / (double)seq_length; + printf("----------------------------\n"); + printf("Annotation Coverage: %.4f (%llu / %llu)\n", coverage_ratio, true_coverage, seq_length); + } delete ultra; if (settings->estimate_fdr) {