maint: remove Travis stuff which has been replaced with Github actions (#325)
[bioperl-live.git] / t / SeqFeature / Amplicon.t
blobc48a981ec70b741cbf041b608ffe7abd61613705
1 use strict;
3 BEGIN {
4     use Bio::Root::Test;
5     
6     test_begin(-tests => 21);
8     use_ok 'Bio::PrimarySeq';
9     use_ok 'Bio::SeqFeature::Primer';
10     use_ok 'Bio::SeqFeature::Amplicon';
13 my ($amplicon, $amplicon_seq, $fwd_primer, $rev_primer, $template);
16 # Basic amplicon object
18 $amplicon = Bio::SeqFeature::Amplicon->new();
19 isa_ok $amplicon, 'Bio::SeqFeature::Amplicon';
20 isa_ok $amplicon, 'Bio::SeqFeature::SubSeq';
23 # Amplicon with explicit sequence (sequence string)
25 ok $amplicon = Bio::SeqFeature::Amplicon->new(
26     -seq => 'CCCCCAAAAAGGGGGTTTTT',
28 ok $amplicon_seq = $amplicon->seq;
29 isa_ok $amplicon_seq, 'Bio::PrimarySeq';
30 is $amplicon_seq->seq, 'CCCCCAAAAAGGGGGTTTTT';
33 # Amplicon with explicit sequence (sequence object)
35 $fwd_primer = Bio::SeqFeature::Primer->new(
36     -start  => 1,
37     -end    => 4,
38     -strand => 1
41 $rev_primer = Bio::SeqFeature::Primer->new(
42     -seq    => 'GATTA',
43     -start  => 16,
44     -end    => 20,
45     -strand => -1
48 ok $amplicon = Bio::SeqFeature::Amplicon->new(
49     -start      => 1,
50     -end        => 20,
51     -seq        => Bio::PrimarySeq->new( -seq => 'CCCCCAAAAAGGGGGTTTTT' ),
52     -fwd_primer => $fwd_primer,
55 ok $amplicon->rev_primer($rev_primer);
57 is_deeply $amplicon->fwd_primer(), $fwd_primer;
58 is_deeply $amplicon->rev_primer(), $rev_primer;
60 ok $amplicon_seq = $amplicon->seq;
61 isa_ok $amplicon_seq, 'Bio::PrimarySeq';
62 is $amplicon_seq->seq, 'CCCCCAAAAAGGGGGTTTTT';
65 # Amplicon with implicit sequence
67 $template = Bio::Seq->new( -seq => 'ATCGATCGATCCCCCAAAAAGGGGGTTTTTAGCTAGCTAT');
69 ok $amplicon = Bio::SeqFeature::Amplicon->new(
70     -start  => 11,
71     -end    => 30,
72     -strand => -1
75 ok $template->add_SeqFeature($amplicon);
77 ok $amplicon_seq = $amplicon->seq;
78 isa_ok $amplicon_seq, 'Bio::PrimarySeq';
79 is $amplicon_seq->seq, 'AAAAACCCCCTTTTTGGGGG';