Skip to content

Commit 06e6b61

Browse files
author
Jochen Singer
committed
[FIX] Fixed minor issues.
1 parent a771381 commit 06e6b61

8 files changed

Lines changed: 28 additions & 90 deletions

File tree

core/include/seqan/arg_parse/arg_parse_exceptions.h

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,8 @@ namespace seqan {
4545
// Class ParseError
4646
// ----------------------------------------------------------------------------
4747

48-
// TODO(singer): Remove this once all test are running.
49-
/*
50-
.Internal.Class.ParseError
51-
..cat:Miscellaneous
52-
..summary:General ParseError.
53-
*/
54-
55-
/*class ParseError : public RuntimeError
56-
{
57-
public:
58-
ParseError(std::string const & option) :
59-
RuntimeError(option)
60-
{}
61-
};
62-
*/
48+
// Defined in core/include/seqan/stream/tokenization.h
49+
struct ParseError;
6350

6451
// ----------------------------------------------------------------------------
6552
// Class InvalidOption

core/include/seqan/stream/chunking.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,22 +155,22 @@ inline void advanceChunk(String<TValue, TSpec> &str, TSize size)
155155
// StreamBuffer
156156
template <typename TValue, typename TTraits>
157157
inline typename Chunk<StreamBuffer<TValue, TTraits> >::Type
158-
getChunk(StreamBuffer<TValue, TTraits> &buf, Input)
158+
getChunk(StreamBuffer<TValue, TTraits> &buf, Input)
159159
{
160160
return toRange(buf.gptr(), buf.egptr());
161161
}
162162

163163
template <typename TValue, typename TTraits>
164164
inline typename Chunk<StreamBuffer<TValue, TTraits> >::Type
165-
getChunk(StreamBuffer<TValue, TTraits> &buf, Output)
165+
getChunk(StreamBuffer<TValue, TTraits> &buf, Output)
166166
{
167167
return toRange(buf.pptr(), buf.epptr());
168168
}
169169

170170
// StreamIterator
171171
template <typename TStream, typename TDirection>
172172
inline typename Chunk<Iter<TStream, StreamIterator<Tag<TDirection> > > >::Type
173-
getChunk(Iter<TStream, StreamIterator<Tag<TDirection> > > &iter, Tag<TDirection>)
173+
getChunk(Iter<TStream, StreamIterator<Tag<TDirection> > > &iter, Tag<TDirection>)
174174
{
175175
typedef typename Iter<TStream, StreamIterator<Input> >::TStreamBuffer TStreamBuffer;
176176
SEQAN_ASSERT(iter.streamBuf != NULL);

core/include/seqan/stream/stream_base.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ namespace seqan {
8080
..remarks:This flag is normally set from the outside by your build system using compiler flags.
8181
*/
8282

83+
// TODO(singer): remove this
8384
//#if SEQAN_HAS_ZLIB
8485
struct GZFile_;
8586
typedef Tag<GZFile_> GZFile;

core/include/seqan/stream/tokenization.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,6 @@ inline void readUntil(TTarget &target, TFwdIterator &iter, TStopFunctor &stopFun
356356
// Function readOne()
357357
// ----------------------------------------------------------------------------
358358

359-
//TODO(singer): implement a chunked version!
360-
361359
template <typename TTarget, typename TFwdIterator, typename TFunctor>
362360
inline void readOne(TTarget & target, TFwdIterator &iter, TFunctor &functor)
363361
{

core/include/seqan/stream/virtual_stream.h

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,20 +57,21 @@ namespace seqan {
5757
// TagList CompressedFileTypes
5858
// --------------------------------------------------------------------------
5959

60+
6061
typedef
61-
//#if SEQAN_HAS_ZLIB
62+
#if SEQAN_HAS_ZLIB
6263
TagList<GZFile,
63-
//#endif
64-
//#if SEQAN_HAS_BZIP2
64+
#endif
65+
#if SEQAN_HAS_BZIP2
6566
TagList<BZ2File,
66-
//#endif
67+
#endif
6768
TagList<Nothing>
68-
//#if SEQAN_HAS_BZIP2
69+
#if SEQAN_HAS_BZIP2
6970
>
70-
//#endif
71-
//#if SEQAN_HAS_ZLIB
71+
#endif
72+
#if SEQAN_HAS_ZLIB
7273
>
73-
//#endif
74+
#endif
7475
CompressedFileTypes; // if TagSelector is set to -1, the file format is auto-detected
7576

7677
// ============================================================================
@@ -139,7 +140,6 @@ unsigned char const MagicHeader<Fastq, T>::VALUE[1] = { '@' }; // Fastq's first
139140
// --------------------------------------------------------------------------
140141

141142
// TODO(weese:) rename FileFormatExtensions to FileTypeExtensions or FileExtensions
142-
#if SEQAN_HAS_ZLIB
143143
template <typename T>
144144
struct FileFormatExtensions<GZFile, T>
145145
{
@@ -151,12 +151,10 @@ char const * FileFormatExtensions<GZFile, T>::VALUE[3] = {
151151
".gz", // default output extension
152152
".Z",
153153
".zip" };
154-
#endif
155154

156155
template <typename TTag, typename T>
157156
struct FileFormatExtensions;
158157

159-
#if SEQAN_HAS_BZIP2
160158
template <typename T>
161159
struct FileFormatExtensions<BZ2File, T>
162160
{
@@ -167,7 +165,6 @@ template <typename T>
167165
char const * FileFormatExtensions<BZ2File, T>::VALUE[2] = {
168166
".bz2", // default output extension
169167
".bz" };
170-
#endif
171168

172169
template <typename T>
173170
struct FileFormatExtensions<Nothing, T>

core/include/seqan/stream/zipstream/zutil.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ void zcfree OF((voidpf opaque, voidpf ptr));
220220
#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
221221

222222
#ifdef local
223-
# undef local
223+
#undef local
224224
#endif
225225

226226
#endif /* _Z_UTIL_H */

core/include/seqan/ucsc_io.h

Lines changed: 5 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -31,50 +31,14 @@
3131
// ==========================================================================
3232
// Author: Manuel Holtgrewe <manuel.holtgrewe@fu-berlin.de>
3333
// ==========================================================================
34-
// Define SeqAn version.
34+
// Facade header for module ucsc_io.
3535
// ==========================================================================
3636

37+
#ifndef CORE_INCLUDE_SEQAN_UCSC_IO_H_
38+
#define CORE_INCLUDE_SEQAN_UCSC_IO_H_
39+
3740
#include <seqan/ucsc_io/ucsc_record.h>
3841
#include <seqan/ucsc_io/ucsc_io.h>
3942

40-
#ifndef SEQAN_VERSION_H_
41-
#define SEQAN_VERSION_H_
42-
43-
/**
44-
.Macro.SEQAN_VERSION_MAJOR
45-
..cat:Versioning
46-
..summary:Major SeqAn revision number.
47-
..signature:SEQAN_VERSION_MAJOR
48-
..example:For SeqAn version "1.3", this value is $1$, for "2.5.4", it is $2$.
49-
..include:seqan/version.h
50-
51-
.Macro.SEQAN_VERSION_MINOR
52-
..cat:Versioning
53-
..summary:Minor SeqAn revision number.
54-
..signature:SEQAN_VERSION_MINOR
55-
..example:For SeqAn version "1.3", this value is $3$, for "1.5.4", it is $5$.
56-
..include:seqan/version.h
57-
58-
.Macro.SEQAN_VERSION_PATCH
59-
..cat:Versioning
60-
..summary:SeqAn patch revision number.
61-
..signature:SEQAN_VERSION_PATCH
62-
..example:For SeqAn version "1.3", this value is $0$, for "1.3.4", it is $4$.
63-
..include:seqan/version.h
64-
65-
.Macro.SEQAN_VERSION_PRE_RELEASE
66-
..cat:Versioning
67-
..summary:Flag ($0$/$1$) to indicate whether this is a pre-release (i.e. SVN version).
68-
..signature:SEQAN_VERSION_PRE_RELEASE
69-
..include:seqan/version.h
70-
*/
71-
72-
#define SEQAN_VERSION_MAJOR 1
73-
74-
#define SEQAN_VERSION_MINOR 5
75-
76-
#define SEQAN_VERSION_PATCH 0
77-
78-
#define SEQAN_VERSION_PRE_RELEASE 1
43+
#endif // CORE_INCLUDE_SEQAN_UCSC_IO_H_
7944

80-
#endif // SEQAN_VERSION_H_

extras/include/seqan/vcf_io/read_vcf.h

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -361,16 +361,10 @@ readRecord(VcfRecord & record,
361361
skipOne(iter);
362362

363363
// INFO
364-
readUntil(record.info, iter, IsWhitespace());
365-
if (IsNewline()(value(iter)))
366-
{
367-
if (empty(record.info))
368-
throw ParseError("Unexpected end of record.");
369-
skipOne(iter);
364+
readUntil(record.info, iter, OrFunctor<IsTab, IsNewline>());
365+
char c = readOne(iter);
366+
if (IsNewline()(c))
370367
return;
371-
}
372-
else
373-
skipOne(iter);
374368

375369
// FORMAT
376370
readUntil(record.format, iter, NextEntry());
@@ -390,16 +384,13 @@ readRecord(VcfRecord & record,
390384
else
391385
break; // Done
392386
}
393-
if (IsNewline()(value(iter)))
394-
{
395-
skipOne(iter);
387+
388+
char c = readOne(iter);
389+
if (IsNewline()(c))
396390
return;
397-
}
398-
else
399-
skipOne(iter);
400391
}
401392

402-
// Skip empty lines, necessary for getting to EOF if there is an empty line at the ned of the file.
393+
// Skip empty lines, necessary for getting to EOF if there is an empty line at the end of the file.
403394
while (!atEnd(iter) && IsNewline()(value(iter)))
404395
skipOne(iter);
405396
}

0 commit comments

Comments
 (0)