Connect To Stand-Alone Clustalw Using Php Commands
3
1
Entering edit mode
12.8 years ago
Nikita ▴ 10

I have a text file on my local computer which contains all the sequences i wish to align. However i want to know how do i give this file to the stand-alone clustalw using script (I'm, mainly working with php scripts) and generate results in another text file. Any help will be appreciated!

clustalw multiple • 3.5k views
ADD COMMENT
2
Entering edit mode
12.8 years ago
Hamish ★ 3.3k

If you run ClustalW with the '-help' option it will provide details of the command-line options which can be used. The complete help text, which includes details of all the command-line options, can be found on the Clustal web site: http://www.clustal.org/

A convenient way of seeing how to construct the command-line is to run a sample job on the EMBL-EBI's ClustalW2 service, and look at the "Submission Details" tab of the result. This details the parameters and the command-line used to run the job.

As for calling ClustalW, or any other program, from a PHP script... see the PHP: system documentation.

ADD COMMENT
1
Entering edit mode
12.8 years ago
Pasta ★ 1.3k

Use the exec() function to call clustalw:

 $command = "clustalw2 -INFILE=".$input_filename." -OUTFILE=".$output_filename;

 exec($command);
ADD COMMENT
0
Entering edit mode

@pasta : I tried this command in commandline but it gives me a error saying "paramter required for /infile". Also my php script returns no value.. Please help!

ADD REPLY
0
Entering edit mode
12.8 years ago
Free Man ▴ 180

Just use php to call cmd commands. php may have commands like exec and system.[?] However I do not know php very well, I am using python and clustalw2, to call clustalw2 using python script like this (a example of DNA alignment):[?][?] import os[?] os.popen('clustalw2 -INFILE=input_filename -PWDNAMATRIX=IUB -TYPE=DNA -OUTPUT=FASTA -OUTFILE=output_filename')

[?] note: input_filename and output_filename stand for input and output file.

ADD COMMENT

Login before adding your answer.

Traffic: 1653 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6