use of db.MonomersDB in project Smiles2Monomers by yoann-dufresne.
the class ContractedGraphTests method setUp.
@Before
public void setUp() throws Exception {
MonomersDB monos = new MonomersJsonLoader().loadFile("data_tests/monos.json");
PolymersDB peps = new PolymersJsonLoader(monos).loadFile("data_tests/peps.json");
RulesDB rules = RulesJsonLoader.loader.loadFile("data_tests/rules.json");
ResidueCreator rc = new ResidueCreator(rules);
FamilyDB families = rc.createResidues(monos);
ChainLearning cl = new ChainLearning(peps);
cl.setMarkovianSize(3);
cl.learn(families);
ChainsDB chains = cl.getDb();
MonomericSpliting ms = new MonomericSpliting(families, chains, 2, 2, 3);
Polymer pol = peps.getObject("633");
ms.computeCoverage(pol);
this.coverage = ms.getCoverage();
this.coverage.calculateGreedyCoverage();
this.contractedGraph = new ContractedGraph(coverage);
}
use of db.MonomersDB in project Smiles2Monomers by yoann-dufresne.
the class TreeWidthTests method setUp.
@Before
public void setUp() throws Exception {
String pepDBname = "data_tests/peps.json";
// Loading databases
MonomersDB monoDB = new MonomersDB();
PolymersJsonLoader pcl = new PolymersJsonLoader(monoDB);
this.pepDB = pcl.loadFile(pepDBname);
}
Aggregations