This file is indexed.

/usr/share/perl5/Bio/SeqFeature/Amplicon.pm is in libbio-perl-perl 1.6.923-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
#
# BioPerl module for Bio::SeqFeature::Amplicon
#
# Please direct questions and support issues to <bioperl-l@bioperl.org> 
#
# Copyright Florent Angly
#
# You may distribute this module under the same terms as perl itself


=head1 NAME

Bio::SeqFeature::Amplicon - Amplicon feature

=head1 SYNOPSIS

  # Amplicon with explicit sequence
  use Bio::SeqFeature::Amplicon;
  my $amplicon = Bio::SeqFeature::Amplicon->new( 
      -seq        => $seq_object,
      -fwd_primer => $primer_object_1,
      -rev_primer => $primer_object_2,
  );

  # Amplicon with implicit sequence
  use Bio::Seq;
  my $template = Bio::Seq->new( -seq => 'AAAAACCCCCGGGGGTTTTT' );
  $amplicon = Bio::SeqFeature::Amplicon->new(
      -start => 6,
      -end   => 15,
  );
  $template->add_SeqFeature($amplicon);
  print "Amplicon start   : ".$amplicon->start."\n";
  print "Amplicon end     : ".$amplicon->end."\n";
  print "Amplicon sequence: ".$amplicon->seq->seq."\n";
  # Amplicon sequence should be 'CCCCCGGGGG'

=head1 DESCRIPTION

Bio::SeqFeature::Amplicon extends L<Bio::SeqFeature::Subseq> to represent an
amplicon sequence and optional primer sequences.

=head1 FEEDBACK

=head2 Mailing Lists

User feedback is an integral part of the evolution of this and other
Bioperl modules. Send your comments and suggestions preferably to one
of the Bioperl mailing lists.  Your participation is much appreciated.

  bioperl-l@bioperl.org                  - General discussion
  http://bioperl.org/wiki/Mailing_lists  - About the mailing lists

=head2 Support 

Please direct usage questions or support issues to the mailing list:

I<bioperl-l@bioperl.org>

rather than to the module maintainer directly. Many experienced and 
reponsive experts will be able look at the problem and quickly 
address it. Please include a thorough description of the problem 
with code and data examples if at all possible.

=head2 Reporting Bugs

Report bugs to the Bioperl bug tracking system to help us keep track
the bugs and their resolution.  Bug reports can be submitted via 
the web:

  https://redmine.open-bio.org/projects/bioperl/

=head1 AUTHOR

Florent Angly <florent.angly@gmail.com>

=head1 APPENDIX

The rest of the documentation details each of the object
methods. Internal methods are usually preceded with a _

=cut


package Bio::SeqFeature::Amplicon;

use strict;

use base qw(Bio::SeqFeature::SubSeq);

=head2 new

 Title   : new()
 Usage   : my $amplicon = Bio::SeqFeature::Amplicon( -seq => $seq_object );
 Function: Instantiate a new Bio::SeqFeature::Amplicon object
 Args    : -seq        , the sequence object or sequence string of the amplicon (optional)
           -fwd_primer , a Bio::SeqFeature primer object with specified location on amplicon (optional)
           -rev_primer , a Bio::SeqFeature primer object with specified location on amplicon (optional)
 Returns : A Bio::SeqFeature::Amplicon object

=cut

sub new {
    my ($class, @args) = @_;
    my $self = $class->SUPER::new(@args);
    my ($fwd_primer, $rev_primer) =
        $self->_rearrange([qw(FWD_PRIMER REV_PRIMER)], @args);
    $fwd_primer && $self->fwd_primer($fwd_primer);
    $rev_primer && $self->rev_primer($rev_primer);
    return $self;
}  


sub _primer {
    # Get or set a primer. Type is either 'fwd' or 'rev'.
    my ($self, $type, $primer) = @_;
    if (defined $primer) {
        if ( not(ref $primer) || not $primer->isa('Bio::SeqFeature::Primer') ) {
            $self->throw("Expected a primer object but got a '".ref($primer)."'\n");
        }
        if ( not defined $self->location ) {
            $self->throw("Location of $type primer on amplicon is not known. ".
                "Use start(), end() or location() to set it.");
        }
        $primer->primary_tag($type.'_primer');
        $self->add_SeqFeature($primer);
    }
    return (grep { $_->primary_tag eq $type.'_primer' } $self->get_SeqFeatures)[0];
}    


=head2 fwd_primer

 Title   : fwd_primer
 Usage   : my $primer = $feat->fwd_primer();
 Function: Get or set the forward primer. When setting it, the primary tag
           'fwd_primer' is added to the primer and its start, stop and strand
           attributes are set if needed, assuming that the forward primer is
           at the beginning of the amplicon and the reverse primer at the end.
 Args    : A Bio::SeqFeature::Primer object (optional)
 Returns : A Bio::SeqFeature::Primer object

=cut

sub fwd_primer {
    my ($self, $primer) = @_;
    return $self->_primer('fwd', $primer);
}


=head2 rev_primer

 Title   : rev_primer
 Usage   : my $primer = $feat->rev_primer();
 Function: Get or set the reverse primer. When setting it, the primary tag
          'rev_primer' is added to the primer.
 Args    : A Bio::SeqFeature::Primer object (optional)
 Returns : A Bio::SeqFeature::Primer object

=cut

sub rev_primer {
    my ($self, $primer) = @_;
    return $self->_primer('rev', $primer);
}


1;