You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am seeing an issue with reading phylogenies with your library. I have multiple files to read phylogenies from sequentially.
Issue is that, once I read the first file, the NODE_COUNT in PhylogenyNode does not reset to 0. That is why, the second file's root does not start with 0 but a count after, where the last file ended. This does not appear to be a correct behavior.
I see that method PhylogenyNode.setNodeCount
synchronized final static void setNodeCount( final long i ) {
PhylogenyNode.NODE_COUNT = i;
}
is not accessible from outside the class which prevents me to reset it before I run read phylogenies for second file.
Since NODE_COUNT is a static variable it will live till the class remains loaded by a class loader. Is there a reason why the variable is static? Could we expose this setNodeCount() in PhylogenyNode?
This is the code snipped where I am trying to read multiple files, for your reference.
for (String aFile : files) {
System.out.println(aFile);
Phylogeny[] phylogeny = ParserUtils.readPhylogenies(aFile);
for (Phylogeny p : phylogeny) {
PhylogenyNode root = p.getRoot();
System.out.println("Root node: " + root.getName() + " , ID: AN" + root.getId());
//some more code
}
}
Alternatively, if this is not a correct usage for the lib please let me know.
The text was updated successfully, but these errors were encountered:
I am seeing an issue with reading phylogenies with your library. I have multiple files to read phylogenies from sequentially.
Issue is that, once I read the first file, the
NODE_COUNT
inPhylogenyNode
does not reset to 0. That is why, the second file's root does not start with 0 but a count after, where the last file ended. This does not appear to be a correct behavior.I see that method
PhylogenyNode.setNodeCount
is not accessible from outside the class which prevents me to reset it before I run read phylogenies for second file.
Since NODE_COUNT is a static variable it will live till the class remains loaded by a class loader. Is there a reason why the variable is static? Could we expose this
setNodeCount()
inPhylogenyNode
?This is the code snipped where I am trying to read multiple files, for your reference.
Alternatively, if this is not a correct usage for the lib please let me know.
The text was updated successfully, but these errors were encountered: