readAl/trimAl fails to output to nexus, mega and nbrf if sequences are classified 'Deg'
Closed this issue · 1 comments
If the input alignment (DNA/RNA) type is classified as DNADeg or RNADeg, both programs fail to output correctly:
NEXUS OUTPUT:
#NEXUS
BEGIN DATA;
DIMENSIONS NTAX=12 NCHAR=637;
;
...
NEXUS DESIRED OUTPUT
#NEXUS
BEGIN DATA;
DIMENSIONS NTAX=12 NCHAR=637;
FORMAT DATATYPE=DNA INTERLEAVE=yes GAP=-;
MEGA OUTPUT:
#MEGA
!Title dataset/huge/example4.sequential.phy.nexus;
NSeqs=12 Nsites=637 indel=- CodeTable=Standard;
MEGA DESIRED OUTPUT
#MEGA
!Title dataset/huge/example4.sequential.phy.nexus;
!Format DataType=DNA NSeqs=12 Nsites=637 indel=- CodeTable=Standard;
NBRF OUTPUT
>;VRA17
VRA17 637 bases
NBRF DESIRED OUTPUT
>DL;VRA17
VRA17 637 bases
The issue seems to be located on these lines:
/* Compute output file datatype */
getTypeAlignment();
if (dataType == DNAType)
alg_datatype = "DL";
else if (dataType == RNAType)
alg_datatype = "RL";
else if (dataType == AAType)
alg_datatype = "P1";
Fixed with commit a537b3a#diff-e29679cb53094c243aa7c54ff61a8b0e