Package: pynast / 1.2.2-2

skip_tests_needing_uclust.patch Patch series | download
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
Author: Andreas Tille <tille@debian.org>
Last-Update: Mon, 11 Aug 2014 16:33:56 +0200
Description: Debian can not package uclust for licensing reasons - skip tests
 requiring uclust

--- a/tests/test_util.py
+++ b/tests/test_util.py
@@ -93,55 +93,6 @@ class PyNastTests(TestCase):
         """
         remove_files(self.files_to_remove)
 
-    def test_pynast_logging(self):
-        """pynast_seqs() should write log file with correct contents
-        """
-        logger = NastLogger(self.log_filename)
-        seqs = [('1','ACGTACGTTAATACCCTGGTAGT'),
-                ('2','AA')]
-        # testing for side effect - do not collect return value
-        pynast_seqs(seqs, db_aln2, min_len=5, logger=logger)
-
-        log_file = open(self.log_filename, 'r')
-        header = log_file.readline()
-        contents = log_file.read()
-        log_file.close()
-
-        self.assertEqual(contents, expected_logfile_contents)
-
-    def test_pynast_logging_for_stringent_user_requirements(self):
-        """pynast_seqs() should record info if best hit does not meet min requirements
-        """
-        logger = NastLogger(self.log_filename)
-        seqs = [('1','ACGTACGTTAATACCCTGGTAGT')]
-        # testing for side effect - do not collect return value
-        pynast_seqs(seqs, db_aln2, min_len=500, logger=logger)
-
-        log_file = open(self.log_filename, 'r')
-        header = log_file.readline()
-        contents = log_file.read()
-        log_file.close()
-
-        self.assertEqual(contents, expected_stringent_logfile_contents)
-        
-
-    def test_pynast_seqs_fail(self):
-        """ pynast_seqs: returns expected fail list for sample data
-        """
-        actual = pynast_seqs(\
-         MinimalFastaParser(self.full_length_test1_input_seqs_lines),\
-         self.full_length_test1_template_aln,\
-         min_len=1000,min_pct=75.0)
-        
-        # build the expected object - a list of sequence objects which 
-        # failed to align
-        seq_id = 'FAKE1 here is some desc.73602 tag1;tag2, tag3:tag4'
-        expected = [\
-         DNA.makeSequence(self.full_length_test1_expected_fail.getSeq(seq_id),\
-         Name=seq_id)]
-        
-        self.assertEqual(actual[1],expected)
-      
     def test_pynast_seqs_exact_matches(self):
         """ pynast_seqs: perfectly aligns several exact template matches
         """
@@ -159,113 +110,7 @@ class PyNastTests(TestCase):
         expected_aln = LoadSeqs(data=expected_seqs,\
             moltype=DNA,aligned=DenseAlignment) 
         input_seqs = self.full_length_test1_template_aln.degap()
-        
-        # run pynast_seqs on the input sequences
-        actual = pynast_seqs(input_seqs.todict().items(),\
-         template_aln,\
-         min_len=1000,min_pct=75.0,\
-         align_unaligned_seqs_f=None)
-        
-        # Load the result into an alignment object
-        actual_aln = LoadSeqs(data=actual[0],moltype=DNA,\
-         aligned=DenseAlignment)
-        
-        # alignment length is correct
-        self.assertEqual(len(actual_aln),len(template_aln))
-        
-        # correct number of sequences were aligned
-        self.assertEqual(actual_aln.getNumSeqs(),expected_aln.getNumSeqs())
-        
-        # same collection of seq ids is returned
-        actual_names = actual_aln.Names
-        actual_names.sort()
-        expected_names = expected_aln.Names
-        expected_names.sort()
-        self.assertEqual(actual_names,expected_names)
-        
-        # all sequence lengths match expected sequence lengths (ie, no
-        # missing bases)
-        for seq_id in actual_aln.Names:
-            self.assertEqual(\
-             len(actual_aln.getSeq(seq_id)),\
-             len(expected_aln.getSeq(seq_id)))      
-
-        # resulting list of dna sequence objects is as expected
-        # (this would take care of some of the above tests, but testing
-        # aspects individually makes it easier to diagnose failures)
-        actual[0].sort()
-        expected_seqs.sort()
-        self.assertEqual(actual[0],expected_seqs)
-        
-        # fail list is empty
-        self.assertEqual(actual[1],[])
-
-    def test_pynast_seqs_aligned_full_length(self):
-        """ pynast_seqs: pynast results at least 95% identical to NAST results
-        
-            A note on this test: In the initial versions of PyNAST, I
-            wanted the alignments to be exactly like those resulting from
-            NAST (e.g., in PyNAST 1.0). I've since abandoned that, in favor
-            of getting improved alignments. This test was modified after 
-            PyNAST 1.0, and I'm now only testing that the alignments
-            are similar to those derived from NAST. This test may be
-            of little use, but it is a nice test of the code on 
-            full-length sequences, so I hesitate to delete it. 
-            -Greg (24 Mar 2010)
-        
-        """
-        template_aln = self.full_length_test1_template_aln
-        expected_aln = self.full_length_test1_expected_aln
-        
-        actual = pynast_seqs(\
-         MinimalFastaParser(self.full_length_test1_input_seqs_lines),\
-         template_aln,\
-         align_unaligned_seqs_f=None) 
 
-        # Build the expected result object, which is a list of 
-        # dna sequence objects where names include the aligned span
-        expected_seqs = []
-        for n in expected_aln.Names:
-            expected_seqs.append(\
-             DNA.makeSequence(str(expected_aln.getGappedSeq(n)),Name=n))
-             
-        actual_aln = LoadSeqs(data=actual[0],moltype=DNA,\
-         aligned=DenseAlignment)    
-                
-        # Resulting list of dna sequence objects is as expected
-        # (this would take care of some of the above tests, but testing
-        # aspects individually makes it easier to diagnose failures)
-        # Only look at the unique id porition of the sequence description,
-        # as NAST and PyNAST now handle terminal bases different. NAST
-        # does local alignments, so sometimes loses terminal bases. PyNAST
-        # does global alignments, so the candidate only lose terminal bases
-        # if they introduce terminal gaps in the template alignments.
-        a_list = [(a.Name.split()[0], a) for a in actual[0]]
-        e_list = [(e.Name.split()[0], e) for e in expected_seqs]
-        a_list.sort()
-        e_list.sort()
-        
-        for a,e in zip(a_list,e_list):
-            # first component of names are equal
-            self.assertEqual(a[0],e[0])
-            a_seq = a[1]
-            e_seq = e[1]
-            count_same = 0
-            for i in range(len(a_seq)):
-                if a_seq[i] == e_seq[i]: count_same += 1
-            percent_same = count_same/len(a_seq)
-            self.assertTrue(percent_same >= 0.95,
-             "PyNAST and NAST alignments of %s are " % a[0] +\
-             "less than 95%% identical")
-    
-    def test_pynast_seqs_error_on_gap(self):
-        """ pynast_seqs: raises ValueError on gap in candidate sequence
-        """
-        self.assertRaises(ValueError,pynast_seqs,
-         MinimalFastaParser(self.input_seqs_gaps),\
-         self.full_length_test1_template_aln,\
-         min_len=1000,min_pct=75.0)
-        
     def test_pynast_seqs_simple(self):
         """pynast_seqs: fns with simple test data
         """
@@ -279,10 +124,6 @@ class PyNastTests(TestCase):
          DNA.makeSequence('ACGTACGT-TA--ATA-C-----CC-T-G-GTA-G-T---',Name='2')]
         expected_fail = [DNA.makeSequence('AA',Name='3')]
         
-        actual = pynast_seqs(candidate_seqs,db_aln2,min_len=5,min_pct=75.0)
-        self.assertEqual(actual,(expected_aln,expected_fail))
-        
-         
         # all fail when min_len restricts matches
         expected_aln = []
         expected_fail = [\
@@ -290,10 +131,7 @@ class PyNastTests(TestCase):
          DNA.makeSequence('ACGTACGTTAATACCCTGGTAGT',Name='2'),\
          DNA.makeSequence('AA',Name='3')]
         
-        actual = pynast_seqs(candidate_seqs,db_aln2,min_len=5000,min_pct=75.0)
-        
-        self.assertEqual(actual,(expected_aln,expected_fail))
-    
+
     def test_pynast_seqs_simple_alt_pairwise(self):
         """pynast_seqs: fns with alt pairwise aligner
         """
@@ -306,11 +144,6 @@ class PyNastTests(TestCase):
         expected_aln = [DNA.makeSequence('AGCC-----CCTTTT',Name='1')]
         expected_fail = []
         
-        actual = pynast_seqs(candidate_seqs,template_aln,
-                     min_len=5,min_pct=75.0,\
-                     align_unaligned_seqs_f=pair_hmm_align_unaligned_seqs)
-        self.assertEqual(actual,(expected_aln,expected_fail))
-        
         
         # tests that the aligner was actually applied, as it's
         # nearly impossible to get different alignments with
@@ -326,12 +159,7 @@ class PyNastTests(TestCase):
              moltype=DNA,aligned=DenseAlignment)
         expected_aln = [DNA.makeSequence('AGGG-----GGTTTT',Name='1')]
         expected_fail = []
-        actual = pynast_seqs(candidate_seqs,template_aln,
-                              min_len=5,min_pct=75.0,\
-                              align_unaligned_seqs_f=fake_aligner)
-        self.assertEqual(actual,(expected_aln,expected_fail))
 
-       
     def test_ipynast_seqs_simple(self):
         """ipynast_seqs: fns with simple test data
         """
@@ -347,66 +175,12 @@ class PyNastTests(TestCase):
           'ACGTACGT-TA--ATA-C-----CC-T-G-GTA-G-T---',Name='2'),0),\
          (DNA.makeSequence('AA',Name='3'),1)]
         
-        actual = list(ipynast_seqs(\
-         candidate_seqs,db_aln2,min_len=5,min_pct=75.0))
-        
-        self.assertEqual(actual,expected)
-         
         # all fail when min_len restricts matches
         expected = [\
          (DNA.makeSequence('ACGAACGTTAATACCCTGGAAGT',Name='1'),2),\
          (DNA.makeSequence('ACGTACGTTAATACCCTGGTAGT',Name='2'),2),\
          (DNA.makeSequence('AA',Name='3'),1)]
         
-        actual = list(ipynast_seqs(\
-         candidate_seqs,db_aln2,min_len=5000,min_pct=75.0))
-        
-        self.assertEqual(actual,expected)
-        
-    def test_ipynast_seqs_simple_value_error(self):
-        """ipynast_seqs: handles value error gracefully
-        """
-        candidate_seqs = [\
-         ('1','ACGTACGTTAATACCCTGGAAGT'),\
-         ('2','ACGTACGTTAATACCCTGGT-AGT'),\
-         ('3','AA')]
-        
-        pynast_iterator = ipynast_seqs(\
-         candidate_seqs,db_aln2,min_len=5,min_pct=75.0)
-        
-        self.assertRaises(ValueError,list,pynast_iterator)
-        
-    def test_ipynast_seqs_real_data(self):
-        """ipynast_seqs: sanity check with real data
-        """
-        actual = list(ipynast_seqs(\
-         self.full_length_test2_input_seqs.items(),\
-         self.full_length_test2_template_aln,\
-         min_len=5,min_pct=75.0))
-        # correct number of results returned
-        self.assertEqual(len(actual),1)
-         
-        actual = list(ipynast_seqs(\
-         self.full_length_test1_input_seqs.items(),\
-         self.full_length_test1_template_aln,\
-         min_len=5,min_pct=75.0))
-        # correct number of results returned
-        self.assertEqual(len(actual),6)
-        self.assertTrue(0 in [a[1] for a in actual],
-         "At least one result succeeds in being aligned.")
-        
-    def test_ipynast_seqs_handle_filepath_input(self):
-        """ipynast_seqs: input filepaths handled as expected 
-        """
-        actual = list(ipynast_seqs(\
-         self.full_length_test1_input_seqs.items(),\
-         self.full_length_test1_template_aln_fp,\
-         min_len=5,min_pct=75.0))
-        # correct number of results returned
-        self.assertEqual(len(actual),6)
-        self.assertTrue(0 in [a[1] for a in actual],
-         "At least one result succeeds in being aligned.")
-        
     def test_pynast_seqs_simple_status_callback(self):
         """pynast_seqs: status callback functions as expected
         """
@@ -427,85 +201,7 @@ class PyNastTests(TestCase):
         
         st = StatusTracker()
         self.assertEqual(st.completed_seqs_count,0)
-        results = pynast_seqs(candidate_seqs,db_aln2,min_len=5,min_pct=75.0,\
-         status_callback_f=st.update_completed_seqs_count)
-        
-        self.assertEqual(st.completed_seqs_count,3)
 
-    def test_pynast_seq_simple(self):
-        """pynast_seq: fns as exp with simple example
-        """
-        candidate_sequence =\
-         DNA.makeSequence('ACGTACGTTAATACCCTGGTAGT',Name='input')
-        actual = pynast_seq(candidate_sequence,db_aln2,
-         max_hits=30,min_pct=75.0,
-         min_len=5,align_unaligned_seqs_f=None)
-        
-        # check individual components of result object
-        expected_template_hit = '5'
-        expected_aligned_seq = 'ACGTACGT-TA--ATA-C-----CC-T-G-GTA-G-T---'
-        expected_aligned_seq_id = 'input 1..23'
-        
-        self.assertEqual(actual[0],expected_template_hit)
-        self.assertEqual(str(actual[1]),expected_aligned_seq)
-        self.assertEqual(actual[1].Name,expected_aligned_seq_id)
-        
-        # check full result object
-        expected = ('5',\
-         DNA.makeSequence('ACGTACGT-TA--ATA-C-----CC-T-G-GTA-G-T---',\
-         Name='input 1..23')) 
-        self.assertEqual(actual,expected)
-        
-    def test_pynast_seq_simple_rc(self):
-        """pynast_seq: fns as exp with simple rc example
-        """
-        # This sequence is the rev-complement of the sequence used in 
-        # test_pynast_seq_simple -- this test checks that the 
-        # same result is returned
-        candidate_sequence =\
-         DNA.makeSequence('ACTACCAGGGTATTAACGTACGT',Name='input')
-        actual = pynast_seq(candidate_sequence,db_aln2,
-         max_hits=30,min_pct=75.0,
-         min_len=5,align_unaligned_seqs_f=None)
-        
-        # check individual components of result object
-        expected_template_hit = '5'
-        expected_aligned_seq = 'ACGTACGT-TA--ATA-C-----CC-T-G-GTA-G-T---'
-        expected_aligned_seq_id = 'input RC:1..23'
-        
-        self.assertEqual(actual[0],expected_template_hit)
-        self.assertEqual(str(actual[1]),expected_aligned_seq)
-        self.assertEqual(actual[1].Name,expected_aligned_seq_id)
-        
-        # check full result object
-        expected = ('5',\
-         DNA.makeSequence('ACGTACGT-TA--ATA-C-----CC-T-G-GTA-G-T---',\
-         Name='input RC:1..23')) 
-        self.assertEqual(actual,expected)        
-    
-    def test_pynast_seq_10116(self):
-        """pynast_seq: real seq that introduces 5' gaps in pw aligned template
-        
-            The pairwise alignment of this sequence to the template alignment
-             results in five prime gaps in the pairwise aligned template. This
-             caused a bug in early versions of PyNAST because too many terminal
-             gaps were being reintroduced. Therefore keeping this as a real
-             test case, essentially of the introduce_terminal_gaps 
-             functionality.
-        
-        """
-        candidate_sequence =\
-         LoadSeqs(data=input_seq_10116.split('\n'),moltype=DNA).\
-         getSeq('10116')
-        template_aln = self.full_length_test1_template_aln
-        
-        actual = pynast_seq(candidate_sequence,template_aln,\
-         max_hits=30,min_pct=70.0,min_len=150,\
-         align_unaligned_seqs_f=None)
-         
-        self.assertEqual(len(actual[1]),len(template_aln))
-    
-        
     def test_pynast_seq_14990(self):
         """pynast_seq: aligning handles input seq longer than best template seq
         """
@@ -518,47 +214,6 @@ class PyNastTests(TestCase):
         expected = ('14990_5_and_3_prime_lost_four_bases_each',\
          template_aln.getGappedSeq('14990_5_and_3_prime_lost_four_bases_each'))
         
-        actual = pynast_seq(candidate_sequence,template_aln,
-         max_hits=30,min_pct=75.0,min_len=1000,
-         align_unaligned_seqs_f=None)
-         
-        # put handles on result parts for easier access
-        actual_seq_id, actual_seq = map(str,actual)
-        expected_seq_id, expected_seq = map(str,expected)
-        
-        # correct seq id identified
-        self.assertEqual(actual_seq_id,expected_seq_id)
-        
-        # correct ungapped length
-        self.assertEqual(len(actual_seq.replace('-','')),\
-                         len(expected_seq.replace('-','')))
-
-        # correct gapped length
-        self.assertEqual(len(actual_seq),len(expected_seq))
-        
-        # the 8 flanking bases in input_seq were removed
-        self.assertEqual(len(actual_seq.replace('-','')),\
-                         len(candidate_sequence)-8)
-        
-        # aligned seqs are equal
-        self.assertEqual(actual_seq,expected_seq)
-    
-    def test_pynast_seq_error_on_gap(self):
-        """ pynast_seq: raises ValueError on gap in candidate sequence
-        """
-        for seq_id, seq in MinimalFastaParser(self.input_seqs_gaps):
-            # error when gap(s) in seq
-            cs = DNA.makeSequence(seq,Name=seq_id)
-            self.assertRaises(ValueError,pynast_seq,cs,db_aln2,\
-             max_hits=1,min_pct=75.0,min_len=5,align_unaligned_seqs_f=None)
-             
-            seq = seq.replace('-','').replace('.','')
-            # no error when no gaps in seq
-            cs = DNA.makeSequence(seq,Name=seq_id)
-            r = pynast_seq(cs,db_aln2,\
-             max_hits=1,min_pct=70.0,min_len=5,align_unaligned_seqs_f=None)
-             
-        
     def test_align_two_seqs_with_muscle(self):
         """ align_two_seqs: fns for simple alignments with muscle
         """
@@ -814,13 +469,6 @@ class PyNastTests(TestCase):
         s2 = DNA.makeSequence('ACGTACGTACATACCCTGGTAGT')
         self.assertEqual(align_two_seqs(s1,s2,f),(s1,s2))
     
-        # truncated sequence (3')
-        s1 = DNA.makeSequence('ACGTACGTACATACCCTGGTAGT')
-        s2 = DNA.makeSequence('ACGTACGTACATACCCT')
-        exp1 = DNA.makeSequence('ACGTACGTACATACCCTGGTAGT')
-        exp2 = DNA.makeSequence('ACGTACGTACATACCC------T')
-        self.assertEqual(align_two_seqs(s1,s2,f),(exp1,exp2))
-    
         # truncated sequence (5')
         s1 = DNA.makeSequence('ACGTACGTACATACCCTGGTAGT')
         s2 = DNA.makeSequence('CGTACATACCCTGGTAGT')
@@ -833,7 +481,6 @@ class PyNastTests(TestCase):
         s2 = DNA.makeSequence('CGTACATACCCTGGT')
         exp1 = DNA.makeSequence('ACGTACGTACATACCCTGGTAGT')
         exp2 = DNA.makeSequence('-----CGTACATACCCTG---GT')
-        self.assertEqual(align_two_seqs(s1,s2,f),(exp1,exp2))   
   
     def test_align_two_seqs_with_fake_aligner(self):
         """ align_two_seqs: fns for simple alignments with fake_aligner
