Package fork.lib.bio.anno.genomic.region

Examples of fork.lib.bio.anno.genomic.region.GenomicRegionsMerger


    //File d= new File(dir+"/data/human_magnus/h2az/norm/peak");
    File d= new File(dir+"/data/human_magnus/h2az/macs");
    File od= new File(d+"/merge");
    File out= new File(od+"/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);
            GenomicRegionsBuilder gb= new BedReader(f).getGenomicRegionsBuilder();
            mer.mergeNoSort(gb);
        }
        mer.sort();
    }
   
    GenomicRegionsBuilder gbout= mer.getMergedGenomicRegionsBuilder();
    new BedExporter(gbout).writeToFile(out);
   
}
View Full Code Here


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/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);
            GenomicRegionsBuilder gb= new BedReader(f).getGenomicRegionsBuilder();
            mer.mergeNoSort(gb);
        }
        mer.sort();
        new BedExporter(mer.getMergedGenomicRegionsBuilder()).writeToFile(out);
    }
   
   
}
View Full Code Here

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/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);
            GenomicRegionsBuilder gb= new BedReader(f).getGenomicRegionsBuilder();
            mer.mergeNoSort(gb);
        }
        mer.sort();
        new BedExporter(mer.getMergedGenomicRegionsBuilder()).writeToFile(out);
    }
   
   
}
View Full Code Here

    //File d= new File(dir+"/data/human_magnus/h2az/norm/peak");
    File d= new File(dir+"/data/human_magnus/h2az/macs");
    File od= new File(d+"/merge");
    File out= new File(od+"/merge.bed");
   
    GenomicRegionsMerger mer= new GenomicRegionsMerger();
    mer.param().gap= 500;
    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);
            GenomicRegionsBuilder gb= new BedReader(f).getGenomicRegionsBuilder();
            mer.mergeNoSort(gb);
        }
        mer.sort();
    }
   
    GenomicRegionsBuilder gbout= mer.getMergedGenomicRegionsBuilder();
    new BedExporter(gbout).writeToFile(out);
   
}
View Full Code Here

TOP

Related Classes of fork.lib.bio.anno.genomic.region.GenomicRegionsMerger

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.