GSoC ’09: Mesquite

Post number… 3? July 12, 2009

Filed under: Uncategorized — kasiahayden @ 1:22 pm

Right, I missed the point that our student blogs can be useful for our organization to follow our progress and instead thought it was more for my own benefit (so ditched it when time became tight).

This weekend I’ve been working on figuring out how to get columns to display in imported nexml files. The code I wrote to display the nexml annotations finds which annotation to display based on the highlighted cell’s row and column, and if the column hasn’t made it to the matrix from the original xml file then my poor annotations can’t make the connection.

When testing that my nexml viewer worked correctly I simply copied and pasted a few key column names in, but I somehow don’t think that users will go for that, so it’s time to fix this problem.

It took me a little while to figure out that the nexml module probably wasn’t reinventing the wheel and calling methods to write the nexml file, much less creating it’s own methods to do so.

Then, the problem is probably wherever the main project tried to pull out character names from the project that the nexml module spit out, right? Right. (Or at least I’m mostly sure.)

In the getCharStateLabels method in ManageCategoricalCars, Mesquite is only able to get so far as to tell how many characters there are with data.getNumChars(). After that the boolean methods data.characterHasName, dData.hasStateNames(i) and foundInCharacter all return false. No good!

So now I have to figure out how the character names should be written in data so that they’re readable and then go back to nexml and fix that. Taxa are pulled from data, so I might get some hints from examining what works there.

Edit: Pretty sure that all that’s needed is for the characterNames array from CharacterData to be filled up somewhere in nexml, when it’s parsing characters. It makes sense that taxa names are pulled just fine in comparison, since what’s needed for that is guaranteed by the CharacterData constructor.

getCharStateLabels in ManageCategoricalCars

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s