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