/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package data.human.inhouse.chippeak;
import fork.lib.base.file.FileName;
import fork.lib.base.file.management.Dirs;
import fork.lib.bio.anno.genomic.BedAttribute;
import fork.lib.bio.anno.genomic.BedExporter;
import fork.lib.bio.anno.genomic.BedReader;
import fork.lib.bio.anno.genomic.SplicedBedReader;
import fork.lib.bio.anno.genomic.region.DirectionalGenomicRegion;
import fork.lib.bio.anno.genomic.region.Gene;
import fork.lib.bio.anno.genomic.region.GenomicRegion;
import fork.lib.bio.anno.genomic.region.GenomicRegionsBuilder;
import fork.lib.bio.anno.genomic.region.SplicedRegionsLocator;
import fork.lib.math.algebra.elementary.set.continuous.Region;
import fork.lib.math.applied.buffer.RegionBuffer;
import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;
/**
*
* @author man-mqbpjmg4
*/
public class Locate {
public static void main(String[] args) throws Exception { //debug
File dir= Dirs.getFile("dir");
//File d= new File(dir+"/data\\human_magnus\\h2az\\norm\\peak\\merge");
File d= new File(dir+"/data\\human_magnus\\h2az/macs/merge");
File f= new File(d+"/merge.bed");
//File anno= new File(dir+"/anno/refseq_hg19_exon.bed");
File anno= new File(dir+"/anno/ensGene_hg19_exon.bed");
File out= new File(d+"/locate_"+FileName.getBaseName(anno)+".bed");
GenomicRegionsBuilder peaks= new BedReader(f).getGenomicRegionsBuilder();
SplicedBedReader sr= new SplicedBedReader(anno);
SplicedRegionsLocator ll= new SplicedRegionsLocator(peaks, sr);
ll.writeToFile(out);
}
}