Skip to content
Commits on Source (7)
gatb-core (1.4.1+git20191130.664696c+dfsg-1) UNRELEASED; urgency=medium
* Team upload.
* New upstream version
* Standards-Version: 4.4.1
* Set upstream metadata fields: Repository-Browse.
* Remove obsolete fields Name from debian/upstream/metadata.
* FTBFS: Problem with symbols files, I presume
-- Steffen Moeller <moeller@debian.org> Thu, 05 Dec 2019 00:23:01 +0100
gatb-core (1.4.1+git20190813.a73b6dd+dfsg-1) unstable; urgency=medium
* New upstream version
......
......@@ -13,7 +13,7 @@ Build-Depends: debhelper-compat (= 12),
libjsoncpp-dev,
doxygen,
graphviz
Standards-Version: 4.4.0
Standards-Version: 4.4.1
Vcs-Browser: https://salsa.debian.org/med-team/gatb-core
Vcs-Git: https://salsa.debian.org/med-team/gatb-core.git
Homepage: https://github.com/GATB/gatb-core
......
Name: gatb-core
Cite-As: >
E. Drezen, G. Rizk, R. Chikhi, C. Deltel, C. Lemaitre, P. Peterlongo,
D. Lavenier. (2014)
......@@ -6,10 +5,10 @@ Cite-As: >
Bioinformatics, 30(20):2959-2961. / BioIT 2014 poster
Reference:
Author: >
Erwan Drezen and Guillaume Rizk and Rayan Chikhi and Charles Deltel
and Claire Lemaitre and Pierre Peterlongo and Dominique Lavenier
Erwan Drezen and Guillaume Rizk and Rayan Chikhi and Charles Deltel
and Claire Lemaitre and Pierre Peterlongo and Dominique Lavenier
Title: >
GATB: Genome Assembly & Analysis Tool Box
GATB: Genome Assembly & Analysis Tool Box
Journal: Bioinformatics
Year: 2014
Volume: 30
......@@ -19,7 +18,8 @@ Reference:
URL: http://dx.doi.org/10.1093/bioinformatics/btu406
Repository: https://github.com/GATB/gatb-core
Registry:
- Name: OMICtools
Entry: OMICS_04834
- Name: conda:bioconda
Entry: gatb
- Name: OMICtools
Entry: OMICS_04834
- Name: conda:bioconda
Entry: gatb
Repository-Browse: https://github.com/GATB/gatb-core
......@@ -110,8 +110,6 @@ if (debug)
set (LIBRARY_COMPILE_DEFINITIONS "${LIBRARY_COMPILE_DEFINITIONS} -g -p ${LIB_COMPILE_WARNINGS}")
set (CMAKE_BUILD_TYPE Debug) # else CMake adds DNDEBUG
message("-- COMPILATION IN DEBUG MODE")
else()
set (LIBRARY_COMPILE_DEFINITIONS "${LIBRARY_COMPILE_DEFINITIONS} -O3 -DNDEBUG ${LIB_COMPILE_WARNINGS}")
endif()
if (INT128_FOUND)
......
......@@ -91,6 +91,8 @@
-verbose (1 arg) : verbosity level [default '1']
-email (1 arg) : send statistics to the given email address [default '']
-email-fmt (1 arg) : 'raw' or 'xml' [default 'raw']
-edge-km (1 arg) : Kececioglu-Myers edge representation [default '0']
* \endcode
*
*
......
......@@ -651,6 +651,7 @@ void BankFasta::Iterator::init ()
*bf = (buffered_file_t *) CALLOC (1, sizeof(buffered_file_t));
(*bf)->buffer = (unsigned char*) MALLOC (BUFFER_SIZE);
(*bf)->stream = gzopen (fname, "r");
gzbuffer((*bf)->stream,2*1024*1024);
/** We check that we can open the file. */
if ((*bf)->stream == NULL)
......
......@@ -63,12 +63,9 @@ using namespace gatb::core::tools::collections::impl;
using namespace std;
// let's be clear here:
// UF hashes will be stored in 32 bits for efficiency (as I don't want to have a 64-bits UF for memory reasons, also, would require to modify unionFind.hpp)
typedef uint32_t uf_hashes_t;
// but there can be more than 2^{32} sequences in the glue file
typedef uint64_t uf_hashes_t; // UF hashes are the hash values of k-mers to be inserted into the UF data structure. Don't try setting to uint32_t, would be a disaster
typedef uint64_t seq_idx_t;
// so, potentially, more than 2^{32} UF hashes (but not necessarily, consider that some sequences don't need to be glued)
// what will happen is that more one UF class won't be linked to a single unitig, but multiple unitigs
typedef uint32_t uf_class_t; // UF class is the identifier of an element in the UF
// let's hope that there won't be saturation (only 1 UF class with all unitigs)
// if this happens, then "Top 10 glue partitions by size:" will show only one entry and BCALM will blow up in memory
// a fix would be to use a 64 bits UF (to be coded later)
......@@ -197,6 +194,24 @@ static string skip_first_abundance(const string& list)
return res;
}
static string make_header(const int seq_size, const string& abundances, bool all_abundance_counts)
{
string header;
float mean_abundance = get_mean_abundance(abundances);
uint64_t sum_abundances = get_sum_abundance(abundances);
if (all_abundance_counts)
{
// in this setting, all kmer wabundances are printed in the order of the kmers in the sequence
header = "LN:i:" + to_string(seq_size) + " ab:Z:" + abundances;
}
else
{
// km is not a standard GFA field so i'm putting it in lower case as per the spec
header = "LN:i:" + to_string(seq_size) + " KC:i:" + to_string(sum_abundances) + " km:f:" + to_string_with_precision(mean_abundance);
}
return header;
}
template<int SPAN>
struct markedSeq
{
......@@ -699,6 +714,7 @@ void bglue(Storage *storage,
int kmerSize,
int nb_glue_partitions,
int nb_threads,
bool all_abundance_counts,
bool verbose
)
{
......@@ -804,7 +820,7 @@ void bglue(Storage *storage,
}
// create a UF data structure
// this one stores nb_uf_keys * uint64_t (actually, atomic's). so it's bigger than uf_hashes
// this one stores nb_uf_keys * uint64_t (actually, atomic's).
unionFind ufkmers(nb_uf_keys);
#if 0
......@@ -911,13 +927,13 @@ void bglue(Storage *storage,
if (only_uf) // for debugging
return;
/* now we're mirroring the UF to a vector of uint32_t's, it will take less space, and strictly same information
/* now we're mirroring the UF to a vector of uint32_t's (uf_class_t), it will take less space, and strictly same information
* this is to get rid of the rank (one uint32) per element in the current UF implementation.
* To do this, we're using the disk to save space of populating one vector from the other in memory.
* (saves having to allocate both vectors at the same time) */
BagFile<uf_hashes_t> *ufkmers_bagf = new BagFile<uf_hashes_t>(prefix+".glue.uf"); LOCAL(ufkmers_bagf);
BagCache<uf_hashes_t> *ufkmers_bag = new BagCache<uf_hashes_t>( ufkmers_bagf, 10000 ); LOCAL(ufkmers_bag);
BagFile<uf_class_t> *ufkmers_bagf = new BagFile<uf_class_t>(prefix+".glue.uf"); LOCAL(ufkmers_bagf);
BagCache<uf_class_t> *ufkmers_bag = new BagCache<uf_class_t>( ufkmers_bagf, 10000 ); LOCAL(ufkmers_bag);
for (unsigned long i = 0; i < nb_uf_keys; i++)
//ufkmers_vector[i] = ufkmers.find(i); // just in-memory without the disk
......@@ -930,15 +946,15 @@ void bglue(Storage *storage,
ufkmers_bag->flush();
std::vector<uf_hashes_t> ufkmers_vector(nb_uf_keys);
IteratorFile<uf_hashes_t> ufkmers_file(prefix+".glue.uf");
std::vector<uf_class_t> ufkmers_vector(nb_uf_keys);
IteratorFile<uf_class_t> ufkmers_file(prefix+".glue.uf");
unsigned long i = 0;
for (ufkmers_file.first(); !ufkmers_file.isDone(); ufkmers_file.next())
ufkmers_vector[i++] = ufkmers_file.item();
System::file().remove (prefix+".glue.uf");
logging("loaded 32-bit UF (" + to_string(nb_uf_keys*sizeof(uf_hashes_t)/1024/1024) + " MB)");
logging("loaded 32-bit UF (" + to_string(nb_uf_keys*sizeof(uf_class_t)/1024/1024) + " MB)");
// setup output file
string output_prefix = prefix;
......@@ -1000,7 +1016,7 @@ void bglue(Storage *storage,
// partition the glue into many files, à la dsk
auto partitionGlue = [k, &modelCanon /* crashes if copied!*/, \
&get_UFclass, &gluePartitions,
&get_UFclass, &gluePartitions, all_abundance_counts,
&out, &outLock, &nb_seqs_in_partition, nbGluePartitions]
(const Sequence& sequence)
{
......@@ -1024,11 +1040,8 @@ void bglue(Storage *storage,
if (!found_class) // this one doesn't need to be glued
{
const string abundances = comment.substr(3);
float mean_abundance = get_mean_abundance(abundances);
uint64_t sum_abundances = get_sum_abundance(abundances);
// km is not a standard GFA field so i'm putting it in lower case as per the spec
output(seq, out, "LN:i:" + to_string(seq.size()) + " KC:i:" + to_string(sum_abundances) + " km:f:" + to_string_with_precision(mean_abundance));
string header = make_header(seq.size(),abundances, all_abundance_counts);
output(seq, out, header);
return;
}
......@@ -1082,7 +1095,7 @@ void bglue(Storage *storage,
for (int partition = 0; partition < nbGluePartitions; partition++)
{
auto glue_partition = [&modelCanon, &ufkmers, partition, &gluePartition_prefix, nbGluePartitions, &copy_nb_seqs_in_partition,
&get_UFclass, &out, &outLock, kmerSize]( int thread_id)
&get_UFclass, &out, &outLock, kmerSize, all_abundance_counts]( int thread_id)
{
int k = kmerSize;
......@@ -1172,10 +1185,9 @@ void bglue(Storage *storage,
string seq, abs;
glue_sequences(seqs_to_glue[i], seqs_to_glue_is_circular[i], sequences, abundances, kmerSize, seq, abs); // takes as input the indices of ordered sequences, whether that sequence is circular, and the markedSeq's themselves along with their abundances
float mean_abundance = get_mean_abundance(abs);
uint32_t sum_abundances = get_sum_abundance(abs);
{
output(seq, out, "LN:i:" + to_string(seq.size()) + " KC:i:" + to_string(sum_abundances) + " km:f:" + to_string_with_precision(mean_abundance));
string header = make_header(seq.size(),abs, all_abundance_counts);
output(seq, out, header);
}
}
......@@ -1198,7 +1210,7 @@ void bglue(Storage *storage,
logging("end");
bool debug_keep_glue_files = true; // for debugging // TODO enable it if -redo-bglue param was provided (need some info from UnitigsConstructionAlgorithm).
bool debug_keep_glue_files = false; // for debugging // TODO warning: if debug_keep_glue_files is set to 'false,' then the debug option '-redo-bglue' cannot work because it needs those bglue files
if (debug_keep_glue_files)
{
std::cout << "debug: not deleting glue files" << std::endl;
......
......@@ -150,6 +150,7 @@ void bglue(gatb::core::tools::storage::impl::Storage* storage,
int kmerSize,
int nb_glue_partitions,
int nb_threads,
bool all_abundance_counts,
bool verbose
);
......
......@@ -648,6 +648,8 @@ IOptionsParser* GraphTemplate<Node, Edge, GraphDataVariant>::getOptionsParser (b
IOptionsParser* parserGeneral = new OptionsParser ("general");
parserGeneral->push_front (new OptionOneParam (STR_INTEGER_PRECISION, "integers precision (0 for optimized value)", false, "0", false));
parserGeneral->push_front (new OptionOneParam (STR_VERBOSE, "verbosity level", false, "1" ));
parserGeneral->push_front (new OptionOneParam (STR_EDGE_KM_REPRESENTATION, "edge km representation", false, "0" ));
parserGeneral->push_front (new OptionNoParam (STR_ALL_ABUNDANCE_COUNTS, "output all k-mer abundance counts instead of mean" ));
parserGeneral->push_front (new OptionOneParam (STR_NB_CORES, "number of cores", false, "0" ));
parserGeneral->push_front (new OptionNoParam (STR_CONFIG_ONLY, "dump config only"));
......@@ -661,7 +663,7 @@ IOptionsParser* GraphTemplate<Node, Edge, GraphDataVariant>::getOptionsParser (b
parserDebug->push_front (new OptionNoParam ("-skip-links", "same, but skip links"));
parserDebug->push_front (new OptionNoParam ("-redo-links", "same, but redo links"));
parserDebug->push_front (new OptionNoParam ("-skip-bglue", "same, but skip bglue"));
parserDebug->push_front (new OptionNoParam ("-redo-bglue", "same, but redo bglue"));
parserDebug->push_front (new OptionNoParam ("-redo-bglue", "same, but redo bglue (needs debug_keep_glue_files=true in source code)"));
parserDebug->push_front (new OptionNoParam ("-skip-bcalm", "same, but skip bcalm"));
parserDebug->push_front (new OptionNoParam ("-redo-bcalm", "debug function, redo the bcalm algo"));
......
......@@ -259,7 +259,7 @@ void GraphUnitigsTemplate<span>::build_unitigs_postsolid(std::string unitigs_fil
}
bool redo_bcalm = props->get("-redo-bcalm");
bool redo_bglue = props->get("-redo-bglue");
bool redo_bglue = props->get("-redo-bglue"); // note: if that option is to be used, make sure to enable debug_keep_glue_files=true in bglue_algo.cpp
bool redo_links = props->get("-redo-links");
bool skip_bcalm = props->get("-skip-bcalm");
......
......@@ -52,7 +52,7 @@ namespace gatb { namespace core { namespace debruijn { namespace impl {
* Normally bcalm outputs consecutive unitig ID's but LinkTigs can also work with non-consecutive, non-sorted IDs
*/
template<size_t span>
void link_tigs(string unitigs_filename, int kmerSize, int nb_threads, uint64_t &nb_unitigs, bool verbose, bool renumber_unitigs)
void link_tigs(string unitigs_filename, int kmerSize, int nb_threads, uint64_t &nb_unitigs, bool verbose, bool edge_km_representation, bool renumber_unitigs)
{
bcalm_logging = verbose;
BankFasta* out = new BankFasta(unitigs_filename+".linked");
......@@ -60,7 +60,7 @@ void link_tigs(string unitigs_filename, int kmerSize, int nb_threads, uint64_t &
logging("Finding links between unitigs");
for (int pass = 0; pass < nb_passes; pass++)
link_unitigs_pass<span>(unitigs_filename, verbose, pass, kmerSize, renumber_unitigs);
link_unitigs_pass<span>(unitigs_filename, verbose, pass, kmerSize, edge_km_representation, renumber_unitigs );
write_final_output(unitigs_filename, verbose, out, nb_unitigs, renumber_unitigs);
......@@ -265,7 +265,7 @@ static void record_links(uint64_t utig_id, int pass, const string &link, std::of
template<size_t span>
void link_unitigs_pass(const string unitigs_filename, bool verbose, const int pass, const int kmerSize, const bool renumber_unitigs)
void link_unitigs_pass(const string unitigs_filename, bool verbose, const int pass, const int kmerSize, bool edge_km_representation, const bool renumber_unitigs)
{
typedef typename kmer::impl::Kmer<span>::ModelCanonical Model;
typedef typename kmer::impl::Kmer<span>::Type Type;
......@@ -376,7 +376,12 @@ void link_unitigs_pass(const string unitigs_filename, bool verbose, const int pa
//bool rc = e_in.rc ^ (!beginInSameOrientation); // "rc" sets the destination strand // i don't think it's the right formula because of k-1-mers that are their self revcomp. see the mikko bug in the test folder, that provides a nice illustration of that
bool rc = e_in.pos == UNITIG_END; // a better way to determine the rc flag is just looking at position of e_in k-1-mer
in_links += "L:-:" + to_string(e_in.unitig) + ":" + (rc?"-":"+") + " ";
if(edge_km_representation){
in_links += "J:0:" + to_string(e_in.unitig) + ":" + (rc?"1":"0") + " ";
}else{
in_links += "L:-:" + to_string(e_in.unitig) + ":" + (rc?"-":"+") + " ";
}
/* what to do when kmerBegin is same as forward and reverse?
used to have this:
......@@ -432,7 +437,13 @@ void link_unitigs_pass(const string unitigs_filename, bool verbose, const int pa
bool rc = e_out.pos == UNITIG_END; // a better way to determine the rc flag is just looking at position of e_in k-1-mer
out_links += "L:+:" + to_string(e_out.unitig) + ":" + (rc?"-":"+") + " ";
if(edge_km_representation){
out_links += "J:1:" + to_string(e_out.unitig) + ":" + (rc?"1":"0") + " ";
}else{
out_links += "L:+:" + to_string(e_out.unitig) + ":" + (rc?"-":"+") + " ";
}
if (debug) std::cout << " [valid] ";
}
......
......@@ -30,10 +30,10 @@ namespace gatb { namespace core { namespace debruijn { namespace impl {
template<size_t SPAN>
void link_tigs( std::string prefix, int kmerSize, int nb_threads, uint64_t &nb_unitigs, bool verbose, bool renumber_unitigs = false);
void link_tigs( std::string prefix, int kmerSize, int nb_threads, uint64_t &nb_unitigs, bool verbose, bool edge_km_representation, bool renumber_unitigs = false);
template<size_t span>
void link_unitigs_pass(const std::string unitigs_filename, bool verbose, const int pass, const int kmerSize, const bool renumber_unitigs);
void link_unitigs_pass(const std::string unitigs_filename, bool verbose, const int pass, const int kmerSize, bool edge_km_representation, const bool renumber_unitigs );
}}}}
......
......@@ -91,17 +91,15 @@ UnitigsConstructionAlgorithm<span>::~UnitigsConstructionAlgorithm ()
template <size_t span>
void UnitigsConstructionAlgorithm<span>::execute ()
{
kmerSize =
getInput()->getInt(STR_KMER_SIZE);
int abundance =
getInput()->getInt(STR_KMER_ABUNDANCE_MIN); // note: doesn't work when it's "auto"
int minimizerSize =
getInput()->getInt(STR_MINIMIZER_SIZE);
int nb_threads =
getInput()->getInt(STR_NB_CORES);
int minimizer_type =
getInput()->getInt(STR_MINIMIZER_TYPE);
bool verbose = getInput()->getInt(STR_VERBOSE);
kmerSize = getInput()->getInt(STR_KMER_SIZE);
int abundance = getInput()->getInt(STR_KMER_ABUNDANCE_MIN); // note: doesn't work when it's "auto"
int minimizerSize = getInput()->getInt(STR_MINIMIZER_SIZE);
int nb_threads = getInput()->getInt(STR_NB_CORES);
int minimizer_type = getInput()->getInt(STR_MINIMIZER_TYPE);
bool verbose = getInput()->getInt(STR_VERBOSE);
bool edge_km_representation = getInput()->getInt(STR_EDGE_KM_REPRESENTATION);
bool all_abundance_counts = getInput()->get(STR_ALL_ABUNDANCE_COUNTS);
int nb_glue_partitions = 0;
if (getInput()->get("-nb-glue-partitions"))
nb_glue_partitions = getInput()->getInt("-nb-glue-partitions");
......@@ -110,9 +108,9 @@ void UnitigsConstructionAlgorithm<span>::execute ()
if ((unsigned int)nb_threads > nbThreads)
std::cout << "Uh. Unitigs graph construction called with nb_threads " << nb_threads << " but dispatcher has nbThreads " << nbThreads << std::endl;
if (do_bcalm) bcalm2<span>(&_storage, unitigs_filename, kmerSize, abundance, minimizerSize, nbThreads, minimizer_type, verbose);
if (do_bglue) bglue<span> (&_storage, unitigs_filename, kmerSize, nb_glue_partitions, nbThreads, verbose);
if (do_links) link_tigs<span>(unitigs_filename, kmerSize, nbThreads, nb_unitigs, verbose);
if (do_bcalm) bcalm2<span>(&_storage, unitigs_filename, kmerSize, abundance, minimizerSize, nbThreads, minimizer_type, verbose);
if (do_bglue) bglue<span> (&_storage, unitigs_filename, kmerSize, nb_glue_partitions, nbThreads, all_abundance_counts, verbose);
if (do_links) link_tigs<span>(unitigs_filename, kmerSize, nbThreads, nb_unitigs, verbose, edge_km_representation);
/** We gather some statistics. */
// nb_unitigs will be used in GraphUnitigs
......
......@@ -1300,6 +1300,16 @@ void SortingCountAlgorithm<span>::fillPartitions (size_t pass, Iterator<Sequence
itBanks[i]->finalize();
}
}
// force close partitions and re-open them for reading
// may prevent crash in large multi-bank counting instance on Lustre filesystems
if(_config._solidityKind != KMER_SOLIDITY_SUM)
{
string tmpStorageName = getInput()->getStr(STR_URI_OUTPUT_TMP) + "/" + System::file().getTemporaryFilename("dsk_partitions");
setPartitions (0); // close the partitions first, otherwise new files are opened before closing parti from previous pass
setPartitions ( & (*_tmpPartitionsStorage)().getPartition<Type> ("parts"));
}
}
/*********************************************************************
......
......@@ -36,6 +36,7 @@
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#include <iostream>
/********************************************************************************/
namespace gatb {
......@@ -60,6 +61,7 @@ public:
{
_isStdout = path && strcmp(path,"stdout")==0;
_handle = _isStdout ? stdout : fopen (path, mode);
//std::cout << "opening file " << _path << " handle " << _handle << std::endl;
if(_handle == 0)
{
throw Exception ("cannot open %s %s",path,strerror(errno));
......@@ -67,7 +69,9 @@ public:
}
/** Destructor. */
virtual ~CommonFile () { if (_handle && !_isStdout) { fclose (_handle); } }
virtual ~CommonFile () { if (_handle && !_isStdout) {
//std::cout << "closing file " << _path << " handle " << _handle << std::endl;
fclose (_handle); } }
/** \copydoc IFile::isOpen */
bool isOpen () { return getHandle() != 0; }
......
......@@ -25,15 +25,16 @@ template void bglue<${KSIZE}>(Storage* storage,
int kmerSize,
int nb_glue_partitions,
int nb_threads,
bool all_abundance_counts,
bool verbose
);
template class graph3<${KSIZE}>; // graph3<span> switch
template void link_tigs<${KSIZE}>
(std::string unitigs_filename, int kmerSize, int nb_threads, uint64_t &nb_unitigs, bool verbose, bool renumber_unitigs = false);
(std::string unitigs_filename, int kmerSize, int nb_threads, uint64_t &nb_unitigs, bool verbose, bool edge_km_representation, bool renumber_unitigs = false);
template void link_unitigs_pass<${KSIZE}>(const std::string unitigs_filename, bool verbose, const int pass, const int kmerSize, const bool renumber_unitigs);
template void link_unitigs_pass<${KSIZE}>(const std::string unitigs_filename, bool verbose, const int pass, const int kmerSize, bool edge_km_representation, const bool renumber_unitigs);
/********************************************************************************/
......
......@@ -239,6 +239,7 @@ public:
_filename(it._filename), _gzfile(0), _buffer(0), _cpt_buffer(0), _idx(0), _cacheItemsNb(it._cacheItemsNb), _isDone(true)
{
_gzfile = gzopen(_filename.c_str(),"rb");
gzbuffer(_gzfile,2*1024*1024);
_buffer = (Item*) MALLOC (sizeof(Item) * _cacheItemsNb);
}
......@@ -248,6 +249,7 @@ public:
{
_gzfile = gzopen(_filename.c_str(),"rb");
gzbuffer(_gzfile,2*1024*1024);
_buffer = (Item*) MALLOC (sizeof(Item) * _cacheItemsNb);
}
......@@ -273,6 +275,7 @@ public:
_isDone = it._isDone;
_gzfile = gzopen(_filename.c_str(),"r");
gzbuffer(_gzfile,2*1024*1024);
_buffer = (Item*) MALLOC (sizeof(Item) * it._cacheItemsNb);
}
return *this;
......
......@@ -83,6 +83,8 @@ public:
const char* graph () { return "-graph"; }
const char* kmer_size () { return "-kmer-size"; }
const char* minimizer_size () { return "-minimizer-size"; }
const char* edge_km_representation () { return "-edge-km"; }
const char* all_abundance_counts () { return "-all-abundance-counts"; }
const char* kmer_abundance () { return "-abundance"; }
const char* kmer_abundance_min () { return "-abundance-min"; }
const char* kmer_abundance_min_threshold () { return "-abundance-min-threshold"; }
......@@ -138,6 +140,8 @@ public:
#define STR_URI_GRAPH gatb::core::tools::misc::StringRepository::singleton().graph ()
#define STR_KMER_SIZE gatb::core::tools::misc::StringRepository::singleton().kmer_size ()
#define STR_MINIMIZER_SIZE gatb::core::tools::misc::StringRepository::singleton().minimizer_size ()
#define STR_EDGE_KM_REPRESENTATION gatb::core::tools::misc::StringRepository::singleton().edge_km_representation ()
#define STR_ALL_ABUNDANCE_COUNTS gatb::core::tools::misc::StringRepository::singleton().all_abundance_counts ()
#define STR_INTEGER_PRECISION gatb::core::tools::misc::StringRepository::singleton().integer_precision ()
#define STR_KMER_ABUNDANCE gatb::core::tools::misc::StringRepository::singleton().kmer_abundance ()
#define STR_KMER_ABUNDANCE_MIN gatb::core::tools::misc::StringRepository::singleton().kmer_abundance_min ()
......
......@@ -57,7 +57,6 @@ Tool::Tool (const std::string& name) : userDisplayHelp(0), _helpTarget(0),userDi
getParser()->push_back (new OptionOneParam (STR_NB_CORES, "number of cores", false, "0" ));
getParser()->push_back (new OptionOneParam (STR_VERBOSE, "verbosity level", false, "1" ));
getParser()->push_back (new OptionNoParam (STR_VERSION, "version", false));
getParser()->push_back (new OptionNoParam (STR_HELP, "help", false));
......
......@@ -266,6 +266,7 @@ public:
herr_t status = 0;
{
//std::cout << "begin insert" << std::endl;
system::LocalSynchronizer localsynchro (_common->_synchro);
/** We get the dataset id. */
......@@ -300,6 +301,7 @@ public:
status = H5Sclose (filespaceId);
status = H5Sclose (memspaceId);
if (status != 0) { std::cout << "err H5Sclose" << std::endl; }
//std::cout << "end insert" << std::endl;
}
/** We periodically clean up some HDF5 resources. */
......@@ -373,12 +375,14 @@ private:
* NOTE !!! the 'clean' method called after this block is also synchronized,
* and therefore must not be in the same instruction block. */
{
//std::cout << "begin retrievecache" << std::endl;
system::LocalSynchronizer localsynchro (_common->_synchro);
hid_t memspaceId = H5Screate_simple (1, &count, NULL);
/** Select hyperslab on file dataset. */
hid_t filespaceId = H5Dget_space(_common->getDatasetId());
//std::cout << "filespaceId " << filespaceId << std::endl;
status = H5Sselect_hyperslab (filespaceId, H5S_SELECT_SET, &start, NULL, &count, NULL);
if (status < 0) { throw gatb::core::system::Exception ("HDF5 error (H5Sselect_hyperslab), status %d", status); }
......@@ -390,6 +394,7 @@ private:
status = H5Sclose (filespaceId);
status = H5Sclose (memspaceId);
if (status < 0) { throw gatb::core::system::Exception ("HDF5 error (H5Sclose), status %d", status); }
//std::cout << "end retrievecache" << std::endl;
}
/** We periodically clean up some HDF5 resources. */
......