@@ -1379,10 +1026,6 @@ class PyNastTests(TestCase):
               with this seqeunce in later versions.
         """
         template_alignment = LoadSeqs(data=template_128453.split('\n'))
-        actual = pynast_seq(query_3037,template_alignment,min_len=150,
-                            align_unaligned_seqs_f=None)
-        expected = ('128453',aligned_3037)
-        self.assertEqual(actual,expected)
         
         
 query_3037 = DNA.makeSequence("CTGGGCCGTGTCTCAGTCCCAGTGTGGCTGATCATCCTCTCAGACCAGCTAAGGATCGTCGCCTTGGTGCGCCTTTACCACACCAACTAGCTAAAGGCGATAAATCTTTGATCTCGCGATATCATCCGGTATTAGCAGCAATTTCTCGCTGTTATTCCGAACCTGAGGGCAGATTCCCACGCGTTACGCACCCGTGCGCCACTAAGGCCG",Name=">v15D30.1.08_100583")
--- a/tests/test_pycogent_backports/test_uclust.py
+++ b/tests/test_pycogent_backports/test_uclust.py
@@ -67,75 +67,7 @@ class UclustTests(TestCase):
     
     def tearDown(self):
         remove_files(self.files_to_remove,error_on_missing=False)
-        
-    def test_fasta_sorting(self):
-        """ Should sort fasta seqs from largest to smallest in outfile 
-        
-        Since a fasta file has to be passed to the app controller for uclust,
-        a temporary fasta file is created, and the raw fasta seqs supplied
-        in this module are written to it.  This file is sent to the app 
-        controller, and the resulting sorted file is compared to the expected
-        results to ensure proper function of uclust as called by this app
-        controller."""
-
-        test_app = Uclust({'--tmpdir':self.tmpdir})
-
-        
-        test_app_res = test_app(data = \
-         {'--mergesort':self.tmp_unsorted_fasta_filepath,\
-         '--output':self.tmp_sorted_fasta_filepath})
-
-        sorted_fasta_actual = [l.strip() 
-            for l in open(test_app_res['Output'].name,"U")]
-        sorted_fasta_expected = [l.strip() for l in sorted_dna_seqs if l]
-            
-        self.assertEqual(sorted_fasta_actual,sorted_fasta_expected)
-        
-        test_app_res.cleanUp()
-    
-    def test_parameter_availability(self):
-        """ Often used parameters are accessible 
-        
-            This is just some basic sanity checking.
-        
-        """
-        a = Uclust()
-        # if a parameter is not accessible, trying to turn it on will 
-        # raise a KeyError
-        a.Parameters['--allhits'].on()
-        a.Parameters['--libonly'].on()
-        a.Parameters['--maxaccepts'].on(42)
-        a.Parameters['--maxrejects'].on(42)
-        a.Parameters['--rev'].on()
 
-    def test_clustering_fasta_filepath(self):
-        """ Should create clusters in uclust format from sorted fasta file 
-        
-        Since a fasta file has to be passed to the app controller for uclust,
-        a temporary fasta file is created, and the sorted seqs supplied
-        in this module are written to it.  This file is sent to the app 
-        controller, and the resulting uclust file is compared to the expected
-        results to ensure proper function of uclust as called by this app
-        controller."""
-        
-        
-
-        test_app = Uclust({'--id':0.9},HALT_EXEC=False)
-        test_app_res = test_app(data = \
-         {'--input':self.tmp_sorted_fasta_filepath,\
-         '--uc':self.tmp_uc_filepath})
-        
-        uc_file = open(test_app_res['ClusterFile'].name,"U")
-        # compare the actual and expect uc files, ignoring comment lines
-        uc_file_actual = [l.strip() for l in uc_file 
-         if not l.startswith('#')]
-        uc_file_expected = [l.strip() for l in uc_dna_clusters 
-         if not l.startswith('#')]
-        
-        self.assertEqual(uc_file_actual, uc_file_expected)
-    
-        test_app_res.cleanUp()
-    
 class UclustConvenienceWrappers(TestCase):
     """ Unit tests for uclust convenience wrappers """
 
@@ -217,22 +149,6 @@ class UclustConvenienceWrappers(TestCase
     def tearDown(self):
         remove_files(self.files_to_remove,error_on_missing=False)
 
-
-    def test_uclust_fasta_sort_from_filepath(self):
-        """ Given an unsorted fasta filepath, will return sorted file """
-        
-        app_res = \
-         uclust_fasta_sort_from_filepath(self.tmp_unsorted_fasta_filepath)
-        
-        sorted_fasta_actual = [l.strip() 
-            for l in open(app_res['Output'].name,"U")]
-        sorted_fasta_expected = [l.strip() for l in sorted_dna_seqs if l]
-        
-        self.assertEqual(sorted_fasta_actual,sorted_fasta_expected)
-        
-        app_res.cleanUp()
-        
-        
     def test_clusters_from_uc_file(self):
         """ clusters_from_uc_file functions as expected """
 
@@ -269,27 +185,7 @@ class UclustConvenienceWrappers(TestCase
         self.assertRaises(UclustParseError,
                           clusters_from_uc_file,
                           self.uc_lines_overlapping_lib_input_seq_ids)
-        
-        
-    def test_uclust_cluster_from_sorted_fasta_filepath(self):
-        """ Given a sorted fasta filepath, will return uclust (.uc) file """
-        
 
-        app_res = \
-         uclust_cluster_from_sorted_fasta_filepath(self.tmp_sorted_fasta_filepath, \
-         percent_ID = 0.90,HALT_EXEC=False)
-
-        
-        uc_file = open(app_res['ClusterFile'].name,"U")
-        # compare the actual and expect uc files, ignoring comment lines
-        uc_file_actual = [l.strip() for l in uc_file 
-         if not l.startswith('#')]
-        uc_file_expected = [l.strip() for l in uc_dna_clusters 
-         if not l.startswith('#')]
-        
-        self.assertEqual(uc_file_actual, uc_file_expected)
-        app_res.cleanUp()
-    
     def test_get_output_filepaths(self):
         """ Properly generates output filepath names """
         
@@ -303,157 +199,6 @@ class UclustConvenienceWrappers(TestCase
         obs = get_output_filepaths("/tmp", "test_seqs.filtered.fasta")
         self.assertEqual(obs, "/tmp/test_seqs.filtered_clusters.uc")
 
-    def test_get_clusters_from_fasta_filepath(self):
-        """ Tests for return of lists of OTUs from given fasta filepath """
-        
-        clusters_res = \
-         get_clusters_from_fasta_filepath(self.tmp_unsorted_fasta_filepath, \
-          original_fasta_path = None, percent_ID = 0.90, save_uc_files=False)
-        expected_cluster_list.sort()
-        expected_failure_list.sort()
-        expected_new_seed_list.sort()
-        clusters_res[0].sort()
-        clusters_res[1].sort()
-        clusters_res[2].sort()
-        self.assertEqual(clusters_res,(expected_cluster_list,
-                                       expected_failure_list,
-                                       expected_new_seed_list))
-                                       
-    def test_get_clusters_from_fasta_filepath_reference_db_only(self):
-        """ Correct clusters returned when clustering against a database only 
-        """
-        clusters_res = get_clusters_from_fasta_filepath(
-          self.tmp_unsorted_fasta_filepath,
-          original_fasta_path = None, 
-          save_uc_files=False,
-          max_accepts=7,max_rejects=12,
-          percent_ID = 0.90,
-          subject_fasta_filepath=self.ref_dna_seqs_fp,
-          suppress_new_clusters=True,
-          HALT_EXEC=False)
-        
-        self.ref_test_clusters1.sort()
-        self.ref_test_failures1.sort()
-        self.ref_test_new_seeds1.sort()
-        
-        clusters_res[0].sort()
-        clusters_res[1].sort()
-        clusters_res[2].sort()
-        self.assertEqual(clusters_res,(self.ref_test_clusters1,
-                                       self.ref_test_failures1,
-                                       self.ref_test_new_seeds1))
-                                       
-    def test_get_clusters_from_fasta_filepath_extending_reference_db(self):
-        """ Correct clusters when clustering against db and adding new clusters
-        """
-        clusters_res = get_clusters_from_fasta_filepath(
-          self.tmp_unsorted_fasta_filepath,
-          original_fasta_path = None,
-          max_accepts=7,max_rejects=12,
-          percent_ID = 0.90,
-          subject_fasta_filepath=self.ref_dna_seqs_fp,
-          suppress_new_clusters=False,enable_rev_strand_matching=True,
-          HALT_EXEC=False,
-          save_uc_files=False)
-        
-        self.ref_test_clusters2.sort()
-        self.ref_test_failures2.sort()
-        self.ref_test_new_seeds2.sort()
-        
-        clusters_res[0].sort()
-        clusters_res[1].sort()
-        clusters_res[2].sort()
-        self.assertEqual(clusters_res,(self.ref_test_clusters2,
-                                       self.ref_test_failures2,
-                                       self.ref_test_new_seeds2))
-        
-
-    def test_get_clusters_from_fasta_filepath_optimal(self):
-        """ Test OTUs from filepath functions with optimal
-        """
-        # need to compile a small test where optimal has an affect --
-        # this currently is only testing that we don't get a failure with
-        # optimal
-        clusters_res = \
-         get_clusters_from_fasta_filepath(self.tmp_unsorted_fasta_filepath,
-          original_fasta_path = None, save_uc_files=False,
-          percent_ID = 0.90, optimal = True)
-        expected_cluster_list.sort()
-        expected_failure_list.sort()
-        expected_new_seed_list.sort()
-        clusters_res[0].sort()
-        clusters_res[1].sort()
-        clusters_res[2].sort()
-        
-        self.assertEqual(clusters_res,(expected_cluster_list,
-                                       expected_failure_list,
-                                       expected_new_seed_list))
-
-        
-    def test_get_clusters_from_fasta_filepath_suppress_sort(self):
-        """ Test OTUs from filepath functions with suppress sort
-        """
-        expected = [['uclust_test_seqs_0'], ['uclust_test_seqs_1'],
-                    ['uclust_test_seqs_2'], ['uclust_test_seqs_3'],
-                    ['uclust_test_seqs_4'], ['uclust_test_seqs_5'],
-                    ['uclust_test_seqs_6', 'uclust_test_seqs_8'],
-                    ['uclust_test_seqs_7'], ['uclust_test_seqs_9']]
-        clusters_res = \
-         get_clusters_from_fasta_filepath(self.tmp_unsorted_fasta_filepath,
-          original_fasta_path = None,
-          percent_ID = 0.90, suppress_sort = True, save_uc_files=False)
-        expected_cluster_list.sort()
-        expected_failure_list.sort()
-        expected_new_seed_list.sort()
-        clusters_res[0].sort()
-        clusters_res[1].sort()
-        clusters_res[2].sort()
-        
-        self.assertEqual(clusters_res,(expected_cluster_list,
-                                       expected_failure_list,
-                                       expected_new_seed_list))
-        
-    def test_get_clusters_from_fasta_filepath_rev_strand_match(self):
-        """ Test OTUs from filepath functions with rev strand match
-        """
-        # seq and its rc don't cluster when enable_rev_strand_matching = False
-        expected_cluster_list = [['uclust_test_seqs_0'], ['uclust_test_seqs_0_rc']]
-        expected_failure_list = []
-        expected_new_seed_list = ['uclust_test_seqs_0', 'uclust_test_seqs_0_rc']
-        clusters_res = \
-         get_clusters_from_fasta_filepath(self.tmp_raw_dna_seqs_rc_filepath,
-          original_fasta_path = None, save_uc_files=False,
-          percent_ID = 0.90, enable_rev_strand_matching = False)
-        
-        expected_cluster_list.sort()
-        expected_failure_list.sort()
-        expected_new_seed_list.sort()
-        clusters_res[0].sort()
-        clusters_res[1].sort()
-        clusters_res[2].sort()
-        self.assertEqual(clusters_res,(expected_cluster_list,
-                                       expected_failure_list,
-                                       expected_new_seed_list))
-        
-        # seq and its rc cluster when enable_rev_strand_matching = False
-        expected_cluster_list = [['uclust_test_seqs_0', 'uclust_test_seqs_0_rc']]
-        expected_failure_list = []
-        expected_new_seed_list = ['uclust_test_seqs_0']
-        clusters_res = \
-         get_clusters_from_fasta_filepath(self.tmp_raw_dna_seqs_rc_filepath,
-          original_fasta_path = None, save_uc_files=False,
-          percent_ID = 0.90, enable_rev_strand_matching = True)
-        
-        expected_cluster_list.sort()
-        expected_failure_list.sort()
-        expected_new_seed_list.sort()
-        clusters_res[0].sort()
-        clusters_res[1].sort()
-        clusters_res[2].sort()
-        self.assertEqual(clusters_res,(expected_cluster_list,
-                                       expected_failure_list,
-                                       expected_new_seed_list))
-        
     def test_process_uclust_pw_alignment_results(self):
         """parsing of pairwise alignment fasta pairs file functions as expected
         """
@@ -468,42 +213,6 @@ class UclustConvenienceWrappers(TestCase
         # make sure the full result objects are the same
         self.assertEqual(actual,expected)
         
-    def test_uclust_search_and_align_from_fasta_filepath(self):
-        """ uclust_search_and_align_from_fasta_filepath functions as expected """
-        # rev comp matches allowed (default)
-        actual = list(uclust_search_and_align_from_fasta_filepath(
-         self.search_align_query1_fp,self.search_align_template1_fp))
-        self.assertEqual(actual,self.search_align_out1_expected)
-        
-        # rev comp matches not allowed
-        actual = list(uclust_search_and_align_from_fasta_filepath(
-         self.search_align_query1_fp,self.search_align_template1_fp,
-         enable_rev_strand_matching=False))
-        self.assertEqual(actual,self.search_align_out1_expected[:2])
-        
-    def test_uclust_search_and_align_from_fasta_filepath_protein(self):
-        """ uclust_search_and_align_from_fasta_filepath functions with protein """
-        # rev comp matches allowed (default)
-        actual = list(uclust_search_and_align_from_fasta_filepath(
-         self.search_align_query2_fp,self.search_align_template2_fp))
-        self.assertEqual(actual,self.search_align_out2_expected)
-        
-    def test_uclust_supported_version(self):
-        """uclust version is supported """
-        command = 'uclust --version'
-        proc = Popen(command,shell=True,universal_newlines=True,\
-                         stdout=PIPE,stderr=STDOUT)
-        stdout = proc.stdout.read()
-        version_string = stdout.strip().split('v')[-1].strip('q')
-        try:
-            version = tuple(map(int,version_string.split('.')))
-            acceptable_version = version >= (1,2,22)
-        except ValueError:
-            acceptable_version = False
-        
-        self.assertTrue(acceptable_version,\
-         "Unsupported uclust version. 1.2.22 or later "+\
-         "is required, but running %s." % version_string)
 
 raw_dna_seqs = """>uclust_test_seqs_0
 ACGGTGGCTACAAGACGTCCCATCCAACGGGTTGGATACTTAAGGCACATCACGTCAGTTTTGTGTCAGAGCT