Skip to content

Commit

Permalink
debugging in get_hmm
Browse files Browse the repository at this point in the history
  • Loading branch information
lee212 committed Feb 8, 2016
1 parent d11bf61 commit b33bc17
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions mgescan/nonltr/hmm/get_phmm.pl
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
#!/usr/bin/perl
use strict;
use Getopt::Long;
use Cwd 'abs_path';
use File::Basename;
use lib dirname (dirname abs_path $0) . '/lib';
use Prompt qw(prompt_yn);

my $debug;
$debug = $ENV{'MGESCAN_DEBUG'};

my $seq;
my $phmm_file;
Expand Down Expand Up @@ -48,7 +55,12 @@
($fh, $tmpfile) = tempfile( UNLINK => 1, SUFFIX => '.tbl');
#system("hmmconvert ".$phmm_file." > ".$phmm_file."c");
#system("hmmsearch --noali --domtblout ".$phmm_dir."tbl ".$phmm_file."c ".$pep_file." > /dev/null");
system("hmmsearch --noali --domtblout ".$tmpfile." ".$phmm_file."3 ".$pep_file." > /dev/null");
my $hmm_command = ("hmmsearch --noali --domtblout ".$tmpfile." ".$phmm_file."3 ".$pep_file." > /dev/null");
print $hmm_command if ($debug);
if ($debug && not prompt_yn("Continue?")) {
exit;
}
system($hmm_command);
local $/ = undef;
my $hmm_result = <$fh>;
close $fh;
Expand All @@ -68,7 +80,10 @@
}
}else{
$command = "hmm2search ".$phmm_file." ".$pep_file;
#print $command;
print $command if ($debug);
if ($debug && not prompt_yn("Continue?")) {
exit;
}
$hmm_result = `$command`;

@hmm_results = split(/\n/, $hmm_result);
Expand Down

0 comments on commit b33bc17

Please sign in to comment.