[Bioperl-l] Bio::Tools::TMHMM;

Frank Schwach fs5 at sanger.ac.uk
Thu Sep 9 10:28:51 UTC 2010


I haven't used that module myself but it appears to be a parser for
results from TMHMM, i.e. you don't feed it the FASTA file but the output
from TMHMM after it was run.
To run TMHMM you should use Bio::Tools::Run::Tmhmm
http://search.cpan.org/~cjfields/BioPerl-run-1.6.1/Bio/Tools/Run/Tmhmm.pm

Follow the synopsis to feed the tool with your sequences. You can learn
how to read a FASTA file and access each sequence in a loop here: 
http://www.bioperl.org/wiki/HOWTO:SeqIO#Working_Examples

Essentially it boils down to:

use Bio::SeqIO;
my $file = shift; # to get a file path from command line
my $inseq = Bio::SeqIO->new(-file   => "<$file",-format => 'FASTA' );
while (my $seq = $inseq->next_seq) {
  print $seq->accession_number,"\n";
}

as an example for printing out accession numbers from $seq, which is a Bio::Seq object. 
So what you have to do now is to feed each of those Bio::Seq objects into your TMHMM runner. 

Frank



On Thu, 2010-09-09 at 11:27 +0200, _Lelieveld, Stefan - s1012635 wrote:
> Hi, 
> 
> I am a bio-informatics student working on a new project. For this project I need to get the TMHMM prediction of a list of proteins (in fasta format). 
> I came across the Bio::Tools::TMHMM; package for BioPerl which looked promesing. The problem is I lack the advanced knowlegde of perl to get this package to work. So far we had courses in Python and Java not in Perl. 
> 
> http://search.cpan.org/~birney/bioperl-1.2.3/Bio/Tools/Tmhmm.pm : 
> use Bio::Tools::Tmhmm; 
> my $parser = new Bio::Tools::Tmhmm(-fh =>$filehandle ); 
> while( my $tmhmm_feat = $parser->next_result ) { 
> #do something 
> #eg 
> push @tmhmm_feat, $tmhmm_feat; 
> } 
> 
> How do I feed a input.txt(containing the proteins as fasta format) to this parser and how do I save the output? 
> 
> cheers! 
> 
> Stefan Lelieveld 
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l



-- 
 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 



More information about the Bioperl-l mailing list