Question: ClustalW multiple output files
2
gravatar for piotr.ultimo
7 months ago by
piotr.ultimo40
piotr.ultimo40 wrote:

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?

ADD COMMENTlink modified 7 months ago • written 7 months ago by piotr.ultimo40
3

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, seqret from the EMBOSS tools, and many others).

ADD REPLYlink written 7 months ago by jrj.healey12k

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.

ADD REPLYlink written 7 months ago by lieven.sterck5.4k

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?

ADD REPLYlink written 7 months ago by piotr.ultimo40
2

You can use readseq for format conversion (e.g. Nexus > Fasta).

ADD REPLYlink written 7 months ago by a.zielezinski8.7k

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?

ADD REPLYlink written 7 months ago by lieven.sterck5.4k
5
gravatar for piotr.ultimo
7 months ago by
piotr.ultimo40
piotr.ultimo40 wrote:

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!

ADD COMMENTlink written 7 months ago by piotr.ultimo40
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1631 users visited in the last hour