1Bio::Tools::Run::RNAMotUisfe(r3)Contributed Perl DocumenBtiaot:i:oTnools::Run::RNAMotif(3)
2
3
4

NAME

6       Bio::Tools::Run::RNAMotif - Wrapper for local execution of rnamotif,
7       rm2ct, rmfmt, rmprune
8

SYNOPSIS

10         #run rnamotif|rmfmt|rm2ct
11
12         my @params = (
13                     descr => 'pyrR.descr',
14                     fmt   => 'gb',
15                     setvar => 'ctx_maxlen=20',
16                     context => 1,
17                     sh    => 1,
18                    );
19
20         my $factory = Bio::Tools::Run::RNAMotif->new(-program =>'rnamotif',
21                                                      -prune  => 1,
22                                                       @params);
23
24         # Pass the factory a Bio::Seq object or a file name
25         # Returns a Bio::SearchIO object
26
27         #my $searchio = $factory->run("B_sub.gb");
28         my $searchio = $factory->run($seq);
29         while (my $result = $searchio->next_result){
30          while(my $hit = $result->next_hit){
31           while (my $hsp = $hit->next_hsp){
32                   print join("\t", ( $r->query_name,
33                                      $hit->name,
34                                      $hsp->hit->start,
35                                      $hsp->hit->end,
36                                      $hsp->meta,
37                                      $hsp->score,
38                                      )), "\n";
39           }
40          }
41         }
42
43         # Pass a finished report through rmfmt (-a format only)
44         # Returns Bio::AlignIO object
45
46         my $aio = Bio::AlignIO->new(-file=>"rna.msf",-format=>'msf');
47         my $factory =  Bio::Tools::Run::RNAMotif->new('program'=>'rmfmt',
48                                                       'a' => 1);
49         my $alnin = $factory->run('trna.rnamotif');
50
51         my $aln = $alnin->next_aln;
52
53         $aio->write_aln($aln);
54

DESCRIPTION

56       Wrapper module for Tom Macke and David Cases's RNAMotif suite of
57       programs. This allows running of rnamotif, rmprune, rm2ct, and rmfmt.
58       Binaries are available at
59       http://www.scripps.edu/mb/case/casegr-sh-3.5.html.
60
61       This wrapper allows for one to save output to an optional named file or
62       tempfile using the '-outfile_name' or '-tempfile' parameters; this is
63       primarily for saving output from the rm2ct program, which currently
64       does not have a parser available. If both a named output file and
65       tempfile flag are set, the output file name is used. The default
66       setting is piping output into a filehandle for parsing (or output to
67       STDERR, for rm2ct which requires '-verbose' set to 1).
68
69       WARNING: At this time, there is very little checking of parameter
70       settings, so one could have an error if setting the worng parameter for
71       a program. Future versions will likely add some error checking.
72

NOTES ON PROGRAM PARAMETERS

74       All program parameters are currently supported. Of note, the 'D'
75       parameter, used for setting the value of a variable to a value, is
76       changed to 'set_var' to avoid name collisions with 'd' (used for
77       dumping internal data structures).
78

FEEDBACK

80   Mailing Lists
81       User feedback is an integral part of the evolution of this and other
82       Bioperl modules. Send your comments and suggestions preferably to one
83       of the Bioperl mailing lists.  Your participation is much appreciated.
84
85         bioperl-l@bioperl.org                  - General discussion
86         http://bioperl.org/wiki/Mailing_lists  - About the mailing lists
87
88   Support
89       Please direct usage questions or support issues to the mailing list:
90
91       bioperl-l@bioperl.org
92
93       rather than to the module maintainer directly. Many experienced and
94       reponsive experts will be able look at the problem and quickly address
95       it. Please include a thorough description of the problem with code and
96       data examples if at all possible.
97
98   Reporting Bugs
99       Report bugs to the Bioperl bug tracking system to help us keep track
100       the bugs and their resolution.  Bug reports can be submitted via the
101       web:
102
103         http://bugzilla.open-bio.org/
104

AUTHOR - Chris Fields

106        Email: cjfields-at-uiuc-dot-edu
107

