From 1c50a05f5525e95ec79f45d6cf2e74eee302491d Mon Sep 17 00:00:00 2001 From: usama Date: Wed, 10 Jun 2015 12:38:08 +0200 Subject: [PATCH] small changes --- README.md | 1 + example.cfg | 4 ++-- gaml.cc | 11 ++++++----- graph.cc | 4 ++-- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index d07783f..124827b 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,7 @@ LastGraph in your Velvet output directory. Defaults to 50000. - t0=number Optional. Initial temperature. Defaults to 0.008. - do_proprocess=whatever If set, we do only postprocessing. +- blasr_path=path Optional. Path to BLASR (used with pacbio reads). Default "blasr/alignment/bin". Moves configuration ------------------- diff --git a/example.cfg b/example.cfg index 5110aae..bc9cf36 100644 --- a/example.cfg +++ b/example.cfg @@ -1,7 +1,7 @@ -graph=../aureus/workDir/LastGraph +graph=../qual/aureus/workDir/LastGraph t0=0.02 max_iterations=10000 -starting_assembly=../aureus/Assemblies/Allpaths-LG/genome.scf.fasta +starting_assembly=../qual/aureus/Assemblies/Allpaths-LG/genome.scf.fasta [rs1] cache_prefix=/scratch/GAML/rs1y diff --git a/gaml.cc b/gaml.cc index 3a7ee8c..f9701c7 100644 --- a/gaml.cc +++ b/gaml.cc @@ -26,8 +26,8 @@ using namespace std; using namespace boost; -string gBowtiePath = "../programs/bowtie2"; -string gBlasrPath = "../programs/blasr/alignment/bin"; +string gBowtiePath; +string gBlasrPath; double ExtractDouble(const string& key, unordered_map& cfg, double def) { if (cfg.count(key)) { @@ -81,6 +81,8 @@ struct AssemblySettings { localp = ExtractInt("local_p", configs, 60); fixlenp = ExtractInt("fixlen_p", configs, 1); t0 = ExtractDouble("t0", configs, 0.008); + gBlasrPath = ExtractString("blasr_path", configs, "blasr/alignment/bin"); + gBowtiePath = ExtractString("bowtie_path", configs, "bowtie2"); } }; @@ -91,8 +93,8 @@ void Optimize(Graph& gr, ProbCalculator& prob_calc, vector> paths, int longest_read, AssemblySettings& settings) { int threshold = settings.threshold; gr.CalcReachability(); -/* gr.CalcReachabilityBig(threshold); - gr.CalcReachabilityLimit(2*longest_read);*/ + gr.CalcReachabilityBig(threshold); + gr.CalcReachabilityLimit(2*longest_read); gr.reach_limit_.resize(gr.nodes.size()); int total_len; @@ -105,7 +107,6 @@ void Optimize(Graph& gr, ProbCalculator& prob_calc, vector> paths, printf("%d/%d ", e.first, e.second); } printf("\n"); - exit(0); OutputPathsToFile(paths, gr, kmer, threshold, settings.output_prefix); printf("\n"); diff --git a/graph.cc b/graph.cc index 74e39d0..26efa1f 100644 --- a/graph.cc +++ b/graph.cc @@ -146,7 +146,7 @@ void Graph::CalcReachabilityLimit(int max_dist) { } } } - printf("r %d %d\n", i, reach_limit_[i].size()); +// printf("r %d %d\n", i, reach_limit_[i].size()); } printf("reach limit end\n"); } @@ -159,7 +159,7 @@ void Graph::CalcReachabilityBig(int threshold) { for (int i = 0; i < nodes.size(); i++) { if (nodes[i]->s.length() <= threshold) continue; big++; - printf("r %d/%d %d\n", i, nodes.size(), big); +// printf("r %d/%d %d\n", i, nodes.size(), big); queue fr; // TODO: usama je chudak a alokuje velke veci casto // vector visited(nodes.size());