ClustalW multiple output files
Hello,
I'm trying to automate clustalw workflow, but as result I need 3 output files .fasta .nexus and .dnd. I've tried many parameters but as result i get always only 2 files .fasta or .nexus and .dnd. The command I'm trying to enter into linux terminal :
clustalw -infile=third.fna -align -type=DNA -score=PERCENT \
-outfile=out.fasta -output=FASTA -outfile=out.nexus \
-output=NEXUS -maxdiv=45
Do anyone have idea how should I fix my command either it's just impossible for clustalw to ouput that amount of files at once?
• 5,970 views
•
link
1 answer
I've figured it out. There's no way to produce extra output file from ClustalW like jrj.healey said. More over there are two simply software's that allow us to convert .fasta file to .nexus format.
pip install seqmagick
seqmagick convert --output-format nexus --alphabet dna inFile.fasta outFile.nexus
also suggestion by a.zielezinski with:
sudo apt-get install readseq
readseq inFile.fasta -all -format=NEXUS -output=outFile.nexus
Thanks for help!
• 0 views
•
link
Log in to answer this question.
I dont't think clustalW is able to do this indeed.
Might be overkill but why not run each cmdline twice: once for the fasta output and once for the nexus dnd output.
Time is valuable for me and my real data could take it very long. Do you know any command line programs that could convert for me fasta to nexus?
fair point.
I know of this one ForCon , pretty old stuff though. I think that there must be more (read: recent) available though. Isn't for instance MEGA not able to do format conversion?
You can use readseq for format conversion (e.g. Nexus > Fasta).
Clustal won’t give you both, but converting between one or the other won’t be difficult. You will always get the .dnd file and one of your two output choices as you’ve observed.
You can then use a small converter (check out BioPython’s SeqIO.convert,
seqretfrom the EMBOSS tools, and many others).