Package fork.lib.bio.anno.genomic

Examples of fork.lib.bio.anno.genomic.LandscapeBuilder


   
    File[] fs= d.listFiles();
    for( int i=0; i<fs.length; i++ ){
        File f= fs[i];
        if(FileName.getExt(f).equals("wig")){
            LandscapeBuilder lb= new BedGraphReader(f).getLandscapeBuilder();
            int rlen= 100;
            File od= new File(d+"/score/"+FileName.getBaseName(f));
            ScoreChipSeqGene sc= new ScoreChipSeqGene(lb, org, rlen, od, FileName.getBaseName(f));
        }
    }
View Full Code Here


   
   
public static void main(String[] args) throws Exception { //debug
    File f= new File("r2.wig");
   
    LandscapeBuilder lb= new BedGraphReader(f).getLandscapeBuilder();
   
    LandscapeTransformer lt= new LandscapeTransformer(lb);
    lt.subtract(10);
   
   
View Full Code Here

   
   
   
    MarkReader mr= new MarkReader(f, "variableStep");
    MarkEntry en;
    LandscapeBuilder lb= new LandscapeBuilder();
    while((en=mr.nextEntry())!=null){
        String chr= en.tit.split("chrom=")[1].split("\t")[0];
       
        if(!chr.equals("chrM")){
            ArrayList<String> rs= en.chunk;
            int ps= 1;
            for( int i=0; i<rs.size(); i++ ){
                String l=rs.get(i);
                if(l.length()>0 && l.charAt(0)!='#'){
                    String[] ss= l.split("\t");
                    if(ss.length==2){
                        int p= Integer.parseInt(ss[0]);
                        double v= Double.parseDouble(ss[1]);
                        if(p<ps){
                            System.out.println(chr+"  "+ p+"  "+ v);
                        }
                        Region reg= new Region(ps, p);
                        reg.setAttribute(v);
                        lb.add(chr, reg);
                        ps= p+1;
                    }
                }
            }
        }
View Full Code Here

   
    //File f= new File(d+"/GSM897361_H3K18_timeA_signal.bar"); String tag= "h3k18ac";
    File f= new File(d+"/GSM897366_H4K16_timeA_signal.bar"); String tag= "h4k16ac";
   
    File od= new File(d+"/score/"+tag);
    LandscapeBuilder lb= new BarReader(f).getLandscapeBuilder();
    ScoreChipGene sc= new ScoreChipGene(lb, org, od, tag+"_xue2012");
   
   
}
View Full Code Here

   
   
    //File f= new File(d+"/h3k4me3_guillemette2012.wig");
    File f= new File(d+"/h3k4ac_guillemette2011.wig");
   
    LandscapeBuilder lb= new BedGraphReader(f).getLandscapeBuilder();
   
    LandscapeTransformer lt= new LandscapeTransformer(lb);
    lt.unlog(2);
   
    File of= new File(d+"/unlog2_"+ f.getName());
View Full Code Here

   
    File[] fs= d.listFiles();
    for( int i=0; i<fs.length; i++ ){
        File f= fs[i];
        if(FileName.getExt(f).equals("bar")){
            LandscapeBuilder lb= new BarReader(f).getLandscapeBuilder();

            File of= new File(d+"/"+FileName.getBaseName(f)+".wig");
            new BedGraphExporter(lb).writeToFile(of);;
        }
    }
View Full Code Here

    fs.add(new File(dir+"/data/chip-seq/norm/norm_wig_chip_htz1-anti660_884-rrp6d_sd_20131104-r1_pe1_sacCer1.wig"));
   
    for( int i=0; i<fs.size(); i++ ){
        File f= fs.get(i);
        if(FileName.getExt(f).equals("wig")){
            LandscapeBuilder lb= new BedGraphReader(f).getLandscapeBuilder();
            LineupSide ls= new LineupSide(gb, lb);
            File of= new File(od+"/"+FileName.getBaseName(f)+".txt");
            ls.writeToFile(of);
        }
    }
View Full Code Here

   
    File[] fs= d.listFiles();
    for(int i=0; i<fs.length ; i++){
        File f= fs[i];
        if(FileName.getExt(f).equals("wig")){
            LandscapeBuilder lb= new BedGraphReader(f).getLandscapeBuilder();
            String samp= FileName.getBaseName(f);
            File od= new File(odir+"/"+org+"/genic/"+samp);
            ScoreTFGene ss= new ScoreTFGene(lb, org, od, samp);
        }
    }
View Full Code Here

       
    File[] fs= d.listFiles();
    for( int i=0; i<fs.length; i++ ){
        File f= fs[i];
        if(FileName.getExt(f).equals("wig") && !f.getName().contains("unlog")){
            LandscapeBuilder lb= new BedGraphReader(f).getLandscapeBuilder();

            LandscapeTransformer lt= new LandscapeTransformer(lb);
            lt.unlog();
           
            File of= new File(d+"/unlog_"+FileName.getBaseName(f)+".wig");
View Full Code Here

    }
    Iterator<String> it= tags.iterator();
    while(it.hasNext()){
        String tag = it.next();
        System.out.println(tag);
        LandscapeBuilder lbf= new BedGraphReader(new File(rnad+"/norm_"+tag+"_for.wig")).getLandscapeBuilder();
        LandscapeBuilder lbr= new BedGraphReader(new File(rnad+"/norm_"+tag+"_rev.wig")).getLandscapeBuilder();
        File outf= new File(od+"/"+FileName.getBaseName(f)+"_"+tag+"_for.bed");
        File outr= new File(od+"/"+FileName.getBaseName(f)+"_"+tag+"_rev.bed");
       
        ScoreMergeAgainstRNA ss= new ScoreMergeAgainstRNA(gb, lbf, lbr);
        ss.writeToFile(outf);
View Full Code Here

TOP

Related Classes of fork.lib.bio.anno.genomic.LandscapeBuilder

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.