This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Can I input sequences without a file clustalw2

Hi all, I'm using clustalw2:

I know that clustal requires a file to read and it outputs to a file. Is there way I can just supply the sequences as a parameter, for example instead of

clustalw2 input.fasta -OUTPUT=PHYLIP -GAPOPEN=1 -GAPEXT=20

can I just somehow replace the file input.fast with just two sequences instead? And get it to output the resulting alignment without writing to a file. The reason why I would like to do this is because I want to call this program from PERL script and I thus I simply want to provide the input and capture the output.

thanks in advance!

Alex

clustal alignment dna-alignment

1 answer

The docs of clustalw2 explicitly say that it requires the input sequences to be in a file. I think there's no way to get around that unless you edit the clustalw2 source code. However, since you are scripting this with Perl, you can just write the input sequences first into a file and then feed it to clustalw2.

Log in to answer this question.