[Bioperl-l] Temporary name of hmmbuild model

Kary Ann Del Carmen Soriano Ocana Kary at ioc.fiocruz.br
Fri Apr 22 15:58:40 EDT 2005


Dear all:
I am working with hmmbuild, it is working very well, but the problem is, that it is generating the name model as a temporary name, and it should generate it whit the same name of the origin file.
This is a bit problem because after this I have worked whit hmmpfam and the outfile is very confuse, for the temporary name.
The hmmbuildpfam output listed below shows in the second column the temporary/processing names, and not the real "description
name"... those names are generated when we build the HMM models with
hmmbuild/hmmcalibrate (maybe they are extracted from temporary files
then stored in our database like that or In my mind it is reading the clustalw alignment as temporary)... not sure how we could catch
the real names.. any further tips would be greatly appreciated.

[kary at vivax MGE-Tryp_Mobile_Genetic_Elements_14_01_05]$ more
searchio.out
tr|Q8GPE3       lEwFFhiGV0      -108    1.4e-05 Tnp-IS1191 -
Streptococcus thermophilus.
tr|Q8GPE3       Uge97N6Hov      1229    0.0e+00 Tnp-IS1191 -
Streptococcus thermophilus.
tr|Q8GPE3       5o31pMTfTD      358     2.9e-106        Tnp-IS1191 -
Streptococcus thermophilus.
tr|Q8GPE3       S9idxzhdAK      108     4.4e-31 Tnp-IS1191 -
Streptococcus thermophilus.

And this is the script of hmmbuild.
#!/usr/bin/perl -w  
#'/usr/local/bin/hmmbuild';
use lib "/usr/local/bioperl14";
use lib "/usr/local/bioperl-run-1.4";

#use Bio::Tools::Run::WrapperBase;
use Bio::Tools::Run::Hmmer;
#use Bio::Tools::Run::Alignment::Clustalw;
use strict;

my $outfile;
open (LOG, ">>./log_file_hmmerbuild");
my $in;
my @tree;
my $street;

my $dirname = "/home/kary/public_html/inserir_dados/trypanosoma_5B_0603_CLUSTALW_files_teste";
open (DH, "find $dirname |") or die "Cannot open $dirname: $!";

while ($in=<DH>){
chomp ($in);

    	for ($in =~ /\_(aln)/) {
		@tree = split(/[\/]/, $in);
		my $aln = pop @tree;
		my $street = join "/", @tree,"\n";
		chomp ($street);
		
	
	print LOG "File $street$aln launched and ";
	&hmm_build($in);
	
	
	}
	
}


#############################################################################################################################################
sub hmm_build {
	my($aln) = @_;
	print "Your input file is: $aln\n";
	my $name_outfile = "$aln";
	$name_outfile =~ s/_aln//;
	my $outfile = "$name_outfile.hmm";
	print LOG "Your output file is: $outfile\n";
		
	#build a hmm using hmmbuild
	my $aio = Bio::AlignIO->new(-file=>"$in",-format=>'clustalw') or die print "Error for open the file";
	$aln = $aio->next_aln;
	my $factory =  Bio::Tools::Run::Hmmer->new('program'=>'hmmbuild','hmm'=>$outfile);
	$factory->run($aln);
	&hmm_calibrate($in);
}
#############################################################################################################################################
sub hmm_calibrate {
	my($aln) = @_;
	my $name_outfile = "$aln";
	$name_outfile =~ s/.aln//;
	my $outfile = "$name_outfile.hmm";
	print LOG "Your output file is: $outfile\n";
	#calibrate the hmm
	my $factory =  Bio::Tools::Run::Hmmer->new('program'=>'hmmcalibrate','hmm'=>$outfile);
	$factory->run();
}
#############################################################################################################################################


Kindest regards, 
Kary



More information about the Bioperl-l mailing list