public Run merge(List<Run> runs, final boolean inmemory) {
ArrayList<TrieBag> triestoBeMerged = new ArrayList<TrieBag>(runs.size());
for(Run run: runs){
triestoBeMerged.add(((TrieBagRun)run).getTrie());
}
TrieBag result = (inmemory)? new RBTrieBag() : new DBSeqTrieBag(Run.getFilenameForNewRun());
try {
result.merge(triestoBeMerged);
} catch (TrieNotMergeableException e) {
System.err.println(e);
e.printStackTrace();