CONTRIBUTORS

109        cjfields-at-uiuc-dot-edu
110

APPENDIX

112       The rest of the documentation details each of the object methods.
113       Internal methods are usually preceded with a _
114
115   new
116        Title   : new
117        Usage   : my $wrapper = Bio::Tools::Run::RNAMotif->new(@params)
118        Function: creates a new RNAMotif factory
119        Returns:  Bio::Tools::Run::RNAMotif
120        Args    : list of parameters
121                  -tempfile        => set tempfile flag (default 0)
122                  -outfile_name    => set file to send output to (default none)
123                  -prune           => set rmprune postprocess flag (default 0)
124
125   program_name
126        Title   : program_name
127        Usage   : $factory>program_name()
128        Function: holds the program name
129        Returns:  string
130        Args    : None
131
132   program_dir
133        Title   : program_dir
134        Usage   : $factory->program_dir(@params)
135        Function: returns the program directory, obtained from ENV variable.
136        Returns:  string
137        Args    :
138
139   version
140        Title   : version
141        Usage   : $v = $prog->version();
142        Function: Determine the version number of the program
143        Example :
144        Returns : float or undef
145        Args    : none
146
147   run
148        Title   :  run
149        Usage   :  $obj->run($seqFile)
150        Function:  Runs RNAMotif programs, returns Bio::SearchIO/Bio::AlignIO
151        Returns :  Depends on program:
152                   'rnamotif' - returns Bio::SearchIO
153                   'rmfmt -a' - returns Bio::AlignIO
154                   all others - sends output to outfile, tempfile, STDERR
155
156                   Use search() (for Bio::SearchIO stream) or get_AlignIO() (for
157                   Bio::AlignIO stream) for a uniform Bioperl object interface.
158
159        Args    :  A Bio::PrimarySeqI or file name
160        Note    :  This runs any RNAMotif program set via program()
161
162   search
163        Title   :  search
164        Usage   :  $searchio = $obj->search($seqFile)
165        Function:  Runs 'rnamotif' on seqs, returns Bio::SearchIO
166        Returns :  A Bio::SearchIO
167        Args    :  A Bio::PrimarySeqI or file name
168        Note    :  Runs 'rnamotif' only, regardless of program setting; all other
169                   parameters loaded
170
171   get_AlignIO
172        Title   :  get_AlignIO
173        Usage   :  $aln = $obj->get_AlignIO($seqFile)
174        Function:  Runs 'rmfmt -a' on file, returns Bio::AlignIO
175        Returns :  A Bio::AlignIO
176        Args    :  File name
177        Note    :  Runs 'rmfmt -a' only, regardless of program setting; only file
178                   name and outfile (if any) are set
179
180   tempfile
181        Title   : tempfile
182        Usage   : $obj->tempfile(1)
183        Function: Set tempfile flag.  When set, writes output to a tempfile; this
184                  is overridden by outfile_name() if set
185        Returns : Boolean setting (or undef if not set)
186        Args    : [OPTIONAL] Boolean
187
188   prune
189        Title   : prune
190        Usage   : $obj->prune(1)
191        Function: Set rmprune flag.  When set, follows any searches with a call to
192                  rmprune (this deletes some redundant sequence hits)
193        Returns : Boolean setting (or undef if not set)
194        Args    : [OPTIONAL] Boolean
195
196   _run
197        Title   :   _run
198        Usage   :   $obj->_run()
199        Function:   Internal(not to be used directly)
200        Returns :
201        Args    :
202
203   _setparams
204        Title   :  _setparams
205        Usage   :  Internal function, not to be called directly
206        Function:  creates a string of params to be used in the command string
207        Example :
208        Returns :  string of params
209        Args    :
210
211   _writeSeqFile
212        Title   : _writeSeqFile
213        Usage   : obj->_writeSeqFile($seq)
214        Function: Internal(not to be used directly)
215        Returns : writes passed Seq objects to tempfile, to be used as input
216                  for program
217        Args    :
218
219
220
221perl v5.12.0                      2010-04-29      Bio::Tools::Run::RNAMotif(3)
Impressum