Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 4 additions & 61 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/
8 changes: 0 additions & 8 deletions .idea/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions .idea/ULTRA.iml

This file was deleted.

20 changes: 0 additions & 20 deletions .idea/codeStyles/Project.xml

This file was deleted.

5 changes: 0 additions & 5 deletions .idea/codeStyles/codeStyleConfig.xml

This file was deleted.

4 changes: 0 additions & 4 deletions .idea/misc.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .vscode/settings.json

This file was deleted.

5 changes: 5 additions & 0 deletions src/cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)")
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion src/cli.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down
12 changes: 9 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,15 @@ 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;
double false_coverage =
(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;
Expand All @@ -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);
}

Expand All @@ -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) {
Expand Down