Package fork.lib.bio.anno.genomic

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


    File[] fs= cd.listFiles();
    for( int i=0; i<fs.length; i++ ){
        File f= fs[i];
        System.out.println(f);
        if(FileName.getExt(f).equals("wig")){
            LandscapeBuilder lb= new BedGraphReader(f).getLandscapeBuilder();
            File out= new File(od+"/chip_"+FileName.getBaseName(f)+".bed");
            ScoreMergeChipNorm ss= new ScoreMergeChipNorm(gb, lb);
            ss.writeToFile(out);
        }
    }
View Full Code Here


    File[] fs= cd.listFiles();
    for( int i=0; i<fs.length; i++ ){
        File f= fs[i];
        System.out.println(f);
        if(FileName.getExt(f).equals("wig")){
            LandscapeBuilder lb= new BedGraphReader(f).getLandscapeBuilder();
            File out= new File(od+"/chip_"+FileName.getBaseName(f)+".bed");
            ScoreMergeChipNorm ss= new ScoreMergeChipNorm(gb, lb);
            ss.writeToFile(out);
        }
    }
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+".bed");
       
        ScoreMergeAgainstRNA ss= new ScoreMergeAgainstRNA(gb, lbf, lbr);
        ss.writeToFile(outf);
    }
View Full Code Here

   
}


public static void removeShortAndNorm(File outSub, File outNorm)throws Exception {
    LandscapeBuilder lb= new BedGraphReader(outSub).getLandscapeBuilder();
    LandscapeTransformer lt= new LandscapeTransformer(lb);
    lt.selectLength(300, Integer.MAX_VALUE);
    double sum= lb.totalArea();
    double fac= sum/Math.pow(10, 8);
    lt.divideBy( fac );
View Full Code Here

        this.tag= tag;
        init();
    }
   
protected void init() throws Exception {
    lbf = new BedGraphReader(new File(dir+"/strand_"+tag+"_for.wig")).getLandscapeBuilder();
    lbr = new BedGraphReader(new File(dir+"/strand_"+tag+"_rev.wig")).getLandscapeBuilder();
}
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")){
            GetPeaks gg= new GetPeaks(new BedGraphReader(f).getLandscapeBuilder());

            File out= new File(od+"/peak_"+FileName.getBaseName(f)+".bed");
            gg.writeToFile(out);
        }
    }
View Full Code Here

   
    File[] fs= cd.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();
            File out= new File(od+"/chip_"+FileName.getBaseName(f)+".bed");
            ScoreChipNovel ss= new ScoreChipNovel(gb, lb);
            ss.writeToFile(out);
        }
    }
View Full Code Here

   
    File[] fs= cd.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();
            File out= new File(od+"/chip_"+FileName.getBaseName(f)+".bed");
            ScoreMergeChipNorm ss= new ScoreMergeChipNorm(gb, lb);
            ss.writeToFile(out);
        }
    }
View Full Code Here

    File dir= Dirs.getFile("dir");
   
   
    GenomicRegionsBuilder gbl= new BedReader(new File(dir+"/anno/bed/len/len_150_off_0.bed")).getGenomicRegionsBuilder();
    ArrayList<LandscapeScoringResultEntry> rsz= new LandscapeScoring(
            new BedGraphReader(new File(dir+"/data/chip-seq/norm/norm_wig_chip_742-wt_r1_sacCer1.wig")).getLandscapeBuilder(),
            gbl
            ).getResultEntries();
   
    LandscapeBuilder lbs= new BedGraphReader(new File(dir+"/other_datasets/venters_2009/Swr1_MAT01.bar.wig")).getLandscapeBuilder();
    ArrayList<LandscapeScoringResultEntry> rss= new LandscapeScoring(
            lbs, gbl
            ){
            protected double[] score(ArrayList<Region> bufs, GenomicRegion gr) throws RegionException{
                double max= 0;
View Full Code Here

public static void main(String[] args) throws Exception { //debug
    File d= new File("E:\\muxingu\\mystudy\\phd\\progs\\PhdProject");
   
    File f= new File(d+"/r2.wig");
    LandscapeBuilder lb= new BedGraphReader(f).getLandscapeBuilder();
   
   
    File od= new File(d+"/score/"+FileName.getBaseName(f));
    Score sc= new Score(lb, od);
   
View Full Code Here

TOP

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

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.