summaryrefslogtreecommitdiff
blob: c3c3ec03248119c9dc0e51ed857607c190faba9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
Remove 'using namespace std' causing massive havoc with newly
introduced std::align in GCC-5. Fix bug
https://bugs.gentoo.org/show_bug.cgi?id=568438

--- vaal-46233/src/efasta/EfastaTools.cc
+++ vaal-46233/src/efasta/EfastaTools.cc
@@ -18,6 +18,8 @@
 #include "math/Functions.h"
 #include "math/Array.h"
 
+using std::set;
+
 #define Err(message)                                      \
 {    cout << message << endl << "\nInvalid.\n" << endl;   \
      TracebackThisProcess( );    }
--- vaal-46233/src/Equiv.cc
+++ vaal-46233/src/Equiv.cc
@@ -9,6 +9,8 @@
 #include "Equiv.h"
 #include "Vec.h"
 
+using std::swap;
+
 bool equivalence_relation::equiv(int a, int b) const
 {    if ( a == b ) return true;
      int c = a;
--- vaal-46233/src/FastaFilestream.cc
+++ vaal-46233/src/FastaFilestream.cc
@@ -13,6 +13,8 @@
 
 #include <strstream>
 
+using std::string;
+
 template <typename vecT, typename seqT, typename convT, typename verifT>
 FastaFilestream<vecT,seqT,convT,verifT>::FastaFilestream( const String& filename,
                                                           FastaNameParser* name_parser )
--- vaal-46233/src/FastaFilestreamPreview.cc
+++ vaal-46233/src/FastaFilestreamPreview.cc
@@ -11,6 +11,8 @@
 
 #include <algorithm>
 
+using std::streamoff;
+
 FastaFilestreamPreview::FastaFilestreamPreview(istream& filestream)
   : max_sequence_size_(0), start_offset_(0)
 {
--- vaal-46233/src/FastaFilestreamPreview.h
+++ vaal-46233/src/FastaFilestreamPreview.h
@@ -12,6 +12,8 @@
 
 #include "Vec.h"
 
+using std::streampos;
+
 // FastaFilestreamPreview understands just enough about the fasta
 // format to be able to count the number of sequences in the specified
 // filestream and to know where each sequence starts in that filestream.
--- vaal-46233/src/Fastavector.cc
+++ vaal-46233/src/Fastavector.cc
@@ -14,6 +14,8 @@
 #include <istream>
 #include <string>
 
+using std::max;
+
 // Split this into chunks, separated by gaps ('n'), and return each chunk as a
 // gapless fastavector.
 // TODO: generalize this into a templatized STL algorithm.
--- vaal-46233/src/Fastavector.h
+++ vaal-46233/src/Fastavector.h
@@ -24,6 +24,9 @@
 #include <iostream>
 #include <unistd.h>
 
+using std::string;
+using std::istringstream;
+
 typedef std::tuple<String, int, int> FastaRegion;
 
 class fastaindex {
--- vaal-46233/src/FetchReads.cc
+++ vaal-46233/src/FetchReads.cc
@@ -36,6 +36,8 @@
 #include "Qualvector.h"
 #include "random/Random.h"
 
+using std::istringstream;
+
 // Heuristic constants:
 
 namespace
--- vaal-46233/src/feudal/BaseVec.cc
+++ vaal-46233/src/feudal/BaseVec.cc
@@ -21,6 +21,7 @@
 using std::ostream;
 using std::cout;
 using std::endl;
+using std::max_element;
 
 // Cap: in a given basevector, replace any sequence of N > n identical
 // bases by n of the same base.
--- vaal-46233/src/graph/Digraph.cc
+++ vaal-46233/src/graph/Digraph.cc
@@ -16,6 +16,8 @@
 #include "graph/Digraph.h"
 #include "math/Functions.h"
 
+using std::make_pair;
+
 Bool digraph::HasEdge( int v, int w ) const {
   return find( from_[v].begin(),  from_[v].end(), w ) != from_[v].end();
 }
--- vaal-46233/src/graph/DigraphTemplate.h
+++ vaal-46233/src/graph/DigraphTemplate.h
@@ -34,6 +34,8 @@
 #include "graph/Digraph.h"
 #include <cstddef>
 
+using std::make_pair;
+
 template<class E> vec<int> digraphE<E>::EdgesConnectedTo( const vec<int>& v ) const
 {    vec<int> G = VerticesConnectedTo(v), e;
      for ( int x = 0; x < G.isize( ); x++ )
--- vaal-46233/src/IndexedAlignmentPlusVector.cc
+++ vaal-46233/src/IndexedAlignmentPlusVector.cc
@@ -9,6 +9,8 @@
 #include "IndexedAlignmentPlusVector.h"
 #include "VecAlignmentPlus.h"
 
+using std::streamoff;
+
 // These strings are at the head of the vector and index files for verification purposes.
 
 const String VecAlignmentPlusHeaderIO::mStrVectorHeader( "alignment_plus vector V.2\n" );
--- vaal-46233/src/IndexedAlignmentPlusVector.h
+++ vaal-46233/src/IndexedAlignmentPlusVector.h
@@ -15,6 +15,7 @@
 
 #include "Alignment.h"
 
+using std::streampos;
 
 // This class encapsulates the header information for both vectors and indices.
 
--- vaal-46233/src/kmers/kmer_parcels/KmerParcelsBuilder.cc
+++ vaal-46233/src/kmers/kmer_parcels/KmerParcelsBuilder.cc
@@ -10,6 +10,7 @@
 #include "kmers/KmerParcels.h"
 #include "system/WorklistN.h"
 
+using std::fixed;
 
 inline String Tag(String S = "KPs") { return Date() + " (" + S + "): "; } 
 
--- vaal-46233/src/kmers/kmer_parcels/KmerParcelsClasses.h
+++ vaal-46233/src/kmers/kmer_parcels/KmerParcelsClasses.h
@@ -6,6 +6,9 @@
 //   Institute is not responsible for its use, misuse, or functionality.     //
 ///////////////////////////////////////////////////////////////////////////////
 
+using std::hex;
+using std::dec;
+
 // ---------------------------------
 // NaifTimer
 // ---------------------------------
--- vaal-46233/src/kmers/kmer_parcels/KmerParcelsStatistics.h
+++ vaal-46233/src/kmers/kmer_parcels/KmerParcelsStatistics.h
@@ -10,7 +10,7 @@
 #ifndef KMERS__KMER_PARCELS__KMER_PARCELS_STATISTICS_H
 #define KMERS__KMER_PARCELS__KMER_PARCELS_STATISTICS_H
 
-
+using std::map;
 
 // --------------------------------------
 // MapOfCounters
--- vaal-46233/src/layout/ContigActualloc.h
+++ vaal-46233/src/layout/ContigActualloc.h
@@ -17,6 +17,8 @@
 #include "system/Crash.h"
 #include "Misc.h"
 
+using std::set;
+using std::map;
 
 //
 // Class contig_actualloc
--- vaal-46233/src/lookup/ImperfectLookup.h
+++ vaal-46233/src/lookup/ImperfectLookup.h
@@ -52,6 +52,8 @@
 #include "lookup/AlignCollector.h"
 #include "solid/Solid.h"
 
+using std::unique_ptr;
+
 class TaskTimer;
 
 
@@ -534,7 +536,7 @@
       aligns.resize( nqueries );
     }
 
-    auto_ptr<TaskTimer> t1, t2;
+    unique_ptr<TaskTimer> t1, t2;
 
     if ( m_instr_level & IO_TIMER != 0 ) t1.reset( new TaskTimer() );
     if ( m_instr_level & CPU_TIMER != 0 ) t2.reset( new TaskTimer() );
--- vaal-46233/src/lookup/LookAlign.cc
+++ vaal-46233/src/lookup/LookAlign.cc
@@ -29,6 +29,8 @@
 #include "random/Random.h"
 #include "system/ParsedArgs.h"
 
+using std::istrstream;
+
 String QUERY("QUERY");
 
 void look_align::ResetFromAlign(const align & al, const basevector & b1,
--- vaal-46233/src/lookup/LookAlignFinder.h
+++ vaal-46233/src/lookup/LookAlignFinder.h
@@ -12,6 +12,8 @@
 #include "lookup/LookAlign.h"
 #include "Vec.h"
 
+using std::set;
+
 /**
    Class: LookAlignFinder
 
--- vaal-46233/src/lookup/LookAlignSort.h
+++ vaal-46233/src/lookup/LookAlignSort.h
@@ -15,6 +15,8 @@
 
 #include <functional>
 
+using std::set;
+
 /// Read in look_aligns from file, sort, and load into vecs
 /// \param fname name of look_align text file
 /// \param aligns vector into which to put the alignments
--- vaal-46233/src/lookup/LookupTable.h
+++ vaal-46233/src/lookup/LookupTable.h
@@ -18,6 +18,8 @@
 
 #include <set>
 
+using std::set;
+
 typedef pair<unsigned int, unsigned int> LocSeq;
 
 ///
--- vaal-46233/src/lookup/QueryLookupTableCore.cc
+++ vaal-46233/src/lookup/QueryLookupTableCore.cc
@@ -456,6 +456,9 @@
 #include "system/ParsedArgs.h"
 #include "system/file/FileReader.h"
 
+using std::istrstream;
+using std::less_equal;
+
 #define ABORT(MSG)                                 \
 {    out << MSG << "  Abort." << endl << endl;     \
      exit(1);    }
--- vaal-46233/src/lookup/ShortQueryLookup.cc
+++ vaal-46233/src/lookup/ShortQueryLookup.cc
@@ -32,6 +32,8 @@
 #include "lookup/AlignCollector.h"
 #include "lookup/ImperfectLookup.h"
 
+using std::ios_base;
+
 // Run an alignment processing chain: seqs -> look -> receiver -> aligns
 // That is, look turns seqs into hits, which receiver accepts
 // and turns into alignments which are passed to aligns.  The
--- vaal-46233/src/Map.h
+++ vaal-46233/src/Map.h
@@ -21,7 +21,7 @@
 #include <map>
 #include <ext/hash_map>
 using namespace __gnu_cxx;
-
+using std::map;
 
 ///Return true if k is a key in map m
 template<class Key, class Value, typename Cmp> 
--- vaal-46233/src/math/Array.h
+++ vaal-46233/src/math/Array.h
@@ -12,6 +12,9 @@
 #include "CoreTools.h"
 #include "Vec.h"
 
+using std::map;
+using std::fill;
+
 // ==============================================================================
 // A fixed-size simple c-style 2D array that allocates faster than vec< vec<T> >
 // The elements are uninitialized.
--- vaal-46233/src/math/Functions.cc
+++ vaal-46233/src/math/Functions.cc
@@ -10,8 +10,8 @@
 #include "STLExtensions.h"
 #include "math/Functions.h"
 
-
-
+using std::isfinite;
+using std::make_pair;
 
 /*  CombineNormalDistribution              Filipe Ribeiro 2009-06-22
  *
--- vaal-46233/src/math/Functions.h
+++ vaal-46233/src/math/Functions.h
@@ -14,6 +14,10 @@
 #include <cmath>
 #include <numeric>
 
+using std::min;
+using std::cerr;
+using std::swap;
+
 // ===========================================================================
 //
 // Min functions
--- vaal-46233/src/math/HoInterval.cc
+++ vaal-46233/src/math/HoInterval.cc
@@ -10,6 +10,8 @@
 #include "math/HoInterval.h"
 #include "STLExtensions.h"
 
+using std::make_pair;
+
 bool ho_interval::Merge(const ho_interval & o) {
   if (!Meets(*this,o)) return false;
   *this = Span(*this, o);
--- vaal-46233/src/math/HoInterval.h
+++ vaal-46233/src/math/HoInterval.h
@@ -14,6 +14,8 @@
 #include "feudal/MasterVec.h"
 #include "feudal/SerfVec.h"
 
+using std::max;
+
 /// Class: ho_interval
 /// A half-open interval [a, b).
 class ho_interval {
--- vaal-46233/src/PackAlign.h
+++ vaal-46233/src/PackAlign.h
@@ -133,6 +133,8 @@
 #include "pairwise_aligners/Mutmer.h"
 #include "feudal/BinaryStream.h"
 
+using std::make_pair;
+
 const int Bits2  = 3, Bits3  = 7, Bits4 = 15, Bits10 = 1023, Bits12 = 4095, 
   Bits16 = 65535;
 
--- vaal-46233/src/pairwise_aligners/MakeAlignsMethod.cc
+++ vaal-46233/src/pairwise_aligners/MakeAlignsMethod.cc
@@ -19,6 +19,9 @@
 #include "pairwise_aligners/AlignFromMutmers.h"
 #include "pairwise_aligners/SmithWatBandedA.h"
 
+using std::map;
+using std::set;
+
 // If there's a perfect match of length at least perf but we produced no proper 
 // alignment, use banded Smith-Waterman to create one.
 
--- vaal-46233/src/pairwise_aligners/MatchList.cc
+++ vaal-46233/src/pairwise_aligners/MatchList.cc
@@ -9,6 +9,8 @@
 
 #include "pairwise_aligners/MatchList.h"
 
+using std::max;
+
 bool MatchList::FindMatchInSorted( const int id1, const Match& newMatch ) const 
 {
   const vec<Match>& sortedMatches = m_sortedMatches[id1];
--- vaal-46233/src/pairwise_aligners/SuffixTree.h
+++ vaal-46233/src/pairwise_aligners/SuffixTree.h
@@ -23,6 +23,8 @@
 #include <list>
 #include <string>
 
+using std::list;
+
 /**
  * Implementation of a suffix tree for basevectors.
  * This is a data structure for exact (sub)string matching.
--- vaal-46233/src/paths/AlignHyperKmerPath.cc
+++ vaal-46233/src/paths/AlignHyperKmerPath.cc
@@ -23,6 +23,9 @@
 #include "paths/KmerBaseBroker.h"
 #include "paths/KmerPath.h"
 
+using std::ostringstream;
+using std::set;
+
 // Function: AlignHyperKmerPath
 //
 // AlignHyperKmerPath takes a HyperKmerPath h, whose KmerPath edges are assumed
--- vaal-46233/src/paths/AlignSeqsToHyper.cc
+++ vaal-46233/src/paths/AlignSeqsToHyper.cc
@@ -26,6 +26,7 @@
 #include "paths/ReadsToPathsCoreX.h"
 #include "paths/SeqOnHyper.h"
 
+using std::multimap;
 
 // Local class: simple_align
 //
--- vaal-46233/src/paths/HyperKmerPath.cc
+++ vaal-46233/src/paths/HyperKmerPath.cc
@@ -19,6 +19,8 @@
 #include "paths/HyperKmerPath.h"
 #include "paths/KmerBaseBroker.h"
 
+using std::ostrstream;
+using std::ends;
 
 void HyperKmerPath::ReduceLoops( )
 {    for ( int v = 0; v < N( ); v++ )
--- vaal-46233/src/paths/KmerBaseBroker.h
+++ vaal-46233/src/paths/KmerBaseBroker.h
@@ -20,6 +20,8 @@
 #include <algorithm>  // for set_union
 #include <map>
 
+using std::map;
+
 /**
    Class: KmerBaseBrokerTemplate
 
--- vaal-46233/src/paths/KmerPath.h
+++ vaal-46233/src/paths/KmerPath.h
@@ -22,6 +22,8 @@
 #include "HashSimple.h"
 #include "graph/Digraph.h"
 
+using std::make_pair;
+
 class KmerPathLoc;  // forward declaration
 
 /**
--- vaal-46233/src/paths/KmerPathInterval.h
+++ vaal-46233/src/paths/KmerPathInterval.h
@@ -8,6 +8,8 @@
 #include "CommonSemanticTypes.h"
 #include "feudal/BinaryStreamTraits.h"
 
+using std::max;
+
 // Portability note: endianness
 // The implementations here would need to be changed for big endian architectures.
 
@@ -285,6 +287,12 @@
    Models <tagged read path interval>.
 */
 // TODO: potentially dangerous truncation of index by PathId, ReadId
+template<class TAG>
+void Contains( const vec<TAG>& segs, kmer_id_t index, vec<longlong>& answer, bool append = false, int cap = -1 );
+
+template<class TAG>
+void Contains( const vec<TAG>& segs, KmerPathInterval rpi, vec<longlong>& answer, bool append = false, int cap = -1 );
+
 class tagged_rpint {
 
      public: /* PUBLIC METHODS */
@@ -362,11 +370,11 @@
 
      template<class TAG>
      friend void Contains( const vec<TAG>& segs, kmer_id_t index,
-          vec<longlong>& answer, bool append = false, int cap = -1 );
+          vec<longlong>& answer, bool append, int cap );
 
      template<class TAG>
      friend void Contains( const vec<TAG>& segs, KmerPathInterval rpi,
-          vec<longlong>& answer, bool append = false, int cap = -1 );
+          vec<longlong>& answer, bool append, int cap );
 
      template<class TAG>
      friend longlong Instance( const vec<TAG>& segs, kmer_id_t k );
@@ -489,11 +497,11 @@
 
      template<class TAG>
      friend void Contains( const vec<TAG>& segs, kmer_id_t index,
-          vec<longlong>& answer, bool append = false, int cap = -1 );
+          vec<longlong>& answer, bool append, int cap );
 
      template<class TAG>
      friend void Contains( const vec<TAG>& segs, KmerPathInterval rpi,
-          vec<longlong>& answer, bool append = false, int cap = -1 );
+          vec<longlong>& answer, bool append, int cap );
 
      template<class TAG>
      friend longlong Instance( const vec<TAG>& segs, kmer_id_t k );
@@ -620,11 +628,11 @@
 
      template<class TAG>
      friend void Contains( const vec<TAG>& segs, kmer_id_t index,
-          vec<longlong>& answer, bool append = false, int cap = -1 );
+          vec<longlong>& answer, bool append, int cap );
 
      template<class TAG>
      friend void Contains( const vec<TAG>& segs, KmerPathInterval rpi,
-          vec<longlong>& answer, bool append = false, int cap = -1 );
+          vec<longlong>& answer, bool append, int cap );
 
      template<class TAG>
      friend kmer_id_t Instance( const vec<TAG>& segs, kmer_id_t k );
