Commit f6a3e51a authored by Sebastien Moretti's avatar Sebastien Moretti
Browse files

Version compliant with ProtoGene RPM 4.2.0 and its manually edited files in /software

parent d536e753
......@@ -28,6 +28,8 @@ use Views; # Non-text outputs, e.g. HTML/CSS
################## CONFIGURATION ##################
#$ENV{'PATH'} .= ':/mnt/local/bin/:./'; # Additional path for executables
my $cachePath = '/scratch/fhgfs/tcoffee/ProtoGene_Cache'; # Cache directory
my $cacheStorageTime = 15; # Do not update sequences younger than X days
......@@ -52,7 +54,7 @@ my $blast_param = { 'evalue' => 0.05,
###################################################
my $VERSION = '4.2.1';
my $VERSION = '4.2.0';
my $webblast_exe = '/mnt/common/share/ProtoGene/webblast.pl';
my $blast_exe = 'blastall'; # Or wu-blastall for Wu-BLAST; for local blast usage
......@@ -60,8 +62,7 @@ my $exonerate_exe = 'exonerate'; # Exonerate 1.0 because current parser on
################## Option management
my ($msa, $revtrans, $pep, $hideBOJ, $run_name, $template, $lim) = ('', 0, 0, 0, '', '', 0);
my ($cache, $cleancache) = ('update', 'update');
my ($msa, $revtrans, $pep, $hideBOJ, $run_name, $template, $lim, $cache) = ('', 0, 0, 0, '', '', 0, 'update');
my ($debug, $tmp) = (0, 0);
my ($db, $species, $local, $giga) = ($blast_param->{'db1'}, $blast_param->{'species'}, 0, 0);
my %opts = ('msa|in=s' => \$msa, # Input sequences
......@@ -71,8 +72,7 @@ my %opts = ('msa|in=s' => \$msa, # Input sequences
'run_name=s' => \$run_name, # Use another name, instead of input seq name, for result files
'template=s' => \$template, # Use a template file
'lim=i' => \$lim, # Limit number of input query sequences
'cachedir=s' => \$cache, # Cache directory
'cacheclean=s' => \$cleancache, # Cache behavior
'cache=s' => \$cache, # Cache behavior
'orgm|species=s' => \$species, # Organism(s) to blast against
'db|database=s' => \$db, # Database to blast against
......@@ -89,7 +89,6 @@ my %opts = ('msa|in=s' => \$msa, # Input sequences
'tmp' => \$tmp, # To keep traces of fake intermediate files like fake xml from NCBI, fake aln, ...
);
my $test_option_values = Getopt::Long::GetOptions(%opts);
$revtrans = 1 if ( $revtrans eq '' ); # Allow revtrans to be a boolean or a string option (for tcoffee web server)
################## Short help message
......@@ -97,13 +96,13 @@ if ( !$test_option_values || ($msa eq '' && $cache ne 'empty' && $cache ne 'old'
print {*STDERR} "\n\tCannot open the MSA file in FASTA format
\tTry: $0 --msa=path_of_the_fasta_msa_file [Options]
\tOptions: --orgm =All_organisms, Bacteria, Viruses, Vertebrata,
\tOptions: --orgm=All_organisms, Bacteria, Viruses, Vertebrata,
\t Eukaryota, Mammalia, Primates, Homo_sapiens,
\t Gallus_gallus, Bos_taurus, Escherichia_coli,
\t Arabidopsis_thaliana, Mus_musculus,
\t Drosophila_Melanogaster, ...
\t default is '$blast_param->{'species'}'
\t --db =nr, pdb, swissprot, refseq_protein
\t --db=nr, pdb, swissprot, refseq_protein
\t default is '$blast_param->{'db1'}'
\t --local to execute a local BLAST query with
\t --db=path_for_a_local_db_blast_formated\n
......@@ -114,10 +113,9 @@ if ( !$test_option_values || ($msa eq '' && $cache ne 'empty' && $cache ne 'old'
\t They are removed from the alignement by default
\t --pep adds the original peptide query beneath the
\t back-translated sequence
\t --cachedir ='own_PATH_directory'
\t (default is '$cachePath')
\t --cacheclean=none, update, use, old, empty
\t to select the cache behavior (default is 'update')\n
\t --cache=none, update, use, 'own_PATH_directory', old, empty
\t to select the cache mode
\t default is 'update'\n
\t --debug prints extra information when running
\t --version prints version information
\t --help prints a full help message\n\n";
......@@ -508,13 +506,7 @@ with these options available:
=item I<--pep> to add the original peptide query beneath the back-translated sequence
=item I<--cachedir>=your_own_path_directory
=item cachedir sets cache directory
=item I<--cacheclean>=none, update, use, old, empty
=item cacheclean manages cache behavior
=item I<--cache>=none, update, use, own_path_directory, old, empty
=item none: no cache usage, none temporary files are stored
......@@ -522,6 +514,8 @@ with these options available:
=item use: force use cache, whatever the age of files
=item own_path_directory: use my own directory, and its files
=item old: remove the old files in the cache directory
=item empty: empty completely the cache directory
......@@ -552,9 +546,9 @@ PROTOGENE re-builds the original alignment with nucleotidic information it has g
=item -
=item I<exonerate> version 2 from http://www.ebi.ac.uk/~guy/exonerate/
=item I<exonerate> from http://www.ebi.ac.uk/~guy/exonerate/
=item I<blast> from ftp://ftp.ncbi.nih.gov/blast/executables/LATEST/
=item I<blast> from http://www.ncbi.nlm.nih.gov/BLAST/download.shtml or http://blast.wustl.edu/
=back
......@@ -562,9 +556,9 @@ PROTOGENE re-builds the original alignment with nucleotidic information it has g
=over 8
=item version 4.2.1
=item version 4.2.0
=item on Dec 18th, 2013
=item on Aug 08th, 2013
=back
......@@ -842,7 +836,7 @@ sub fetch {
my $content = get($url);
print {*STDERR} "[$content]\n\n" if ($debug);
if ( defined $content ){
next XML if ( $content =~ /<ERROR>/i );
next XML if ( $content =~ /<ERROR>/i && $content !~ /<ERROR>Can not find description/i );
return $content;
}
}
......@@ -905,7 +899,7 @@ sub protGI2NTGIs{
my $ntGIs = '';
my $geneID = '';
my $content = fetch("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/elink.fcgi?dbfrom=protein&db=nuccore,nucleotide,gene&id=$protGI&retmode=xml&tool=ProtoGene&email=smoretti\@unil.ch");
my $content = fetch("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/elink.fcgi?dbfrom=protein&db=nuccore,gene&id=$protGI&retmode=xml&tool=ProtoGene&email=smoretti\@unil.ch");
my @xml = split("\n", $content);
my $flag = 0;
......@@ -1438,7 +1432,7 @@ sub revtransBuilding{
$readyname =~ s{ +}{ }g;
print OUT "$readyname\n";
if ( $revtrans ){
if ( $revtrans==1 ){
my $final_seq = '';
for(my $w=0; $w < length($original_seq[$order]); $w++){
my $aa = substr($original_seq[$order], $w, 1);
......
......@@ -161,7 +161,7 @@ elsif ( $distant==1 ){
@list_pdb = &WEB_BLAST($query_file, $Eval, $program, $database, $matrix, $method, $align, $orgn, $filter);
}
else {
die " Report bug to armougom\@igs.cnrs-mrs.fr\n";
die " Report bug to poirot\@igs.cnrs-mrs.fr\n";
}
#-- PARSE BLAST RESULTS -> MAKE A PDB_ID LIST
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment