~ubuntu-branches/ubuntu/precise/bioperl/precise

« back to all changes in this revision

Viewing changes to t/SeqIO/scf.t

  • Committer: Bazaar Package Importer
  • Author(s): Ilya Barygin
  • Date: 2010-01-27 22:48:22 UTC
  • mfrom: (3.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100127224822-ebot4qbrjxcv38au
Tags: 1.6.1-1ubuntu1
* Merge from Debian testing, remaining changes:
  - disable tests, they produce a FTBFS trying to access the network 
    during run.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# -*-Perl-*- Test Harness script for Bioperl
2
 
# $Id: scf.t 15112 2008-12-08 18:12:38Z sendu $
 
2
# $Id: scf.t 16090 2009-09-15 21:57:56Z cjfields $
3
3
 
4
4
use strict;
5
5
 
7
7
    use lib '.';
8
8
    use Bio::Root::Test;
9
9
    
10
 
    test_begin(-tests => 59);
 
10
    test_begin(-tests => 78);
11
11
        
12
12
    use_ok('Bio::SeqIO::scf');
13
13
    use_ok('Bio::Seq::SequenceTrace');
44
44
my $indexcount = 761;
45
45
is (scalar(@indices), $indexcount);
46
46
 
47
 
use Data::Dumper;
 
47
#use Data::Dumper;
48
48
#----------------------------------------
49
49
isa_ok $swq->seq_obj, 'Bio::Seq::Quality';
50
50
isa_ok $swq->qual_obj, 'Bio::Seq::Quality';
253
253
$out_scf->write_seq( -target  => $v3,
254
254
                     -version => 2 );
255
255
 
256
 
# now some version 2 things...
 
256
# simple round trip tests (bug 2881)
 
257
 
 
258
my %file_map = (
 
259
        # filename         # write_seq args
 
260
        'chad100.scf'   => 1,
 
261
        '13-pilE-F.scf' => 1,
 
262
        'version2.scf'  => 1,
 
263
        'version3.scf'  => 1
 
264
        );
 
265
 
 
266
for my $f (sort keys %file_map) {
 
267
        my $outfile = test_output_file();
 
268
        my $in = Bio::SeqIO->new(-file => test_input_file($f),
 
269
                                                         -format => 'scf');
 
270
        my $out = Bio::SeqIO->new(-file => ">$outfile",
 
271
                                                         -format => 'scf');
 
272
        
 
273
        my $seq1 = $in->next_seq();
 
274
        isa_ok($seq1, 'Bio::Seq::SequenceTrace');
 
275
        
 
276
        ok($out->write_seq(-target => $seq1));
 
277
        
 
278
        my $in2 = Bio::SeqIO->new(-file => "<$outfile",
 
279
                                                          -format => 'scf');
 
280
        my $seq2 = $in2->next_seq();
 
281
        isa_ok($seq2, 'Bio::Seq::SequenceTrace');
 
282
        if ($seq1->display_id) {
 
283
                TODO: {
 
284
                        local $TODO = "display_id doesn't round trip yet";
 
285
                        is($seq1->display_id, $seq2->display_id, 'display_id matches');
 
286
                }
 
287
        }
 
288
        is_deeply($seq1->qual, $seq2->qual, 'qual scores match');
 
289
}
 
 
b'\\ No newline at end of file'