I'm using biojava classes and modules over Eclipse IDE. While going over the cookbook provided by the wiki page I reached the following point: http://biojava.org/wiki/BioJava:CookBook:PDB:read3.0
trying to implement the following example:
// by default PDB files will be stored in a temporary directory
// there are two ways of configuring a directory, that can get re-used multiple times:
// A) set the environment variable PDB_DIR
// B) call cache.setPath(path)
AtomCache cache = new AtomCache();
try {
// alternative: try d4hhba_ 4hhb.A 4hhb.A:1-100
Structure s = cache.getStructure("4hhb");
System.out.println(s);
} catch (Exception e) {
e.printStackTrace();
}
while running this piece of code I used two different set of imports:
First set:
import org.biojava.nbio.structure.Structure;
import org.biojava.nbio.structure.StructureIO;
import org.biojava.nbio.structure.align.util.AtomCache;
Second set is:
import org.biojava.bio.structure.*;
import org.biojava3.structure.StructureIO;
import org.biojava.bio.structure.align.util.AtomCache;
Now with the different set of imports the execution of the code is giving different results. My question is what's the exact difference between these imports, and why are they giving different results for the same piece of code? And which one should I use? Thank you.
Looks like the differences are because of some mess with versions, to get more details you need to check the version of biojava and the source code of imported classes. I suggest you can manage biojava dependencies via Maven to resolve those inconsistencies, check out these links:
You can also clone a specific tag (say 4.0.0) from this github repo: https://github.com/biojava/biojava
Thank you, I'll give that a go. Also is there any proper documentation for Biojava? the cookbook on the wiki page is just giving some chunks of code from here and there and is barely commenting on what the scripts are about, in biopython for instance the cookbook is much more in details, well written and explains in details all the functions and methods that the library has to offer.