--- vaal-46233/src/paths/ReadsToPathsCoreX.cc
+++ vaal-46233/src/paths/ReadsToPathsCoreX.cc
@@ -20,6 +20,8 @@
 #include "paths/MakeAlignsPathsParallelX.h"
 #include "paths/ReadsToPathsCoreX.h"
 
+using std::map;
+
 static inline 
 String Tag(String S = "RTPCX") { return Date() + " (" + S + "): "; } 
 
--- vaal-46233/src/paths/SuperBaseVector.h
+++ vaal-46233/src/paths/SuperBaseVector.h
@@ -10,6 +10,8 @@
 #include <numeric>
 #include <functional>
 
+using std::mem_fun_ref;
+
 /// A simple class which holds a series of basevectors with
 /// (possibly negative) gaps between them.  This is what a 
 /// KmerPath logically maps to in sequence space.  The function
--- vaal-46233/src/polymorphism/VAAL2.cc
+++ vaal-46233/src/polymorphism/VAAL2.cc
@@ -42,7 +42,7 @@
 #include "feudal/BinaryStream.h"
 #include "feudal/VirtualMasterVec.h"
 
-using namespace std;
+
 
 // Trim reads so that they contain only kmers in the unipaths.
 
--- vaal-46233/src/polymorphism/VAAL3.cc
+++ vaal-46233/src/polymorphism/VAAL3.cc
@@ -29,6 +29,8 @@
 #include "polymorphism/VAALTools.h"
 #include "solexa/SolexaTools.h"
 
