Skip to content
Commits on Source (15)
gatb-core (1.4.1+git20180206.6f8fce8+dfsg-1) unstable; urgency=medium
* New upstream commit to fit needs of minia and discosnp
* Add symbols file
* Bump SOVERSION due to changed symbols
-- Andreas Tille <tille@debian.org> Tue, 22 Jan 2019 16:58:53 +0100
gatb-core (1.4.1+dfsg-4) unstable; urgency=medium
* Install json.hpp since it is referenced in header files
* debhelper 12
* Standards-Version: 4.3.0
-- Andreas Tille <tille@debian.org> Tue, 22 Jan 2019 14:50:38 +0100
gatb-core (1.4.1+dfsg-3) unstable; urgency=medium
* Make sure target dir exists also for Architecture: all build
......
......@@ -4,7 +4,7 @@ Uploaders: Nadiya Sitdykova <rovenskasa@gmail.com>,
Andreas Tille <tille@debian.org>
Section: science
Priority: optional
Build-Depends: debhelper (>= 11~),
Build-Depends: debhelper (>= 12~),
d-shlibs,
cmake,
libcppunit-dev,
......@@ -13,7 +13,7 @@ Build-Depends: debhelper (>= 11~),
libjsoncpp-dev,
doxygen,
graphviz
Standards-Version: 4.2.1
Standards-Version: 4.3.0
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
......@@ -35,7 +35,7 @@ Description: Genome Analysis Toolbox with de-Bruijn graph
exist a set of ready-to-use tools relying on GATB-CORE
library: see https://gatb.inria.fr/software/
Package: libgatbcore0
Package: libgatbcore1
Architecture: any
Section: libs
Depends: ${shlibs:Depends},
......@@ -60,7 +60,7 @@ Architecture: any
Section: libdevel
Depends: ${shlibs:Depends},
${misc:Depends},
libgatbcore0 (= ${binary:Version})
libgatbcore1 (= ${binary:Version})
Description: development library of the Genome Analysis Toolbox
The GATB-CORE project provides a set of highly efficient
algorithms to analyse NGS data sets. These methods enable
......
gatb-core/thirdparty/json usr/include
This diff is collapsed.
From 0c580ab9e5f4a848c9c245060415e9acfe1655c7 Mon Sep 17 00:00:00 2001
From: rchikhi <rayan.chikhi@univ-lille1.fr>
Date: Mon, 24 Dec 2018 14:57:48 +0100
Origin: https://github.com/GATB/gatb-core/commit/0c580ab.patch
Subject: [PATCH] fixed bug #37 where unitigs are not output with consecutive
IDs, and also made sure that even if they're not, links are robust to that
---
gatb-core/src/gatb/bcalm2/bglue_algo.cpp | 19 ++++----------
gatb-core/src/gatb/bcalm2/bglue_algo.hpp | 15 +++++++++--
gatb-core/src/gatb/debruijn/impl/LinkTigs.cpp | 25 +++++++++++--------
3 files changed, 32 insertions(+), 27 deletions(-)
diff --git a/gatb-core/src/gatb/bcalm2/bglue_algo.cpp b/gatb-core/src/gatb/bcalm2/bglue_algo.cpp
index 6256282e..c12d1f79 100644
--- a/gatb-core/src/gatb/bcalm2/bglue_algo.cpp
+++ b/gatb-core/src/gatb/bcalm2/bglue_algo.cpp
@@ -904,9 +904,7 @@ void bglue(Storage *storage,
// setup output file
string output_prefix = prefix;
- std::atomic<unsigned long> out_id; // identified for output sequences
- out_id = 0;
- BufferedFasta out (output_prefix, 100000);
+ BufferedFasta out (output_prefix, 100000, true);
auto get_UFclass = [&modelCanon, &ufkmers_vector, &hasher, &uf_mphf]
(const string &kmerBegin, const string &kmerEnd,
@@ -966,7 +964,7 @@ void bglue(Storage *storage,
std::mutex mtx; // lock to avoid a nasty bug when calling output()
auto partitionGlue = [k, &modelCanon /* crashes if copied!*/, \
&get_UFclass, &gluePartitions,
- &out, &outLock, &nb_seqs_in_partition, &out_id, nbGluePartitions, &mtx]
+ &out, &outLock, &nb_seqs_in_partition, nbGluePartitions, &mtx]
(const Sequence& sequence)
{
const string &seq = sequence.toString();
@@ -992,12 +990,8 @@ void bglue(Storage *storage,
float mean_abundance = get_mean_abundance(abundances);
uint32_t sum_abundances = get_sum_abundance(abundances);
- // for some reason i do need that lock_guard here.. even though output is itself lock guarded. maybe some lazyness in the evauation of the to_string(out_id++)? who kon
- // anyway this fixes the problem, i'll understand it some other time.
- std::lock_guard<std::mutex> lock(mtx);
- output(seq, out, std::to_string(out_id++) + " LN:i:" + to_string(seq.size()) + " KC:i:" + to_string(sum_abundances) + " km:f:" + to_string_with_precision(mean_abundance));
// km is not a standard GFA field so i'm putting it in lower case as per the spec
- // maybe could optimize by writing to disk using queues, if that's ever a bottleneck
+ output(seq, out, "LN:i:" + to_string(seq.size()) + " KC:i:" + to_string(sum_abundances) + " km:f:" + to_string_with_precision(mean_abundance));
return;
}
@@ -1051,7 +1045,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, &out_id, kmerSize, &mtx]( int thread_id)
+ &get_UFclass, &out, &outLock, kmerSize, &mtx]( int thread_id)
{
int k = kmerSize;
@@ -1140,10 +1134,7 @@ void bglue(Storage *storage,
float mean_abundance = get_mean_abundance(abs);
uint32_t sum_abundances = get_sum_abundance(abs);
{
- // for some reason i do need that lock_guard here.. even though output is itself lock guarded. maybe some lazyness in the evauation of the to_string(out_id++)? who kon
- // anyway this fixes the problem, i'll understand it some other time.
- std::lock_guard<std::mutex> lock(mtx);
- output(seq, out, std::to_string(out_id++) + " LN:i:" + to_string(seq.size()) + " KC:i:" + to_string(sum_abundances) + " km:f:" + to_string_with_precision(mean_abundance));
+ output(seq, out, "LN:i:" + to_string(seq.size()) + " KC:i:" + to_string(sum_abundances) + " km:f:" + to_string_with_precision(mean_abundance));
}
}
diff --git a/gatb-core/src/gatb/bcalm2/bglue_algo.hpp b/gatb-core/src/gatb/bcalm2/bglue_algo.hpp
index 50ca9176..7783215f 100644
--- a/gatb-core/src/gatb/bcalm2/bglue_algo.hpp
+++ b/gatb-core/src/gatb/bcalm2/bglue_algo.hpp
@@ -43,16 +43,21 @@ class BufferedFasta
std::string buffer;
unsigned long buffer_length;
FILE* _insertHandle;
+ bool needs_consecutive_ids;
+ unsigned long consecutive_id;
public:
unsigned long max_buffer;
bool threadsafe;
- BufferedFasta(const std::string filename, unsigned long given_max_buffer = 50000)
+ BufferedFasta(const std::string filename, unsigned long given_max_buffer = 50000, bool given_needs_consecutive_ids = false)
{
max_buffer = given_max_buffer; // that much of buffering will be written to the file at once (in bytes)
threadsafe = true;
buffer_length = 0;
+ consecutive_id = 0;
+ needs_consecutive_ids = given_needs_consecutive_ids;
+ if ((!threadsafe) && needs_consecutive_ids) { std::cout << "error, non-threadsafe bufferedfasta with consecutive ids asked" << std::endl; exit(1);}
_insertHandle = fopen (filename.c_str(), "w");
if (!_insertHandle) { std::cout << "error opening " << filename << " for writing." << std::endl; exit(1);}
buffer.reserve(max_buffer+1000/*security*/);
@@ -73,7 +78,13 @@ class BufferedFasta
if (buffer_length + insert_size > max_buffer)
flush();
buffer_length += insert_size;
- buffer += ">" + comment + "\n" + seq + "\n";
+ buffer += ">";
+ if (needs_consecutive_ids)
+ {
+ buffer += std::to_string(consecutive_id) + " ";
+ consecutive_id++;
+ }
+ buffer += comment + "\n" + seq + "\n";
if (threadsafe)
mtx.unlock();
}
diff --git a/gatb-core/src/gatb/debruijn/impl/LinkTigs.cpp b/gatb-core/src/gatb/debruijn/impl/LinkTigs.cpp
index a13668ac..b21d164e 100644
--- a/gatb-core/src/gatb/debruijn/impl/LinkTigs.cpp
+++ b/gatb-core/src/gatb/debruijn/impl/LinkTigs.cpp
@@ -41,6 +41,9 @@ namespace gatb { namespace core { namespace debruijn { namespace impl {
* it uses the disk to store the links for extremities until they're merged into the final unitigs file.
*
* so the memory usage is just that of the hash tables that record kmers, not of the links
+ *
+ * Assumption: FASTA header of unitigs starts with a unique number (unitig ID).
+ * Normally bcalm outputs consecutive unitig ID's but LinkTigs could 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)
@@ -219,7 +222,6 @@ void link_unitigs_pass(const string unitigs_filename, bool verbose, const int pa
BankFasta inputBank (unitigs_filename);
BankFasta::Iterator itSeq (inputBank);
- uint64_t utig_counter = 0;
Model modelKminusOne(kmerSize - 1); // it's canonical (defined in the .hpp file)
@@ -235,12 +237,15 @@ void link_unitigs_pass(const string unitigs_filename, bool verbose, const int pa
const string& seq = itSeq->toString();
if (debug) std::cout << "unitig: " << seq << std::endl;
+ const string& comment = itSeq->getComment();
+ unsigned long utig_id = std::stoul(comment.substr(0, comment.find(' ')));
+
if (is_in_pass(seq, pass, UNITIG_BEGIN, kmerSize))
{
if (debug) std::cout << "pass " << pass << " examining beginning" << std::endl;
typename Model::Kmer kmerBegin = modelKminusOne.codeSeed(seq.substr(0, kmerSize-1).c_str(), Data::ASCII);
bool beginInSameOrientation = modelKminusOne.toString(kmerBegin.value()) == seq.substr(0,kmerSize-1);
- ExtremityInfo eBegin(utig_counter, !beginInSameOrientation /* because we record rc*/, UNITIG_BEGIN);
+ ExtremityInfo eBegin(utig_id, !beginInSameOrientation /* because we record rc*/, UNITIG_BEGIN);
utigs_links_map[kmerBegin.value()].push_back(eBegin.pack());
}
if (is_in_pass(seq, pass, UNITIG_END, kmerSize))
@@ -248,11 +253,10 @@ void link_unitigs_pass(const string unitigs_filename, bool verbose, const int pa
if (debug) std::cout << "pass " << pass << " examining end" << std::endl;
typename Model::Kmer kmerEnd = modelKminusOne.codeSeed(seq.substr(seq.size() - kmerSize+1).c_str(), Data::ASCII);
bool endInSameOrientation = modelKminusOne.toString(kmerEnd.value()) == seq.substr(seq.size() - kmerSize+1);
- ExtremityInfo eEnd( utig_counter, !endInSameOrientation, UNITIG_END);
+ ExtremityInfo eEnd( utig_id, !endInSameOrientation, UNITIG_END);
utigs_links_map[kmerEnd.value()].push_back(eEnd.pack());
// there is no UNITIG_BOTH here because we're taking (k-1)-mers.
}
- utig_counter++;
}
std::ofstream links_file(unitigs_filename+".links." +to_string(pass));
@@ -262,12 +266,13 @@ void link_unitigs_pass(const string unitigs_filename, bool verbose, const int pa
nb_hashed_entries += v.second.size();
logging("step 2 (" + to_string(utigs_links_map.size()) + "kmers/" + to_string(nb_hashed_entries) + "extremities)");
- utig_counter = 0;
for (itSeq.first(); !itSeq.isDone(); itSeq.next())
{
const string& seq = itSeq->toString();
-
- if (debug) std::cout << "unitig: " << seq << std::endl;
+ const string& comment = itSeq->getComment();
+ unsigned long utig_id = std::stoul(comment.substr(0, comment.find(' ')));
+
+ if (debug) std::cout << "unitig " << std::to_string(utig_id) << " : " << seq << std::endl;
if (is_in_pass(seq, pass, UNITIG_BEGIN, kmerSize))
{
@@ -324,7 +329,7 @@ void link_unitigs_pass(const string unitigs_filename, bool verbose, const int pa
if (debug) std::cout << std::endl;
}
- record_links(utig_counter, pass, in_links, links_file);
+ record_links(utig_id, pass, in_links, links_file);
}
@@ -371,10 +376,8 @@ void link_unitigs_pass(const string unitigs_filename, bool verbose, const int pa
}
if (debug) std::cout << std::endl;
}
- record_links(utig_counter, pass, out_links, links_file);
+ record_links(utig_id, pass, out_links, links_file);
}
-
- utig_counter++;
}
}
From 44d5a444f7d8b921b66065ef2d6270d3eb0f1446 Mon Sep 17 00:00:00 2001
From: rchikhi <rayan.chikhi@univ-lille1.fr>
Date: Tue, 25 Dec 2018 01:05:20 +0100
Origin: https://github.com/GATB/gatb-core/commit/44d5a44.patch
Subject: [PATCH] fixed kmer counting of IUPAC nucleotides
---
gatb-core/src/gatb/tools/misc/api/Data.cpp | 4 ++++
gatb-core/src/gatb/tools/misc/api/Data.hpp | 21 +++++++++++++++++----
2 files changed, 21 insertions(+), 4 deletions(-)
create mode 100644 gatb-core/src/gatb/tools/misc/api/Data.cpp
diff --git a/gatb-core/src/gatb/tools/misc/api/Data.cpp b/gatb-core/src/gatb/tools/misc/api/Data.cpp
new file mode 100644
index 00000000..cddc7e38
--- /dev/null
+++ b/gatb-core/src/gatb/tools/misc/api/Data.cpp
@@ -0,0 +1,4 @@
+#include <gatb/tools/misc/api/Data.hpp>
+
+const unsigned char gatb::core::tools::misc::Data::validNucleotide[]= {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
+
diff --git a/gatb-core/src/gatb/tools/misc/api/Data.hpp b/gatb-core/src/gatb/tools/misc/api/Data.hpp
index 0c39e726..22e174a3 100644
--- a/gatb-core/src/gatb/tools/misc/api/Data.hpp
+++ b/gatb-core/src/gatb/tools/misc/api/Data.hpp
@@ -170,17 +170,30 @@ class Data : public Vector<char>
* - second : 0 if valid, 1 if invalid (in case of N character for instance) */
typedef std::pair<char,char> ConvertChar;
- /** Note for the ASCII conversion: the 4th bit is used to tell whether it is invalid or not.
- * => it finds out that 'N' character has this 4th bit equals to 1, which is not the case
- * for 'A', 'C', 'G' and 'T'. */
- struct ConvertASCII { static ConvertChar get (const char* buffer, size_t idx) { return ConvertChar((buffer[idx]>>1) & 3, (buffer[idx]>>3) & 1); }};
+ /** Used to have the following trick:
+ * (buffer[idx]>>3)& 1
+ * was equal to 1 for 'A', 'C', 'G' and 'T' (and also the lower case version)
+ * and was equal to 0 for 'N' and 'n'
+ * but unfortunately it doesn't work for some of the IUPAC codes, like 'R'
+ * */
+ struct ConvertASCII { static ConvertChar get (const char* buffer, size_t idx) { return ConvertChar((buffer[idx]>>1) & 3, validNucleotide[(unsigned char)(buffer[idx])]); }};
struct ConvertInteger { static ConvertChar get (const char* buffer, size_t idx) { return ConvertChar(buffer[idx],0); } };
struct ConvertBinary { static ConvertChar get (const char* buffer, size_t idx) { return ConvertChar(((buffer[idx>>2] >> ((3-(idx&3))*2)) & 3),0); } };
+ static const unsigned char validNucleotide[];
private:
/** Encoding scheme of the data instance. */
Encoding_e encoding;
+
+ /* generated using:
+ * codes=[1]*256
+ * codes[ord('A')] = codes[ord('a')] = 0;
+ * codes[ord('C')] = codes[ord('c')] = 0;
+ * codes[ord('G')] = codes[ord('g')] = 0;
+ * codes[ord('T')] = codes[ord('t')] = 0;
+ * print(codes)
+ */
};
/********************************************************************************/
From 5d4566430e0f708b602d26e0b54bd21dd4d7852b Mon Sep 17 00:00:00 2001
From: rchikhi <rayan.chikhi@univ-lille1.fr>
Date: Sat, 20 Oct 2018 10:30:53 +0200
Origin: https://github.com/GATB/gatb-core/commit/5d45664.patch
Subject: [PATCH] fix typo gatb/minia#11
---
gatb-core/src/gatb/kmer/impl/SortingCountAlgorithm.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gatb-core/src/gatb/kmer/impl/SortingCountAlgorithm.cpp b/gatb-core/src/gatb/kmer/impl/SortingCountAlgorithm.cpp
index 96cf3b2f..a86969f5 100644
--- a/gatb-core/src/gatb/kmer/impl/SortingCountAlgorithm.cpp
+++ b/gatb-core/src/gatb/kmer/impl/SortingCountAlgorithm.cpp
@@ -212,7 +212,7 @@ IOptionsParser* SortingCountAlgorithm<span>::getOptionsParser (bool mandatory)
parser->push_back (new OptionOneParam (STR_KMER_ABUNDANCE_MIN_THRESHOLD,"min abundance hard threshold (only used when min abundance is \"auto\")",false, "2"));
parser->push_back (new OptionOneParam (STR_HISTOGRAM_MAX, "max number of values in kmers histogram", false, "10000"));
parser->push_back (new OptionOneParam (STR_SOLIDITY_KIND, "way to compute counts of several files (sum, min, max, one, all, custom)",false, "sum"));
- parser->push_back (new OptionOneParam (STR_SOLIDITY_CUSTOM, "when solidity-kind is cutom, specifies list of files where kmer must be present",false, ""));
+ parser->push_back (new OptionOneParam (STR_SOLIDITY_CUSTOM, "when solidity-kind is custom, specifies list of files where kmer must be present",false, ""));
parser->push_back (new OptionOneParam (STR_MAX_MEMORY, "max memory (in MBytes)", false, "5000"));
parser->push_back (new OptionOneParam (STR_MAX_DISK, "max disk (in MBytes)", false, "0"));
parser->push_back (new OptionOneParam (STR_URI_SOLID_KMERS, "output file for solid kmers (only when constructing a graph)", false));
From 61c5ee19d44812f506258c22177c684936f8fd6f Mon Sep 17 00:00:00 2001
From: rchikhi <rayan.chikhi@univ-lille1.fr>
Date: Mon, 22 Oct 2018 11:48:08 +0200
Origin: https://github.com/GATB/gatb-core/commit/61c5ee1.patch
Subject: [PATCH] small bugfix
---
gatb-core/test/unit/src/debruijn/TestDebruijn.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gatb-core/test/unit/src/debruijn/TestDebruijn.cpp b/gatb-core/test/unit/src/debruijn/TestDebruijn.cpp
index 1be96659..8d12e1fa 100644
--- a/gatb-core/test/unit/src/debruijn/TestDebruijn.cpp
+++ b/gatb-core/test/unit/src/debruijn/TestDebruijn.cpp
@@ -1298,7 +1298,7 @@ class TestDebruijn : public Test
Node n2 = graph.reverse (n1);
CPPUNIT_ASSERT (n2.strand == STRAND_REVCOMP);
- CPPUNIT_ASSERT (graph.toString(n2).compare ("TCAG") == 0 || graph.toString(n1).compare ("TGGA") == 0);
+ CPPUNIT_ASSERT (graph.toString(n2).compare ("TCAG") == 0 || graph.toString(n2).compare ("TGGA") == 0);
}
From da4ceed164c761ad264b5b0b4e6745a9d9e33ea0 Mon Sep 17 00:00:00 2001
From: rchikhi <rayan.chikhi@univ-lille1.fr>
Date: Mon, 24 Dec 2018 15:12:41 +0100
Origin: https://github.com/GATB/gatb-core/commit/da4ceed.patch
Subject: [PATCH] minor cleanup
---
gatb-core/src/gatb/bcalm2/bglue_algo.cpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/gatb-core/src/gatb/bcalm2/bglue_algo.cpp b/gatb-core/src/gatb/bcalm2/bglue_algo.cpp
index c12d1f79..6c1ec575 100644
--- a/gatb-core/src/gatb/bcalm2/bglue_algo.cpp
+++ b/gatb-core/src/gatb/bcalm2/bglue_algo.cpp
@@ -961,10 +961,9 @@ void bglue(Storage *storage,
// partition the glue into many files, à la dsk
- std::mutex mtx; // lock to avoid a nasty bug when calling output()
auto partitionGlue = [k, &modelCanon /* crashes if copied!*/, \
&get_UFclass, &gluePartitions,
- &out, &outLock, &nb_seqs_in_partition, nbGluePartitions, &mtx]
+ &out, &outLock, &nb_seqs_in_partition, nbGluePartitions]
(const Sequence& sequence)
{
const string &seq = sequence.toString();
@@ -1045,7 +1044,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, &mtx]( int thread_id)
+ &get_UFclass, &out, &outLock, kmerSize]( int thread_id)
{
int k = kmerSize;
......@@ -4,15 +4,16 @@ Description: Install examples into correct dir
--- a/gatb-core/CMakeLists.txt
+++ b/gatb-core/CMakeLists.txt
@@ -284,16 +284,17 @@ IF (EXISTS "${PROJECT_SOURCE_DIR}/exampl
ENDIF()
ENDIF()
@@ -286,7 +286,7 @@ ENDIF()
IF (NOT DEFINED GATB_CORE_EXCLUDE_EXAMPLES)
# add example snippets into binary archive (use by CPack directive)
- INSTALL(DIRECTORY "${PROJECT_SOURCE_DIR}/examples/" DESTINATION "examples")
+ INSTALL(DIRECTORY "${PROJECT_SOURCE_DIR}/examples/" DESTINATION "share/doc/gatb-core/examples")
ENDIF()
################################################################################
# INSTALL
@@ -294,9 +294,10 @@ ENDIF()
################################################################################
IF (NOT DEFINED GATB_CORE_INSTALL_EXCLUDE)
......
......@@ -6,3 +6,8 @@ set_soversion.patch
dynamic_linking_of_tools.patch
multiarch.patch
spelling.patch
#44d5a44.patch
#da4ceed.patch
#0c580ab.patch
#61c5ee1.patch
#5d45664.patch
......@@ -9,7 +9,7 @@ Description: Invent soversion 0 since upstream does not set soversion
set_target_properties (gatbcore-static PROPERTIES OUTPUT_NAME gatbcore clean_direct_output 1)
-set_target_properties (gatbcore-dynamic PROPERTIES OUTPUT_NAME gatbcore clean_direct_output 1)
+set_target_properties (gatbcore-dynamic PROPERTIES OUTPUT_NAME gatbcore SOVERSION 0 clean_direct_output 1)
+set_target_properties (gatbcore-dynamic PROPERTIES OUTPUT_NAME gatbcore SOVERSION 1 clean_direct_output 1)
################################################################################
# INSTALLATION
......@@ -4,7 +4,7 @@ Description: Fix spelling issues
--- a/gatb-core/src/gatb/tools/compression/DnaCoder.cpp
+++ b/gatb-core/src/gatb/tools/compression/DnaCoder.cpp
@@ -647,7 +647,7 @@ void DnaEncoder::encodeAnchorRead(int an
@@ -650,7 +650,7 @@ void DnaEncoder::encodeAnchorRead(int an
//CompressionUtils::encodeNumeric(_rangeEncoder, _isPrevReadAnchorablePosModel, _isPrevReadAnchorablePos);
//}
//_prevAnchorAddress = anchorAddress;
......@@ -13,7 +13,7 @@ Description: Fix spelling issues
kmer_type anchor = _kmers[anchorPos];
@@ -1491,7 +1491,7 @@ void DnaDecoder::decodeAnchorRead(){
@@ -1494,7 +1494,7 @@ void DnaDecoder::decodeAnchorRead(){
#ifdef PRINT_DEBUG_DECODER
cout << "\t\t\tRead size: " << _readSize << endl;
cout << "\t\t\tAnchor pos: " << anchorPos << endl;
......
......@@ -13,7 +13,7 @@ Description: Use Debian packaged hdf5
########## MOMENTARY DEACTIVATED => CRASH ON MACOS TO BE INVESTIGATED ##########
SET (HDF5_BUILD_TOOLS ON CACHE BOOL "Build HDF5 Tools")
#SET (CMAKE_EXE_LINKER_FLAGS "-lpthread -lz")
@@ -16,9 +18,9 @@
@@ -16,9 +18,9 @@ SET (HDF5_EXTERNALLY_CONFIGURED ON)
SET (HDF5_INSTALL_BIN_DIR bin)
SET (HDF5_INSTALL_LIB_DIR lib)
......@@ -26,7 +26,7 @@ Description: Use Debian packaged hdf5
IF (NOT DEFINED GATB_CORE_INSTALL_EXCLUDE)
SET (HDF5_EXPORTED_TARGETS "gatb-hdf5")
@@ -32,23 +34,6 @@
@@ -32,23 +34,6 @@ ENDIF()
set (COMPILE_DEFINITIONS "${COMPILE_DEFINITIONS} -w")
add_definitions (${COMPILE_DEFINITIONS})
......@@ -50,7 +50,7 @@ Description: Use Debian packaged hdf5
# include other smaller libraries (json, Boophf)
add_custom_target (thirdparty_copy ALL)
@@ -63,7 +48,5 @@
@@ -63,7 +48,5 @@ add_custom_command (TARGET thirdparty_co
# INSTALL
################################################################################
IF (NOT DEFINED GATB_CORE_INSTALL_EXCLUDE)
......@@ -60,7 +60,7 @@ Description: Use Debian packaged hdf5
ENDIF ()
--- a/gatb-core/CMakeLists.txt
+++ b/gatb-core/CMakeLists.txt
@@ -99,7 +99,7 @@
@@ -99,7 +99,7 @@ endif()
# GENERAL DEFINITIONS
################################################################################
set (LIBRARY_COMPILE_DEFINITIONS "-std=c++11")
......@@ -69,7 +69,7 @@ Description: Use Debian packaged hdf5
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set (debug 1)
@@ -211,16 +211,23 @@
@@ -211,16 +211,23 @@ set (gatb-core-flags ${LIBRARY_COMPILE_D
set (gatb-core-includes ${PROJECT_BINARY_DIR}/include ${PROJECT_BINARY_DIR}/include/${CMAKE_BUILD_TYPE} ${PROJECT_SOURCE_DIR}/src ${PROJECT_SOURCE_DIR}/thirdparty ${gatb-core-extra-libraries-inc})
# We define the libraries used for linking binary based on gatb core
......@@ -99,7 +99,7 @@ Description: Use Debian packaged hdf5
################################################################################
# LIBRARY GENERATION
@@ -253,11 +260,13 @@
@@ -253,11 +260,13 @@ ENDIF()
################################################################################
ADD_SUBDIRECTORY(thirdparty)
......@@ -118,7 +118,7 @@ Description: Use Debian packaged hdf5
################################################################################
# DOCUMENTATION GENERATION
@@ -285,7 +294,7 @@
@@ -288,7 +297,7 @@ IF (NOT DEFINED GATB_CORE_INSTALL_EXCLUD
INSTALL (FILES ${PROJECT_SOURCE_DIR}/doc/misc/README.txt DESTINATION . OPTIONAL)
INSTALL (FILES ${PROJECT_SOURCE_DIR}/LICENCE DESTINATION . OPTIONAL)
INSTALL (FILES ${PROJECT_SOURCE_DIR}/THIRDPARTIES.md DESTINATION . OPTIONAL)
......
......@@ -16,7 +16,6 @@ override_dh_auto_build-indep:
echo "Save time of autobuilders and do nothing ... unfortunately this does not seem to work"
override_dh_install-arch:
dh_install -a
d-shlibmove --commit \
--multiarch \
--devunversioned \
......@@ -25,6 +24,7 @@ override_dh_install-arch:
--movedev gatb-core/cmake usr/lib \
debian/tmp/usr/lib/*/*.so
mkdir -p debian/$(DEB_SOURCE)/usr/lib/$(DEB_SOURCE)
dh_install -a
override_dh_install-indep:
dh_install -i
......
CMakeLists.txt.user
/build*
/.settings/
/.cproject
*.leon
.DS_Store
......@@ -274,8 +274,11 @@ IF (EXISTS "${PROJECT_SOURCE_DIR}/examples")
ADD_SUBDIRECTORY(examples)
ENDIF()
ENDIF()
IF (NOT DEFINED GATB_CORE_EXCLUDE_EXAMPLES)
# add example snippets into binary archive (use by CPack directive)
INSTALL(DIRECTORY "${PROJECT_SOURCE_DIR}/examples/" DESTINATION "examples")
ENDIF()
################################################################################
# INSTALL
......
/main.aux
/main.log
/main.pdf
......@@ -92,6 +92,10 @@ public:
* \return estimation of the number of sequences of sub bank i */
virtual int64_t estimateNbItemsBanki (int i) = 0;
/** Return the vector of sub IBank objects (in case of bank composite), or a vector containing only the bank itself
* \return the IBank objects. */
virtual const std::vector<IBank*> getBanks() const = 0;
/** \copydoc tools::collections::Iterable::iterator */
virtual tools::dp::Iterator<Sequence>* iterator () = 0;
......