Package data.human.statham2014mods

Source Code of data.human.statham2014mods.Locate

/*
* 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.statham2014mods;

import fork.lib.base.file.FileName;
import fork.lib.base.file.management.Dirs;
import fork.lib.bio.anno.genomic.BedReader;
import fork.lib.bio.anno.genomic.SplicedBedReader;
import fork.lib.bio.anno.genomic.region.GenomicRegionsBuilder;
import fork.lib.bio.anno.genomic.region.SplicedRegionsLocator;
import java.io.File;

/**
*
* @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+"/other_datasets/statham2014_mcf7-mods/norm/peaks");

    File anno= new File(dir+"/anno/ensGene_hg19_exon.bed");
   
   
    File[] fs = d.listFiles();
    for( int i=0; i<fs.length; i++ ){
        File f= fs[i];
        if(FileName.getExt(f).equals("bed")){
            GenomicRegionsBuilder peaks= new BedReader(f).getGenomicRegionsBuilder();
            SplicedBedReader sr= new SplicedBedReader(anno);

            File od= new File(d+"/locate/"+ FileName.getBaseName(anno));
            File odt= new File(od+"/"+FileName.getBaseName(f));
            SplicedRegionsLocator ll= new SplicedRegionsLocator(peaks, sr);
            ll.writeToDir(odt, "locate");
            ll.writeToFile(new File(od+"/locate_"+f.getName()));
           
        }
    }
   
   
}
   
   
   
   
}
TOP

Related Classes of data.human.statham2014mods.Locate

TOP
Copyright © 2018 www.massapi.com. 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.