This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Stand-Alone Clustalw Generating No Results!!

here is my php code:

$input_filename = "C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\seq.txt";
$output_filename = "C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\result.aln";
$command = "C:\Program Files\ClustalW2>clustalw2 -INFILE=".$input_filename." -OUTFILE=".$output_filename;
exec($command);

However this does not generate an alignment file as required! However it generates sum file named clustalw2 but writes nothin to this file as well.. Any help will be appreciated

Also i tried the same code in cmd bt it generates an error which states "Error: parameter required for /outfile"

clustalw multiple

From the command line, try to set the -TYPE of molecule and the -OUTPUT format and see if that helps. Also, I don't code with php but it looks like there may be an issue with the quoting in the command. Maybe it looks strange because I don't code in php or use a PC ;)

@SES: After adding the -type of molecule it gives output in the cmd and also generates a result.aln file.. however it still fails to generate a file via the php script

1 answer

Finally got it working.. Here is the code..

$res = exec('C:\\clustalw2 -INFILE=seq.fasta -ALIGN -TYPE=Protein -OUTFILE=res.aln',$out);
print_r($out);

the problem was > before the executable. Also i found that clustalw has a bug which does not read files on windows desktop.. So shifted my files to C drive... and got the code running!!!

Log in to answer this question.