~ubuntu-branches/ubuntu/trusty/bioperl/trusty

« back to all changes in this revision

Viewing changes to t/Restriction/Analysis.t

  • Committer: Bazaar Package Importer
  • Author(s): Charles Plessy
  • Date: 2011-06-17 13:51:18 UTC
  • mfrom: (3.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20110617135118-hncy38e0134j8oi5
Tags: 1.6.901-1
* New upstream release.
* Point debian/watch to search.cpan.org.
* Build using dh and overrides:
  - Use Debhelper 8 (debian/rules, debian/control).
  - Simplified debian/rules.
* Split into libbio-perl-perl, as discussed with the Debian Perl team.
  (debian/control, debian/bioperl.install, debian libbio-perl-perl.install)
* debian/control:
  - Incremented Standards-Version to reflect conformance with Policy 3.9.2.
    No other changes needed.
  - Vcs-Browser URL made redirectable to viewvc.
  - Removed useless ‘svn’ in the Vcs-Svn URL.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# -*-Perl-*- Test Harness script for Bioperl
2
 
# $Id: Analysis.t 15112 2008-12-08 18:12:38Z sendu $
 
2
# $Id$
3
3
 
4
4
 
5
5
use strict;
8
8
    use lib '.';
9
9
    use Bio::Root::Test;
10
10
    
11
 
    test_begin(-tests => 177);
 
11
    test_begin(-tests => 182);
12
12
        
13
13
    use_ok('Bio::Restriction::Enzyme');
14
14
    use_ok('Bio::Restriction::Enzyme::MultiCut');
242
242
is my @ss = $ra->sizes('PspEI'), 2, 'expected 2 sizes for PspEI';
243
243
is $ss[0] + $ss[1], $seq->length;
244
244
 
 
245
# Issue 3157
 
246
$re = Bio::Restriction::Enzyme->new(-enzyme=>'PspEI', -site=>'G^GTNACC');
 
247
is @ss = $ra->sizes($re), 2, 'expected 2 sizes for PspEI';
 
248
is $ss[0] + $ss[1], $seq->length;
 
249
 
245
250
is $ra->fragments('MwoI'), 1, 'not circular expected 1 fragments for MwoI as it doesnt cut';
246
251
 
247
252
# circularise the sequence, regenerate the cuts and test again
292
297
 
293
298
ok $@;
294
299
like($@, qr(Unrecognized characters in site), 'bug 2139');
 
300
 
 
301
# 0-pos bug (Elia Stupka)
 
302
 
 
303
$seq = Bio::Seq->new(
 
304
    -display_name   => 'foo',
 
305
    -alphabet       => 'dna',
 
306
    -seq            => 'GATCNNNNGATC'
 
307
);
 
308
 
 
309
$ra = Bio::Restriction::Analysis->new(-seq=>$seq);
 
310
 
 
311
is $ra->fragments('HindIII'), 1, 'number of HindIII fragments';
 
312
is $ra->fragments('BfuCI'), 2, 'number of EcoRI fragments';
 
313
 
 
314
# passing a bad enzyme name
 
315
 
 
316
is $ra->fragments('FooBarI'), 1, 'number of RsaI fragments';
 
317
 
 
318