+using std::ostringstream;
+
 int main( int argc, char *argv[] )
 {
      RunTime( );
--- vaal-46233/src/PrintAlignment.h
+++ vaal-46233/src/PrintAlignment.h
@@ -14,6 +14,8 @@
 #include "CoreTools.h"
 #include "Qualvector.h"
 
+using std::ostringstream;
+
 void PrintBlanks( ostream& out, int n );
 
 template<class BASEVEC>
--- vaal-46233/src/Qualvector.cc
+++ vaal-46233/src/Qualvector.cc
@@ -10,6 +10,8 @@
 #include "FastIfstream.h"
 #include "Qualvector.h"
 
+using std::istrstream;
+
 /// \file
 /// \ingroup grp_quals
 /// \copydoc Qualvector.h
--- vaal-46233/src/SeqInterval.cc
+++ vaal-46233/src/SeqInterval.cc
@@ -9,6 +9,8 @@
 #include "SeqInterval.h"
 #include "Vec.h"
 
+using std::max;
+using std::min;
 
 /*
  * seq_interval
--- vaal-46233/src/SeqInterval.h
+++ vaal-46233/src/SeqInterval.h
@@ -14,7 +14,9 @@
 #include <algorithm>
 #include <iostream>
 
-using namespace std;
+using std::binary_function;
+using std::ostream;
+using std::istream;
 
 /*
  * class seq_interval
--- vaal-46233/src/Set.h
+++ vaal-46233/src/Set.h
@@ -16,7 +16,7 @@
 #include <set>
 #include "CoreTools.h"
 
-using namespace std;
+using std::set;
 
 template<class T> bool Member( const set<T>& the_set, const T& value )
 {    return the_set.find(value) != the_set.end( );    }  // Breaks cxx 
--- vaal-46233/src/ShortVector.h
+++ vaal-46233/src/ShortVector.h
@@ -14,6 +14,8 @@
 #include "system/Types.h"
 #include "feudal/BinaryStream.h"
 
+using std::uninitialized_fill_n;
+
 // ================================================================================
 //
 // A shortvector holds a list of up to 255 things of any type T.  
--- vaal-46233/src/solexa/FourBase2.h
+++ vaal-46233/src/solexa/FourBase2.h
@@ -15,6 +15,10 @@
 #include "feudal/MasterVec.h"
 #include "feudal/SerfVec.h"
 
+using std::max_element;
+using std::min_element;
+using std::accumulate;
+
 class four_base2 {
 
 public:
--- vaal-46233/src/solexa/FourBase.cc
+++ vaal-46233/src/solexa/FourBase.cc
@@ -9,6 +9,9 @@
 
 #include "solexa/FourBase.h"
 
+using std::string;
+using std::istringstream;
+
 int four_base::Call( ) const
 {
     int result = 0;
--- vaal-46233/src/solexa/FourBase.h
+++ vaal-46233/src/solexa/FourBase.h
@@ -16,6 +16,8 @@
 #include "feudal/MasterVec.h"
 #include "feudal/SerfVec.h"
 
+using std::max;
+
 /*
    Class: four_base
 
--- vaal-46233/src/solexa/SolexaMetrics.h
+++ vaal-46233/src/solexa/SolexaMetrics.h
@@ -42,6 +42,8 @@
 #include "CommonSemanticTypes.h"
 #include <map>
 
+using std::map;
+
 /// Definition of general macros.
 
 class solexa_metric_db {
--- vaal-46233/src/solexa/SolexaTools.cc
+++ vaal-46233/src/solexa/SolexaTools.cc
@@ -20,6 +20,8 @@
 #include "FastaFileset.h"
 #include "util/BaitMap.h"
 
+using std::ostringstream;
+
 void SolexaPredictorParameters::SetFromFile(const String & fname) {
   Ifstream(is, fname);
   String params = Slurp(is);
--- vaal-46233/src/STLExtensions.h
+++ vaal-46233/src/STLExtensions.h
@@ -9,7 +9,7 @@
 #ifndef STLEXTENSIONS_H
 #define STLEXTENSIONS_H
 
-using namespace std;
+
 
 #include <functional>
 #include <vector>
@@ -21,6 +21,13 @@
 #include "feudal/BinaryStream.h"
 #include "system/StaticAssert.h"
 
+using std::binary_function;
+using std::unary_function;
+using std::pair;
+using std::bitset;
+using std::vector;
+using std::ostream;
+
 /// minimum<T> is a function object.  
 ///
 /// If f is an object of class minimum<T> and x and y are objects of
--- vaal-46233/src/system/ParsedArgs.cc
+++ vaal-46233/src/system/ParsedArgs.cc
@@ -26,6 +26,9 @@
 #include "system/HostName.h"
 #include "system/UseGDB.h"
 
+using std::istrstream;
+using std::mem_fun_ref;
+
 #ifndef FatalErr
      #define FatalErr(message) { cout << message << endl << endl; exit(-1); }
 #endif
--- vaal-46233/src/system/ParsedArgs.h
+++ vaal-46233/src/system/ParsedArgs.h
@@ -97,6 +97,8 @@
 #include "TokenizeString.h"
 #include "ParseSet.h"
 
+using std::stringstream;
+
 class parsed_arg_help {
 
  public:
--- vaal-46233/src/system/ProcBuf.cc
+++ vaal-46233/src/system/ProcBuf.cc
@@ -15,6 +15,8 @@
 #include <sys/wait.h>
 #include <unistd.h>
 
+using std::ios_base;
+
 namespace
 {
 size_t const BUFFER_SIZE = 8192;
--- vaal-46233/src/system/RunTime.cc
+++ vaal-46233/src/system/RunTime.cc
@@ -41,6 +41,10 @@
      #include <unwind.h>
 #endif
 
+using std::strstream;
+using std::hex;
+using std::setw;
+
 /// ===========================================================================
 ///
 /// ReturnAddress(i), where 0 <= i <= 100: get the return address.  The
--- vaal-46233/src/system/RunTime.h
+++ vaal-46233/src/system/RunTime.h
@@ -14,6 +14,8 @@
 #include "system/Exit.h"
 #include "system/Types.h"
 
+using std::ostream;
+
 typedef void ArachneSignalHandler(int, siginfo_t*, void*);
 
 void arachne_signal_handler( int signal_number, siginfo_t* info, void* context,
--- vaal-46233/src/system/System.cc
+++ vaal-46233/src/system/System.cc
@@ -35,6 +35,11 @@
 
 #include <dirent.h>
 
+using std::istringstream;
+using std::istream_iterator;
+using std::ostrstream;
+using std::ends;
+
 int SystemInternal( String command, const char *shell )
 {
   flush(cout);
--- vaal-46233/src/system/System.h
+++ vaal-46233/src/system/System.h
@@ -21,6 +21,17 @@
 #include "system/Exit.h"
 #include "system/file/TempFile.h"
 
+using std::vector;
+using std::ostream;
+using std::ofstream;
+using std::cout;
+using std::flush;
+using std::endl;
+using std::istream;
+using std::ifstream;
+using std::ios;
+using std::setprecision;
+
 #ifndef InputErr
      #define InputErr(message)                                               \
      {    cout << "\nFatal error at " << Date( ) << ": " << message << endl; \
--- vaal-46233/src/system/TraceVal.h
+++ vaal-46233/src/system/TraceVal.h
@@ -24,6 +24,9 @@
 #include "system/Types.h"
 #include "system/Assert.h"
 
+using std::cout;
+using std::endl;
+
 // Macros: Tracing macros
 //   TRACEVAL_ON - undefine if you're not doing tracing
 //   TRACEVAL_STOP_TRACING_COPIES -- call before an operation that shuffles
--- vaal-46233/src/system/Types.h
+++ vaal-46233/src/system/Types.h
@@ -14,7 +14,7 @@
 #include <cstdlib>
 #include <netinet/in.h>
 
-using namespace std;
+
 
 // This assumes that all suns run Solaris...
 #if __sun == 1
--- vaal-46233/src/util/BaitMap.cc
+++ vaal-46233/src/util/BaitMap.cc
@@ -236,7 +236,7 @@
 bool BaitMap::write(String file_name)
 {
     std::ofstream out(file_name.c_str());
-    ForceAssert(out);
+    ForceAssert(static_cast<bool>(out));
 
     for (unsigned int i = 0; i < this->size(); i++)
     {
@@ -250,7 +250,7 @@
     }
 
     out.close();
-    ForceAssert(out);
+    ForceAssert(static_cast<bool>(out));
 
     return true;
 }
@@ -260,7 +260,7 @@
 bool BaitMap::write_names(String file_name)
 {
     std::ofstream out(file_name.c_str());
-    ForceAssert(out);
+    ForceAssert(static_cast<bool>(out));
 
     for (unsigned int i = 0; i < this->size(); i++)
     {
@@ -268,7 +268,7 @@
     }
 
     out.close();
-    ForceAssert(out);
+    ForceAssert(static_cast<bool>(out));
 
     return true;
 }
--- vaal-46233/src/util/BaitMap.h
+++ vaal-46233/src/util/BaitMap.h
@@ -20,6 +20,8 @@
 
 #include <map>
 
+using std::map;
+
 class BaitMap
 {
 public:
--- vaal-46233/src/util/Qualb.cc
+++ vaal-46233/src/util/Qualb.cc
@@ -10,6 +10,8 @@
 #include "FastIfstream.h"
 #include "Qualvector.h"
 
+using std::istrstream;
+
 int main( int argc, char *argv[] )
 {
      RunTime( );
--- vaal-46233/src/Vec.h
+++ vaal-46233/src/Vec.h
@@ -48,6 +48,14 @@
 #include "Compare.h"
 #include "system/file/FileReader.h"
 
+using std::initializer_list;
+using std::numeric_limits;
+using std::ostream_iterator;
+using std::less;
+using std::equal_to;
+using std::setfill;
+using std::setw;
+
 /////////////////////////////////////////////////////////////////////////////
 //
 //  vec Class Declaration and Template Definitions
--- vaal-46233/src/VecUtilities.h
+++ vaal-46233/src/VecUtilities.h
@@ -37,6 +37,7 @@
 #include "Vec.h"
 #include <cstddef>
 
+using std::greater;
 
 /////////////////////////////////////////////////////////////////////////////
 //