2 # BioPerl module for Bio::SeqFeature::SiRNA::Pair
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
6 # Cared for by Donald Jackson, donald.jackson@bms.com
8 # Copyright Donald Jackson
10 # You may distribute this module under the same terms as perl itself
12 # POD documentation - main docs before the code
16 Bio::SeqFeature::SiRNA::Oligo - Perl object for small inhibitory RNAs.
20 use Bio::SeqFeature::SiRNA::Oligo;
22 my $oligo = Bio::SeqFeature::SiRNA::Oligo->
23 new( -seq => 'AUGCCGAUUGCAAGUCAGATT',
27 -primary => 'SiRNA::Oligo',
28 -source_tag => 'Bio::Tools::SiRNA',
29 -tag => { note => 'A note' }, );
31 # normally two complementary Oligos are combined in an SiRNA::Pair
33 $pair->antisense($oligo);
38 Object methods for single SiRNA oligos - inherits
39 L<Bio::SeqFeature::Generic>. Does B<not> include methods for designing
40 SiRNAs - see L<Bio::Tools::SiRNA> for that.
44 L<Bio::Tools::SiRNA>, L<Bio::SeqFeature::SiRNA::Pair>.
50 User feedback is an integral part of the evolution of this and other
51 Bioperl modules. Send your comments and suggestions preferably to
52 the Bioperl mailing list. Your participation is much appreciated.
54 bioperl-l@bioperl.org - General discussion
55 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
59 Please direct usage questions or support issues to the mailing list:
61 I<bioperl-l@bioperl.org>
63 rather than to the module maintainer directly. Many experienced and
64 reponsive experts will be able look at the problem and quickly
65 address it. Please include a thorough description of the problem
66 with code and data examples if at all possible.
70 Report bugs to the Bioperl bug tracking system to help us keep track
71 of the bugs and their resolution. Bug reports can be submitted via
74 https://github.com/bioperl/bioperl-live/issues
78 Donald Jackson (donald.jackson@bms.com)
82 The rest of the documentation details each of the object methods.
83 Internal methods are usually preceded with a _
87 package Bio
::SeqFeature
::SiRNA
::Oligo
;
92 use base
qw(Bio::SeqFeature::Generic);
94 our @ARGNAMES = qw(SEQ START END STRAND PRIMARY SOURCE_TAG SCORE TAG
95 SEQ_ID ANNOTATION LOCATION);
100 Usage : my $sirna_oligo = Bio::SeqFeature::SiRNA::Oligo->new();
101 Function : Create a new SiRNA::Oligo object
102 Returns : Bio::Tools::SiRNA object
103 Args : -seq sequence of the RNAi oligo. Should be in RNA alphabet
104 except for the final TT overhang.
105 -start start position
108 -primary primary tag - defaults to 'SiRNA::Oligo'
111 -tag a reference to a tag/value hash
112 -seq_id the display name of the sequence
113 -annotation the AnnotationCollectionI object
114 -location the LocationI object
116 Currently passing arguments in gff_string or gff1_string is not
117 supported. SiRNA::Oligo objects are typically created by a design
118 algorithm such as Bio::Tools::SiRNA
123 my ($proto, @args) = @_;
125 my $pkg = ref($proto) || $proto;
129 my $self = $pkg->SUPER::new
();
131 @args{@ARGNAMES} = $self->_rearrange(\
@ARGNAMES, @args);
132 # default primary tag
133 $args{'PRIMARY'} ||= 'SiRNA::Oligo';
135 $args{'PRIMARY'} && $self->primary_tag($args{'PRIMARY'});
136 $args{'SOURCE_TAG'} && $self->source_tag($args{'SOURCE_TAG'});
137 $args{'SEQNAME'} && $self->seqname($args{'SEQNAME'});
138 $args{'SEQ'} && $self->seq($args{'SEQ'});
139 $args{'ANNOTATION'} && $self->annotation($args{'ANNOTATION'});
140 $args{'LOCATION'} && $self->location($args{'LOCATION'});
141 defined($args{'START'}) && $self->start($args{'START'});
142 defined($args{'END'}) && $self->end($args{'END'});
143 defined($args{'STRAND'}) && $self->strand($args{'STRAND'});
144 defined($args{'SCORE'}) && $self->score($args{'SCORE'});
147 foreach my $t ( keys %{ $args{'TAG'} } ) {
148 $self->add_tag_value($t, $args{'TAG'}->{$t});
158 Usage : my $oligo_sequence = $sirna_oligo->seq();
159 Purpose : Get/set the sequence of the RNAi oligo
160 Returns : Sequence for the RNAi oligo
161 Args : Sequence of the RNAi oligo (optional)
162 Note : Overloads Bio::SeqFeature::Generic seq method - the oligo and
163 parent sequences are different.
164 Note that all but the last 2 nucleotides are RNA (per Tuschl and colleagues).
165 SiRNA::Pair objects are typically created by a design algorithm such as
171 my ($self, $seq) = @_;
174 if ($seq =~ /[^ACGTUacgtu]/ ) {
175 warn "Sequence contains illegal characters";
179 $self->{'seq'} = $seq;
182 return $self->{'seq'};