Changeset 3295
- Timestamp:
- Jul 25, 2014, 6:24:39 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/0.11-stable merged: 3233 /branches/0.12-stable (added) merged: 3218,3221-3222,3234-3235,3260-3265,3271-3272,3275,3284,3291-3293
- Property svn:mergeinfo changed
-
trunk/NEWS
r3276 r3295 13 13 yat 0.12.x series from http://dev.thep.lu.se/yat/svn/branches/0.12-stable 14 14 15 version 0.12 (released NOT YET) 15 version 0.12 (released 25 July 2014) 16 - BamRead::cigar(const std::vector<uint32_t>&) is deprecated 16 17 - Aligner(double, double) is now explicit (see r3207) 17 18 - GetlineIterator(istream&, char) is now explicit (see r3148) 19 - rename(2) and remove(1) are now implemented (bug #804) 18 20 19 21 A complete list of closed tickets can be found here [[br]] -
trunk/configure.ac
r3250 r3295 10 10 # Copyright (C) 2010, 2011 Peter Johansson 11 11 # Copyright (C) 2012 Jari Häkkinen, Peter Johansson 12 # Copyright (C) 2013, 2014 Peter Johansson 12 # Copyright (C) 2013 Peter Johansson 13 # Copyright (C) 2014 Jari Häkkinen, Peter Johansson 13 14 # 14 15 # This file is part of the yat library, http://dev.thep.lu.se/yat … … 460 461 ]) 461 462 463 # When compiling boost::Mutable_*Iterator some versions of clang complains: 464 # warning: unsequenced modification and access to 'i' [-Wunsequenced] 465 # Test if compiler gives that warning, and if it does turn it off. 466 yat_save_CXXFLAGS=$CXXFLAGS 467 AC_MSG_CHECKING([whether 'boost/concept_check.hpp' causes compiler warnings]) 468 CXXFLAGS="$INTERNAL_CXXFLAGS $CXXFLAGS" 469 AC_COMPILE_IFELSE([AC_LANG_PROGRAM( 470 [ 471 @%:@include <boost/concept_check.hpp> 472 ],[ 473 BOOST_CONCEPT_ASSERT((boost::Mutable_RandomAccessIterator<double* >)); 474 ]) 475 ], [ # IF-SUCCESSFUL 476 AC_MSG_RESULT([no]) 477 # restore CXXFLAGS 478 CXXFLAGS=$yat_save_CXXFLAGS 479 ], [ # IF-FAILED 480 AC_MSG_RESULT([yes]) 481 CXXFLAGS=$yat_save_CXXFLAGS 482 YAT_CXX_ADD_FLAG([CXXFLAGS], [-Wno-unsequenced]) 483 ]) 484 485 462 486 AS_IF([test x$enable_debug = xyes], [ 463 487 # some versions of boost uses long long - turn off compiler warnings -
trunk/doc/concepts.doxygen
r2504 r3295 2 2 // 3 3 // Copyright (C) 2008 Jari Häkkinen, Peter Johansson, Markus Ringnér 4 // Copyright (C) 2009, 2010, 2011 Peter Johansson4 // Copyright (C) 2009, 2010, 2011, 2014 Peter Johansson 5 5 // 6 6 // This file is part of the yat library, http://dev.thep.lu.se/yat … … 37 37 \page concept_container_2d Container2D 38 38 39 \section Description39 \section concept_container_2d_description Description 40 40 41 41 \ref concept_container_2d is a <a … … 46 46 row. 47 47 48 \section Requirements48 \section concept_container_2d_requirments Requirements 49 49 50 50 A \ref concept_container_2d provides the following: 51 51 52 \subsection Types52 \subsection concept_container_2d_types Types 53 53 54 54 <table cellspacing=0 border=1> … … 62 62 <tr> 63 63 <td>Const iterator type</td> 64 <td><tt>X::const_iterator</tt></td> 64 <td><tt>X::const_iterator</tt></td> 65 65 <td> 66 66 A read-only iterator that can be used to iterate over the entire \ref … … 72 72 <tr> 73 73 <td>Const column iterator type</td> 74 <td><tt>X::const_column_iterator</tt></td> 74 <td><tt>X::const_column_iterator</tt></td> 75 75 <td> 76 76 A read-only iterator that can be used to examine the elements in one … … 80 80 <tr> 81 81 <td>Const row iterator type</td> 82 <td><tt>X::const_row_iterator</tt></td> 82 <td><tt>X::const_row_iterator</tt></td> 83 83 <td> 84 84 A read-only iterator that can be used to examine the elements in one … … 88 88 </table> 89 89 90 \subsection public_functions Public Functions90 \subsection concept_container_2d_public_functions Public Functions 91 91 92 92 <table cellspacing=0 border=1> … … 154 154 <td>Element Access</td> 155 155 <td><tt>a(size_t row, size_t column)</tt></td> 156 <td><tt>0 <= row < a.rows()</tt> and 156 <td><tt>0 <= row < a.rows()</tt> and 157 157 <tt>0 <= column < a.columns()</tt></td> 158 158 <td><tt>const_reference</tt></td> … … 161 161 </table> 162 162 163 \section Implementations163 \section concept_container_2d_implementations Implementations 164 164 165 165 Examples of concept \ref concept_container_2d include: … … 173 173 \page concept_mutable_container_2d Mutable Container2D 174 174 175 \section Description175 \section concept_mutable_container_2d_description Description 176 176 177 177 \ref concept_mutable_container_2d is a \ref concept_container_2d that 178 178 also provides non-const access to its elements. 179 179 180 \section Requirements180 \section concept_mutable_container_2d_requirments Requirements 181 181 182 182 In addition to the requirements defined in \ref concept_container_2d, 183 183 a \ref concept_mutable_container_2d also provides the following: 184 184 185 \subsection Types185 \subsection concept_mutable_container_2d_types Types 186 186 187 187 <table cellspacing=0 border=1> … … 192 192 <tr> 193 193 <td>Iterator type</td> 194 <td><tt>X::iterator</tt></td> 194 <td><tt>X::iterator</tt></td> 195 195 <td> 196 196 … … 204 204 <tr> 205 205 <td>Column iterator type</td> 206 <td><tt>X::column_iterator</tt></td> 206 <td><tt>X::column_iterator</tt></td> 207 207 <td> 208 208 A mutable iterator that can be used to modify the elements in one … … 212 212 <tr> 213 213 <td>Row iterator type</td> 214 <td><tt>X::row_iterator</tt></td> 214 <td><tt>X::row_iterator</tt></td> 215 215 <td> 216 216 A mutable iterator that can be used to modify the elements in one … … 220 220 </table> 221 221 222 \subsection public_functions Public Functions222 \subsection concept_mutable_container_2d_public_functions Public Functions 223 223 224 224 <table cellspacing=0 border=1> … … 272 272 <td>Element Access</td> 273 273 <td><tt>a(size_t row, size_t column)</tt></td> 274 <td><tt>0 <= row < a.rows()</tt> and 274 <td><tt>0 <= row < a.rows()</tt> and 275 275 <tt>0 <= column < a.columns()</tt></td> 276 276 <td><tt>reference</tt></td> … … 279 279 </table> 280 280 281 \section Implementations281 \section concept_mutable_container_2d_implementations Implementations 282 282 283 283 Examples of concept \ref concept_mutable_container_2d include: … … 290 290 \page concept_distance Distance 291 291 292 \section Description292 \section concept_distance_description Description 293 293 294 294 \ref concept_distance is a concept for classes implementing different 295 295 alternatives to calculate the distance between two points. 296 296 297 \section Requirements297 \section concept_distance_requirments Requirements 298 298 299 299 Classes modelling the concept \ref concept_distance should have a copy 300 constructor 300 constructor 301 301 302 302 \verbatim … … 320 320 have both a value and a weight. The selection between unweighted and 321 321 weighted implementations should utilize 322 theplu::yat::utility::unweighted_iterator_tag and 322 theplu::yat::utility::unweighted_iterator_tag and 323 323 theplu::yat::utility::weighted_iterator_tag. Moreover 324 324 theplu::yat::utility::weighted_if_any2 should be utilized to provide a … … 326 326 unweighted implementation when both ranges are unweighted. 327 327 328 \section Implementations328 \section concept_distance_implementations Implementations 329 329 330 330 Examples of classes modelling the concept \ref concept_distance … … 339 339 \page concept_neighbor_weighting Neighbor Weighting Method 340 340 341 \section Description341 \section concept_neighbor_weighting_description Description 342 342 343 343 \ref concept_neighbor_weighting is a concept used in connection with … … 345 345 NeighborWeighting should implement this concept. 346 346 347 \section Requirements347 \section concept_neighbor_weighting_requirements Requirements 348 348 349 349 Classes modelling the concept \ref concept_neighbor_weighting should 350 be DefaultConstructible and Assignable as well as 350 be DefaultConstructible and Assignable as well as 351 351 implement the following public function: 352 353 \verbatim 354 void operator()(const utility::VectorBase& distance, 352 353 \verbatim 354 void operator()(const utility::VectorBase& distance, 355 355 const std::vector<size_t>& k_sorted, 356 const Target& target, 356 const Target& target, 357 357 utility::VectorMutable& prediction) const 358 358 \endverbatim … … 371 371 neighbors with distance infinity do not vote. 372 372 373 \section Implementations373 \section concept_neighbor_weighting_implementations Implementations 374 374 375 375 Examples of classes modelling the concept \ref … … 384 384 \page concept_weighted_iterator Weighted Iterator 385 385 386 \section Description386 \section concept_weighted_iterator_description Description 387 387 388 388 Most functionality in yat come in two versions: one optimized for … … 396 396 Access Iterator. 397 397 398 \section Requirements398 \section concept_weighted_iterator_requirements Requirements 399 399 400 400 When implementing a new iterator that may be a \ref … … 443 443 \page concept_data_iterator Data Iterator 444 444 445 \section Description446 447 \ref concept_data_iterator is an iterator that is either: 445 \section concept_data_iterator_description Description 446 447 \ref concept_data_iterator is an iterator that is either: 448 448 449 449 - a \ref concept_weighted_iterator with value type convertible to … … 451 451 - an unweighted iterator with value type convertible to \c double. 452 452 453 \section Implementations453 \section concept_data_iterator_implementations Implementations 454 454 455 455 Examples of concept \ref concept_data_iterator include: -
trunk/test/Suite.h
r3273 r3295 413 413 add(tmp==*iter); 414 414 TrivialIterator default_constructed; 415 d efault_constructed == default_constructed; // avoid compiler warning415 dummie_function(default_constructed); 416 416 } 417 417 -
trunk/test/bam.cc
r3201 r3295 24 24 #include "yat/omic/BamRead.h" 25 25 #endif 26 27 #include "yat/utility/Aligner.h" 26 28 27 29 #include <cassert> … … 54 56 suite.out() << "size: " << size << " " << bam.aux_size() << "\n"; 55 57 suite.add(bam.aux_size() == size+4); 58 bam.aux(); 56 59 bam.aux("ZZ"); 57 60 char c1 = bam_aux2A(bam.aux("ZZ")); … … 68 71 BamRead bam(b); 69 72 73 bam.cigar(); 74 bam.cigar(0); 75 bam.cigar_op(0); 76 bam.cigar_oplen(0); 77 70 78 suite.out() << "test cigar:\n"; 71 79 suite.out() << bam.cigar_str() << "\n"; 72 80 OutBamFile os("cigar_test.bam", hdr); 73 std::vector<uint32_t>cig;81 utility::Aligner::Cigar cig; 74 82 75 83 bam.cigar(cig); … … 78 86 os.write(bam); 79 87 80 cig.resize(1); 81 cig[0] = bam_cigar_gen(bam.sequence_length(), BAM_CMATCH); 88 cig.push_back(BAM_CMATCH, bam.sequence_length()); 82 89 bam.cigar(cig); 83 90 suite.out() << bam.cigar_str() << "\n"; … … 85 92 os.write(bam); 86 93 87 cig. resize(3);88 cig [0] = bam_cigar_gen(50, BAM_CMATCH);89 cig [1] = bam_cigar_gen(2, BAM_CDEL);90 cig [2] = bam_cigar_gen(50, BAM_CMATCH);94 cig.clear(); 95 cig.push_back(BAM_CMATCH, 50); 96 cig.push_back(BAM_CDEL, 2); 97 cig.push_back(BAM_CMATCH, 50); 91 98 bam.cigar(cig); 92 99 suite.out() << bam.cigar_str() << "\n"; … … 132 139 133 140 // just for consistency 134 std::vector<uint32_t>cig;141 utility::Aligner::Cigar cig; 135 142 bam.cigar(cig); 136 143 bam.core().flag &= ~BAM_FUNMAP; … … 226 233 BamRead bam; 227 234 in.read(bam); 235 // test that functions are implemented 236 bam.end(); 237 bam.flag(); 238 bam.mpos(); 239 bam.mtid(); 240 bam.pos(); 241 bam.tid(); 242 bam.swap(bam); 228 243 std::string str = "AGCTTTGTTATTATTTGAGGGTGTGGTTCAGTTGTAAACAGTGTATG" 229 244 "TTTTAGAATTTGTGTTATTGTGATGGCGATGACCAAGTACAACATATTTCCCA"; -
trunk/test/bam_pair_analyse.cc
r3210 r3295 18 18 #include <config.h> 19 19 20 #include "Suite.h"21 22 using namespace theplu::yat;23 24 20 #if YAT_HAVE_LIBBAM 25 21 #include "yat/omic/algorithm.h" … … 27 23 #include "yat/omic/BamReadIterator.h" 28 24 #endif 25 26 // include Suite.h late to see that algorithm.h is OK to include 27 // first. See ticket #793. 28 #include "Suite.h" 29 using namespace theplu::yat; 29 30 30 31 void test1(test::Suite& suite); -
trunk/test/bam_pair_iterator.cc
r3209 r3295 18 18 #include <config.h> 19 19 20 #include "Suite.h"21 22 20 #ifdef YAT_HAVE_LIBBAM 23 21 #include "yat/omic/BamFile.h" … … 31 29 #include <cassert> 32 30 #include <string> 31 32 // include Suite.h late to expose bug #797 33 #include "Suite.h" 33 34 34 35 using namespace theplu::yat; -
trunk/test/utility.cc
r3287 r3295 59 59 void test_fnmatch(test::Suite& suite); 60 60 bool test_fnmatch(bool, std::string, std::string); 61 void test_remove(test::Suite& suite); 62 void test_rename(test::Suite& suite); 61 63 void test_replace(test::Suite& suite); 62 64 … … 221 223 test_dirname(suite); 222 224 test_fnmatch(suite); 225 test_remove(suite); 226 test_rename(suite); 223 227 test_replace(suite); 224 228 … … 725 729 726 730 731 void test_remove(test::Suite& suite) 732 { 733 // at least test linking 734 if (false) 735 utility::remove("foo"); 736 } 737 738 739 void test_rename(test::Suite& suite) 740 { 741 // at least test linking 742 if (false) 743 utility::rename("foo", "bar"); 744 } 745 746 727 747 void test_replace(test::Suite& suite) 728 748 { -
trunk/yat/classifier/DataLookupWeighted1D.h
r2119 r3295 7 7 Copyright (C) 2006 Jari Häkkinen, Peter Johansson 8 8 Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson, Markus Ringnér 9 Copyright (C) 2009 Peter Johansson9 Copyright (C) 2009, 2014 Peter Johansson 10 10 11 11 This file is part of the yat library, http://dev.thep.lu.se/yat -
trunk/yat/classifier/KernelLookup.h
r2919 r3295 8 8 Copyright (C) 2006 Jari Häkkinen, Peter Johansson, Markus Ringnér 9 9 Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson 10 Copyright (C) 2010, 2012 Peter Johansson10 Copyright (C) 2010, 2012, 2014 Peter Johansson 11 11 12 12 This file is part of the yat library, http://dev.thep.lu.se/yat -
trunk/yat/classifier/MatrixLookup.h
r2863 r3295 8 8 Copyright (C) 2006 Jari Häkkinen, Peter Johansson, Markus Ringnér 9 9 Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson 10 Copyright (C) 2009, 2010, 2012 Peter Johansson10 Copyright (C) 2009, 2010, 2012, 2014 Peter Johansson 11 11 12 12 This file is part of the yat library, http://dev.thep.lu.se/yat -
trunk/yat/classifier/MatrixLookupWeighted.h
r2862 r3295 7 7 Copyright (C) 2006 Jari Häkkinen, Peter Johansson, Markus Ringnér 8 8 Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson 9 Copyright (C) 2009, 2010, 2012 Peter Johansson9 Copyright (C) 2009, 2010, 2012, 2014 Peter Johansson 10 10 11 11 This file is part of the yat library, http://dev.thep.lu.se/yat -
trunk/yat/normalizer/RowNormalizer.h
r2992 r3295 1 1 #ifndef _theplu_yat_normalizer_row_normalizer_ 2 #define _theplu_yat_normalizer_row s_normalizer_2 #define _theplu_yat_normalizer_row_normalizer_ 3 3 4 4 // $Id$ … … 6 6 /* 7 7 Copyright (C) 2008 Jari Häkkinen, Peter Johansson 8 Copyright (C) 2009, 2010 Peter Johansson8 Copyright (C) 2009, 2010, 2014 Peter Johansson 9 9 10 10 This file is part of the yat library, http://dev.thep.lu.se/yat -
trunk/yat/omic/BamPairIterator.h
r3199 r3295 30 30 31 31 #include <boost/concept/assert.hpp> 32 #include <boost/iterator/iterator_concepts.hpp> 32 33 #include <boost/iterator/iterator_facade.hpp> 33 34 #include <boost/shared_ptr.hpp> … … 157 158 BOOST_CONCEPT_ASSERT((boost::InputIterator<Base>)); 158 159 using boost::Convertible; 159 typedef typename std::iterator_traits<Base>:: reference reference_type;160 BOOST_CONCEPT_ASSERT((Convertible< reference_type, BamRead>));160 typedef typename std::iterator_traits<Base>::value_type value_type; 161 BOOST_CONCEPT_ASSERT((Convertible<value_type, BamRead>)); 161 162 find_next(); 162 163 } … … 168 169 BOOST_CONCEPT_ASSERT((boost::InputIterator<Base>)); 169 170 using boost::Convertible; 170 typedef typename std::iterator_traits<Base>:: reference reference_type;171 BOOST_CONCEPT_ASSERT((Convertible< reference_type, BamRead>));171 typedef typename std::iterator_traits<Base>::value_type value_type; 172 BOOST_CONCEPT_ASSERT((Convertible<value_type, BamRead>)); 172 173 } 173 174 -
trunk/yat/omic/BamRead.cc
r3210 r3295 149 149 150 150 void BamRead::cigar(const std::vector<uint32_t>& c) 151 { 152 // use the new function cigar(1) to implement this old deprecated variant 153 utility::Aligner::Cigar cig; 154 for (size_t i=0; i<c.size(); ++i) 155 cig.push_back(bam_cigar_op(c[i]), bam_cigar_oplen(c[i])); 156 cigar(cig); 157 } 158 159 160 void BamRead::cigar(const utility::Aligner::Cigar& c) 151 161 { 152 162 int offset = 4*c.size() - 4*core().n_cigar; … … 161 171 162 172 // copy new cigar 163 if (c.size())164 // each cigar element is 4 bytes165 memcpy(bam1_cigar(bam_), &c[0], 4*c.size()); 173 for (size_t i=0; i<c.size(); ++i) 174 bam1_cigar(bam_)[i] = c[i]; 175 166 176 bam_->data_len += offset; 167 177 core().n_cigar = c.size(); … … 177 187 { return bam_->core; } 178 188 189 190 uint16_t BamRead::flag(void) const 191 { 192 return bam_->core.flag; 193 } 179 194 180 195 const char* BamRead::name(void) const -
trunk/yat/omic/BamRead.h
r3212 r3295 27 27 #include YAT_SAM_HEADER 28 28 29 #include "yat/utility/Aligner.h" 29 30 // This file has to be included to keep compatibility with yat 0.11 30 #include <yat/utility/Cigar.h> 31 #include "yat/utility/Cigar.h" 32 #include "yat/utility/deprecate.h" 31 33 32 34 #include <functional> … … 171 173 172 174 \param c new cigar 175 176 \deprecated Provided for backward compatibility with 0.11 177 API. Use cigar(const utility::Aligner::Cigar&) instead. 173 178 */ 174 void cigar(const std::vector<uint32_t>& c); 179 void cigar(const std::vector<uint32_t>& c) YAT_DEPRECATE; 180 181 /** 182 \brief set CIGAR 183 184 \param cigar new cigar 185 186 \since new in yat 0.12 187 */ 188 void cigar(const utility::Aligner::Cigar& cigar); 189 190 /** 191 \brief rightmost coordinate 192 193 Coordinate is 0-based, i.e., the end is one passed the last 194 matching position. 195 196 \see bam_calend 197 */ 198 int32_t end(void) const; 199 200 /** 201 \brief bitwise flag 202 203 \see Preprocessor defines BAM_F* 204 205 \since implemented since yat 0.12 206 */ 207 uint16_t flag(void) const; 208 209 /** 210 \brief leftmost position for mate 211 */ 212 int32_t mpos(void) const; 213 214 /** 215 \brief Chromosome ID for mate 216 */ 217 int32_t mtid(void) const; 218 219 /** 220 \return query name 221 222 Length of array is described by core().l_qname 223 */ 224 const char* name(void) const; 225 226 /** 227 \brief modify name 228 229 \since New in yat 0.11 230 */ 231 void name(const std::string& n); 232 233 /** 234 \brief 0-based laftmost coordinate 235 */ 236 int32_t pos(void) const; 175 237 176 238 /** … … 190 252 191 253 /** 192 \return query name 193 194 Length of array is described by core().l_qname 195 */ 196 const char* name(void) const; 197 198 /** 199 \brief modify name 200 201 \since New in yat 0.11 202 */ 203 void name(const std::string& n); 254 Each character in returned sequence is either A, C, G, T, or N. 255 256 \return sequence 257 */ 258 std::string sequence(void) const; 259 260 /** 261 4-bit integer describing base \a index 262 263 \see bam_nt16_rev_table 264 */ 265 uint8_t sequence(size_t index) const; 266 267 /** 268 \brief modify a base in sequence 269 270 Set i-th base in sequence to \a x, where seq is a 4-bit integer. 271 272 \see bam_nt16_table 273 274 \since New in yat 0.11 275 */ 276 void sequence(size_t i, uint8_t x); 277 278 /** 279 \brief set sequence and quality 280 281 \since New in yat 0.11 282 */ 283 void sequence(const std::string& seq, const std::vector<uint8_t>& qual); 284 285 /** 286 \see core().l_qseq 287 */ 288 uint32_t sequence_length(void) const; 289 290 /** 291 Exchanging this read with \a other. 292 293 \see swap(BamRead&, BamRead&) 294 */ 295 void swap(BamRead& other); 204 296 205 297 /** … … 207 299 */ 208 300 int32_t tid(void) const; 209 210 /**211 \brief 0-based laftmost coordinate212 */213 int32_t pos(void) const;214 215 /**216 \brief rightmost coordinate217 218 Coordinate is 0-based, i.e., the end is one passed the last219 matching position.220 221 \see bam_calend222 */223 int32_t end(void) const;224 225 /**226 \brief Chromosome ID for mate227 */228 int32_t mtid(void) const;229 230 /**231 \brief leftmost position for mate232 */233 int32_t mpos(void) const;234 235 /**236 Each character in returned sequence is either A, C, G, T, or N.237 238 \return sequence239 */240 std::string sequence(void) const;241 242 /**243 4-bit integer describing base \a index244 245 \see bam_nt16_rev_table246 */247 uint8_t sequence(size_t index) const;248 249 /**250 \brief modify a base in sequence251 252 Set i-th base in sequence to \a x, where seq is a 4-bit integer.253 254 \see bam_nt16_table255 256 \since New in yat 0.11257 */258 void sequence(size_t i, uint8_t x);259 260 /**261 \brief set sequence and quality262 263 \since New in yat 0.11264 */265 void sequence(const std::string& seq, const std::vector<uint8_t>& qual);266 267 /**268 \see core().l_qseq269 */270 uint32_t sequence_length(void) const;271 272 /**273 \brief bitwise flag274 275 \see Preprocessor defines BAM_F*276 */277 uint16_t flag(void) const;278 279 /**280 Exchanging this read with \a other.281 282 \see swap(BamRead&, BamRead&)283 */284 void swap(BamRead& other);285 301 286 302 private: -
trunk/yat/omic/algorithm.h
r3210 r3295 24 24 25 25 #include "BamPairIterator.h" 26 #include "BamRead.h"27 #include "GenomicPosition.h"28 29 #include <boost/concept/assert.hpp>30 31 #include <iterator>32 #include <map>33 #include <string>34 #include <utility>35 26 36 27 namespace theplu { -
trunk/yat/statistics/KolmogorovSmirnov.h
r3018 r3295 214 214 { 215 215 BOOST_CONCEPT_ASSERT((boost::ForwardIterator<ForwardIterator>)); 216 typedef typename std::iterator_traits<ForwardIterator>::reference ref;217 BOOST_CONCEPT_ASSERT((boost::Convertible<ref, KolmogorovSmirnov::Element>));218 216 ForwardIterator iter(first); 219 217 typename data_w::const_iterator hint(data_.begin()); -
trunk/yat/utility/Aligner.cc
r3213 r3295 2 2 3 3 /* 4 Copyright (C) 2012, 2014 Peter Johansson 4 Copyright (C) 2012 Peter Johansson 5 Copyright (C) 2014 Jari Häkkinen, Peter Johansson 5 6 6 7 This file is part of the yat library, http://dev.thep.lu.se/yat … … 28 29 #include <cassert> 29 30 #include <limits> 31 #include <ostream> 30 32 31 33 namespace theplu { -
trunk/yat/utility/Container2DIterator.h
r2384 r3295 76 76 { 77 77 BOOST_CONCEPT_ASSERT((Container2D<Container>)); 78 BOOST_CONCEPT_ASSERT((boost::Convertible<reference,value>));79 78 }; 80 79 … … 90 89 { 91 90 BOOST_CONCEPT_ASSERT((Container2D<Container>)); 92 BOOST_CONCEPT_ASSERT((boost::Convertible<reference,value>));93 91 } 94 92 -
trunk/yat/utility/DataWeightProxy.h
r2992 r3295 65 65 // DataIterator::value must be convertible to double 66 66 BOOST_CONCEPT_ASSERT((Convertible<data_type, double>)); 67 // this is for function data(void) const68 BOOST_CONCEPT_ASSERT((Convertible<data_reference, const double&>));69 67 70 68 // same check for WeightIterator 71 69 BOOST_CONCEPT_ASSERT((Convertible<weight_type, double>)); 72 BOOST_CONCEPT_ASSERT((Convertible<weight_reference, const double&>));73 70 } 74 71 … … 85 82 typename std::iterator_traits<DataIterator>::reference data(void) 86 83 { 87 BOOST_CONCEPT_ASSERT((boost::Convertible<data_reference, double>));88 84 return *data_; 89 85 } … … 106 102 typename std::iterator_traits<WeightIterator>::reference weight(void) 107 103 { 108 BOOST_CONCEPT_ASSERT((boost::Convertible<weight_reference, double>));109 104 return *weight_; 110 105 } -
trunk/yat/utility/GetlineIterator.cc
r2919 r3295 3 3 /* 4 4 Copyright (C) 2009, 2012 Peter Johansson 5 Copyright (C) 2014 Jari Häkkinen 5 6 6 7 This file is part of the yat library, http://dev.thep.lu.se/yat … … 25 26 #include "GetlineIterator.h" 26 27 28 #include <istream> 27 29 #include <string> 28 30 -
trunk/yat/utility/deprecate.h
r2124 r3295 1 1 #ifndef _theplu_yat_utility_deprecate_ 2 #define _theplu_yat_utility_deprecate_ 2 #define _theplu_yat_utility_deprecate_ 3 3 4 4 // $Id$ 5 5 6 6 /* 7 Copyright (C) 2008, 2009 Peter Johansson7 Copyright (C) 2008, 2009, 2014 Peter Johansson 8 8 9 9 This file is part of the yat library, http://dev.thep.lu.se/yat -
trunk/yat/utility/stl_utility.h
r3286 r3295 181 181 : f_(f), g_(g), h_(h) 182 182 { 183 BOOST_CONCEPT_ASSERT((boost::Convertible<typename G::result_type184 , typename F::first_argument_type>));185 BOOST_CONCEPT_ASSERT((boost::Convertible<typename H::result_type186 , typename F::second_argument_type>));187 188 183 } 189 184 … … 258 253 : f_(f), g_(g) 259 254 { 260 BOOST_CONCEPT_ASSERT((boost::Convertible<typename G::result_type261 , typename F::argument_type>));262 255 } 263 256 … … 334 327 : f_(f), g_(g) 335 328 { 336 BOOST_CONCEPT_ASSERT((boost::Convertible<typename G::result_type337 , typename F::argument_type>));338 329 } 339 330 … … 412 403 : f_(f), g_(g), h_(h) 413 404 { 414 BOOST_CONCEPT_ASSERT((boost::Convertible<typename G::result_type415 , typename F::first_argument_type>));416 BOOST_CONCEPT_ASSERT((boost::Convertible<typename H::result_type417 , typename F::second_argument_type>));418 405 } 419 406 -
trunk/yat/utility/utility.cc
r3114 r3295 4 4 Copyright (C) 2005, 2006 Jari Häkkinen, Markus Ringnér 5 5 Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson 6 Copyright (C) 2010, 2012, 2013 Peter Johansson6 Copyright (C) 2010, 2012, 2013, 2014 Peter Johansson 7 7 8 8 This file is part of the yat library, http://dev.thep.lu.se/yat … … 183 183 mkdir_p(dirname(dir), mode); 184 184 mkdir(dir, mode); 185 } 186 187 188 void remove(const std::string& fn) 189 { 190 if (::remove(fn.c_str())) { 191 std::string msg("remove: "); 192 msg += fn; 193 throw errno_error(msg); 194 } 195 } 196 197 198 void rename(const std::string& from, const std::string& to) 199 { 200 if (::rename(from.c_str(), to.c_str())) { 201 std::stringstream ss; 202 ss << "rename" << from << " to " << to << ": "; 203 throw errno_error(ss.str()); 204 } 185 205 } 186 206 -
trunk/yat/utility/utility.h
r3288 r3295 306 306 \see http://linux.die.net/man/3/remove 307 307 308 \since New in yat 0.1 0308 \since New in yat 0.12 309 309 */ 310 310 void remove(const std::string& fn); … … 316 316 \see http://linux.die.net/man/3/rename 317 317 318 \since New in yat 0.1 0318 \since New in yat 0.12 319 319 */ 320 320 void rename(const std::string& from, const std::string to); … … 420 420 /// \endcond 421 421 422 423 No error if \a dir already exist. Make parent directories as needed. 424 425 \since New in yat 0.10 426 */ 427 void mkdir_p(const std::string& dir, mode_t mode=0777); 428 429 /** 430 same as C function remove but throws errno_error at failure 431 432 \see http://linux.die.net/man/3/remove 433 434 \since New in yat 0.12 435 */ 436 void remove(const std::string& fn); 437 438 /** 439 same as C function with same name but throws errno_error if error 440 is encountered 441 442 \see http://linux.die.net/man/3/rename 443 444 \since New in yat 0.12 445 */ 446 void rename(const std::string& from, const std::string& to); 447 448 /** 449 In \a full_str replace every sub-string \a old_str with \a 450 new_str; 451 452 \since New in yat 0.10 453 */ 454 void replace(std::string& full_str, std::string old_str, std::string new_str); 422 455 423 456 // template implementations
Note: See TracChangeset
for help on using the changeset viewer.