subhomoi.bk has asked for the wisdom of the Perl Monks concerning the following question:

i m new to bioperl..plz help me on this..when i used the following code...an error msg comes "Target sequence not defined"..so where is $bio_seq? i want to design a siRNA prediction tool

use Bio::Tools::SiRNA; my $sirna_designer = Bio::Tools::SiRNA->new( -target => $bio_seq, -rules => 'tuschl' ); <p> where should i put the target sequence</p> my @pairs = $sirna_designer->design; foreach $pair (@pairs) { my $sense_oligo_sequence = $pair->sense->seq; my $antisense_oligo_sequence = $pair->antisense->seq; print join ("\t", $pair->start, $pair->end, $pair->rank, $sense_oligo_sequence, $antisense_oligo_sequence), " +\n"; }

Replies are listed 'Best First'.
Re: bioperl problem
by vivekkrish (Initiate) on Jun 03, 2011 at 20:38 UTC

    Comment made by 'Anonymous Monk' is incorrect.

    $bio_seq is infact a Bio::Seq::RichSeq object
    This object is an input sequence from a rich sequence database such as GenBank, SwissProt and EMBL.
    You can create such an object using the following code snippet (code pulled from cpan docs):

    $seq = Bio::Seq::RichSeq->new( -seq => 'ATGGGGGTGGTGGTACCCT', -id => 'human_id', -accession_number => 'AL000012', );

    There is documentation available for Bio::Tools::SiRNA here

    Hope this is useful!!

Re: bioperl problem
by Anonymous Monk on Jun 03, 2011 at 20:13 UTC

    In your snippet of code, $bio_seq is a Bio::SeqIO object pointing to an output FASTA file

    You can create such an object like so:

    use strict; use warnings; use Bio::SeqIO; my $bio_seq = Bio::SeqIO->new( -file => '>outputfilename', -format => 'Fasta' );
    where: 'outputfilename' is the name of your desired output file. Friendly reminder: always remember to use the 'strict' pragma and enable 'warnings' to make sure you can identify problem areas in your code.