reply = FileFormat.Phylip;
break;
}
- else
+ else if (!lineswereskipped && looksLikeJnetData(data))
{
- if (!lineswereskipped && looksLikeJnetData(data))
- {
reply = FileFormat.Jnet;
break;
+
+ }
+ else // phylogenetic file?
+ {
+ if (source.nextLine().startsWith("<phyloxml"))
+ {
+ reply = FileFormat.PhyloXML;
+ break;
}
+ else if (( ( data.startsWith( "nexus" ) ) || ( data.startsWith( "#nexus" ) )
+ || ( data.startsWith( "# nexus" ) ) || ( data.startsWith( "begin" ) ) ) )
+ {
+ reply = FileFormat.Nexus;
+ break;
+ }
}
-
lineswereskipped = true; // this means there was some junk before any
// key file signature
}