faircloth-lab / phyluce

software for UCE (and general) phylogenomics
http://phyluce.readthedocs.org/
Other
78 stars 49 forks source link

phyluce_align_format_nexus_files_for_raxml produces empty phylip file #176

Closed Jesseholmes closed 4 years ago

Jesseholmes commented 4 years ago

Hello,

I've been running phyluce_align_format_nexus_files_for_raxml on my cleaned and trimmed aligned nexus files. I receive no errors, but the phylip file produced is empty. Here is the code I'm using:

phyluce_align_format_nexus_files_for_raxml --alignments /panfs/pfs.local/scratch/bi/j350h394/Apodidae_UCE/collocalia_esculenta/mafft-nexus-reduced/spades-inc-75-missing --output /panfs/pfs.local/scratch/bi/j350h394/Apodidae_UCE/collocalia_esculenta/spades-inc-75-missing --charsets --log-path /panfs/pfs.local/scratch/bi/j350h394/Apodidae_UCE/collocalia_esculenta/reduced/inc_log

And the log file:

2019-11-14 13:34:41,771 - phyluce_align_format_nexus_files_for_raxml - INFO - ====== Starting phyluce_align_format_nexus_files_for_raxml ======
2019-11-14 13:34:41,775 - phyluce_align_format_nexus_files_for_raxml - INFO - Version: 1.5.0
2019-11-14 13:34:41,776 - phyluce_align_format_nexus_files_for_raxml - INFO - Argument --alignments: /panfs/pfs.local/scratch/bi/j350h394/Apodidae_UCE/collocalia_esculenta/mafft-nexus-reduced/spades-inc-75-missing
2019-11-14 13:34:41,776 - phyluce_align_format_nexus_files_for_raxml - INFO - Argument --charsets: True
2019-11-14 13:34:41,776 - phyluce_align_format_nexus_files_for_raxml - INFO - Argument --log_path: /panfs/pfs.local/scratch/bi/j350h394/Apodidae_UCE/collocalia_esculenta/reduced/inc_log
2019-11-14 13:34:41,776 - phyluce_align_format_nexus_files_for_raxml - INFO - Argument --nexus: False
2019-11-14 13:34:41,776 - phyluce_align_format_nexus_files_for_raxml - INFO - Argument --output: /panfs/pfs.local/scratch/bi/j350h394/Apodidae_UCE/collocalia_esculenta/spades-inc-75-missing
2019-11-14 13:34:41,776 - phyluce_align_format_nexus_files_for_raxml - INFO - Argument --verbosity: INFO
2019-11-14 13:34:41,776 - phyluce_align_format_nexus_files_for_raxml - INFO - Reading input alignments in NEXUS format
2019-11-14 13:35:23,666 - phyluce_align_format_nexus_files_for_raxml - INFO - Concatenating files
2019-11-14 13:35:23,704 - phyluce_align_format_nexus_files_for_raxml - INFO - Writing charsets to /panfs/pfs.local/scratch/bi/j350h394/Apodidae_UCE/collocalia_esculenta/spades-inc-75-missing/spades-inc-75-missing.charsets
2019-11-14 13:35:23,707 - phyluce_align_format_nexus_files_for_raxml - INFO - Writing concatenated PHYLIP alignment to /panfs/pfs.local/scratch/bi/j350h394/Apodidae_UCE/collocalia_esculenta/spades-inc-75-missing/spades-inc-75-missing.phylip
2019-11-14 13:35:23,711 - phyluce_align_format_nexus_files_for_raxml - INFO - ====== Completed phyluce_align_format_nexus_files_for_raxml =====

I've used this code in the past with success, but it's been about a year. I'm at a loss. Any insight you could provide would be appreciated, thanks!

brantfaircloth commented 4 years ago

Can you send me a few of the alignments you are trying to concatenate? I’ll see if it works on my end.

Jesseholmes commented 4 years ago

Of course. Here are three files:

uce-nexus.zip

Let me know if you have problems accessing them.

brantfaircloth commented 4 years ago

Looks like the problem is that the files are in FASTA format rather than NEXUS (which is a requirement). You'll need to rename the files:

for f in *.nexus; do 
    mv -- "$f" "${f%.nexus}.fasta"
done

Then, convert them from fasta to nexus:

phyluce_align_convert_one_align_to_another \
    --alignments fasta \
    --input-format fasta \
    --output-format nexus \
    --output nexus

Then, all should work fine when you run phyluce_align_format_nexus_files_for_raxml.

Jesseholmes commented 4 years ago

That seemed to do the trick. Thanks for you help!