Bioinf
view release on metacpan or search on metacpan
my @in=@_;
my ($FASTA_index, $FASTA, $where_index, %index, $question, $i,
$s,$t,$fasta,$index_file, $all, $species,$target, $matched, $seq, $gdf, $list, $count, $create);
my $SEQ_size_max=100000000;
if(@_ < 1){ &HELP_fetch_seq;
}else{
F: for($t=0; $t<@in; $t++){ #'''''''''''' PROMPT ARGV processing ''''''''''''''''''
if($in[$t]=~/^\-c$/i){
$create=1; splice(@in, $t, 1); $t--;
print "\n You should provide database\(e.g, seq.dat\) file with this opt, I guess you did\n";
print "\n If you wanted to make an index with any fasta db, you also have to\n";
print " give the file name. e.g:\n $0 -c /DB/swiss/seq.dat\n";
print " or $0 -c my_db.fa\n\n";
next; }
if($in[$t]=~/^\-af$/){ $fasta=$all=1; splice(@in, $t, 1); $t--; next; }
if($in[$t]=~/^\-afs$/){ $species=$fasta=$all=1; splice(@in, $t, 1); $t--; next; }
if($in[$t]=~/^\-ag$/){ $gdf=$all=1; splice(@in, $t, 1); $t--; next; }
if($in[$t]=~/^\-g$/){ $gdf=1; splice(@in, $t, 1); $t--; next; }
if($in[$t]=~/^\-f$/i){ $fasta=1; splice(@in, $t, 1); $t--; next; }
if($in[$t]=~/^\-a$/i){ $all=1; splice(@in, $t, 1); $t--; next; }
my(%hash1)=%out;
my(%hash2)=%{$in[$k]};
my(@names1)= sort keys %hash1;
my(@names2)= sort keys %hash2;
$name1 = $names1[0];
$name2 = $names2[0];
@str1=split(/\||\,/, $hash1{$names1[0]});
@str2=split(/\||\,/, $hash2{$names2[0]});
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Trying to guess the correct gap char
#_____________________________________________________
if($hash2{$names2[0]}=~/_/){
$gap_chr='_';
}elsif($hash2{$names2[0]}=~/(\W)\W/){
$gap_chr=$1;
}
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# If I fail to split string by ',', then split by ''
#_____________________________________________________
#__________________________________________________________________________________
@your_genome_or_db_to_analyse_file=@{&parse_arguments(1)};
print "\n\n\n# (2) geanfammer_main (with $algorithm): \@your_genome_or_db_to_analyse_file are(is)\n";
print "\n => @your_genome_or_db_to_analyse_file with $algorithm. Min domain size is \"$length_thresh\"\n\n\n";
if(@your_genome_or_db_to_analyse_file < 1){
print "\n# (E) geanfammer_main: ERROR!\n";
print "\n# Dear $ENV{'USER'}, $0: failed to find input file!\n
Did you put FASTA format DB file as input?\n
Or I guess your INPUT file DOES NOT exist in PWD.\n\n";
print " As like: $0 MG.fa \n\n\n";
print chr(7);
exit;
}
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
# Checking if they have 'fasta' or 'ssearch' in the path
#__________________________________________________________________________________
if($algorithm=~/\/([^\/]+) *$/){
print "\n# Checking \$algorithm ($algorithm) name\n";
my @in=@_;
my ($FASTA_index, $FASTA, $where_index, %index, $question, $i,
$s,$t,$fasta,$index_file, $all, $species,$target, $matched, $seq, $gdf, $list, $count, $create);
my $SEQ_size_max=100000000;
if(@_ < 1){ &HELP_fetch_seq;
}else{
F: for($t=0; $t<@in; $t++){ #'''''''''''' PROMPT ARGV processing ''''''''''''''''''
if($in[$t]=~/^\-c$/i){
$create=1; splice(@in, $t, 1); $t--;
print "\n You should provide database\(e.g, seq.dat\) file with this opt, I guess you did\n";
print "\n If you wanted to make an index with any fasta db, you also have to\n";
print " give the file name. e.g:\n $0 -c /DB/swiss/seq.dat\n";
print " or $0 -c my_db.fa\n\n";
next; }
if($in[$t]=~/^\-af$/){ $fasta=$all=1; splice(@in, $t, 1); $t--; next; }
if($in[$t]=~/^\-afs$/){ $species=$fasta=$all=1; splice(@in, $t, 1); $t--; next; }
if($in[$t]=~/^\-ag$/){ $gdf=$all=1; splice(@in, $t, 1); $t--; next; }
if($in[$t]=~/^\-g$/){ $gdf=1; splice(@in, $t, 1); $t--; next; }
if($in[$t]=~/^\-f$/i){ $fasta=1; splice(@in, $t, 1); $t--; next; }
if($in[$t]=~/^\-a$/i){ $all=1; splice(@in, $t, 1); $t--; next; }
my(%hash1)=%out;
my(%hash2)=%{$in[$k]};
my(@names1)= sort keys %hash1;
my(@names2)= sort keys %hash2;
$name1 = $names1[0];
$name2 = $names2[0];
@str1=split(/\||\,/, $hash1{$names1[0]});
@str2=split(/\||\,/, $hash2{$names2[0]});
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Trying to guess the correct gap char
#_____________________________________________________
if($hash2{$names2[0]}=~/_/){
$gap_chr='_';
}elsif($hash2{$names2[0]}=~/(\W)\W/){
$gap_chr=$1;
}
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# If I fail to split string by ',', then split by ''
#_____________________________________________________
#__________________________________________________________________________________
@your_genome_or_db_to_analyse_file=@{&parse_arguments(1)};
print "\n\n\n# (2) geanfammer_main (with $algorithm): \@your_genome_or_db_to_analyse_file are(is)\n";
print "\n => @your_genome_or_db_to_analyse_file with $algorithm. Min domain size is \"$length_thresh\"\n\n\n";
if(@your_genome_or_db_to_analyse_file < 1){
print "\n# (E) geanfammer_main: ERROR!\n";
print "\n# Dear $ENV{'USER'}, $0: failed to find input file!\n
Did you put FASTA format DB file as input?\n
Or I guess your INPUT file DOES NOT exist in PWD.\n\n";
print " As like: $0 MG.fa \n\n\n";
print chr(7);
exit;
}
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
# Checking if they have 'fasta' or 'ssearch' in the path
#__________________________________________________________________________________
if($algorithm=~/\/([^\/]+) *$/){
print "\n# Checking \$algorithm ($algorithm) name\n";
( run in 0.763 second using v1.01-cache-2.11-cpan-748bfb374f4 )