File dir= Dirs.getFile("dir");
File d= new File(dir+"/data/human_magnus/h2az/norm/peak/novel");
File out= new File(d+"/merge.bed");
GenomicRegionsMerger mer= new GenomicRegionsMerger();
mer.param().gap= 1000;
File[] fs= d.listFiles();
for( int i=0; i<fs.length; i++ ){
File f= fs[i];
if(FileName.getExt(f).equals("bed") && !f.getName().equals(out.getName()) ){
System.out.println(f);