Examples of LandscapeScoringStrand


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

        init();
    }
   
   
protected void init() throws Exception{
    ls= new LandscapeScoringStrand(lbf, lbr, gb);
}
View Full Code Here

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

protected void init() throws Exception{
    ress= new ArrayList<>();
    GenomicRegionsBuilder ggg= new GenomicRegionsModifier(new GenomicRegionsModifier(gb).getComplementaryStrand()).getExtendedRegions(out, out);
   
    LandscapeScoringStrand ls= new LandscapeScoringStrand(lbf, lbr, ggg
            ){
        protected double[] scoreStrand(ArrayList<Region> bufs, GenomicRegion gr) throws RegionException{
            return Landscape2DBuffer.getLandscape(bufs, gr);
        }
    };
    ArrayList<LandscapeScoringResultEntry> rs= ls.getResultEntries();
    for( int i=0; i<rs.size() ; i++ ){
        DirectionalGenomicRegion gr= (DirectionalGenomicRegion)rs.get(i).gr;
        double[] vs= rs.get(i).scores;
        int mid= vs.length/2;
        int fl, fh, tl, th;
View Full Code Here

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

        init();
    }
   
   
protected void init() throws Exception{
    ls= new LandscapeScoringStrand(lbf, lbr, gb);
}
View Full Code Here

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

   
public void writeToDir(File od)throws Exception {
    File dir= Dirs.getFile("dir");
    File f= new File(dir+"\\anno\\bed\\hg19\\refGene_hg19\\genic\\hg19_gene_five_0.500.bed");
    GenomicRegionsBuilder gb= new BedReader(f).getGenomicRegionsBuilder();
    LandscapeScoringStrand ls= new LandscapeScoringStrand(lbf , lbr, gb){
        @Override
        protected double[] scoreStrand(ArrayList<Region> bufs, GenomicRegion gr) throws RegionException{
            return new double[]{Landscape2DBuffer.getArea(bufs, gr) / (gr.getRange()+1) *1000 };
        }
    };
    File out= new File(od+"/"+tag+"_"+FileName.getBaseName(f)+".bed");
    ls.writeToBedFile(out);

}
View Full Code Here

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

    GenomicRegionsBuilder gbnew= new GenomicRegionsModifier(gb).setStrand(strand);
   
    LandscapeBuilder lbf= new BedGraphReader(rfor).getLandscapeBuilder();
    LandscapeBuilder lbr= new BedGraphReader(rrev).getLandscapeBuilder();
   
    LandscapeScoringStrand ls= new LandscapeScoringStrand(lbf, lbr, gbnew);
    ls.writeToBedFile(of);
   
   
   
   
   
View Full Code Here

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

    }
   
   
   
public void writeToFile(File out)throws Exception {
    LandscapeScoringStrand ls= new LandscapeScoringStrand(lbf, lbr, gb){
            protected double[] score(ArrayList<Region> bufs, GenomicRegion gr) throws RegionException{
                return new double[]{Landscape2DBuffer.getArea(bufs, gr) / (gr.getRange()+1)*1000 };
            }
        };
    ls.writeToBedFile(out);
}
View Full Code Here

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

        init();
    }
   
   
protected void init() throws Exception{
    ls= new LandscapeScoringStrand(lbf, lbr, gb);
}
View Full Code Here

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

        init();
    }
   
   
protected void init() throws Exception{
    ls= new LandscapeScoringStrand(lbf, lbr, gb);
}
View Full Code Here

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

        init();
    }


protected void init() throws Exception{
    ls= new LandscapeScoringStrand(lbf, lbr, gb){
        protected double[] scoreStrand(ArrayList<Region> bufs, GenomicRegion gr) throws RegionException{
            return new double[]{Landscape2DBuffer.getArea(bufs, gr) / rl };
        }
    };
}
View Full Code Here

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

    new LandscapeTransformer(lbf).subtract(med);
    new LandscapeTransformer(lbr).subtract(med);
   
    System.out.println("subtracted");
   
    LandscapeScoringStrand ls= new LandscapeScoringStrand(lbf, lbr, gb){
        protected double[] scoreStrand(ArrayList<Region> bufs, GenomicRegion gr) throws RegionException{
            return new double[]{Landscape2DBuffer.getArea(bufs, gr)};
        }
    };
    double l= gb.totalLength();
    double a=0;
    for( int i=0; i<ls.getResultEntries().size() ; i++ ){
        a+= ls.getResultEntries().get(i).scores[0];
    }
    fac= a/l/100;
    System.out.println("fac:  "+fac);
    new LandscapeTransformer(lbf).divideBy(fac);
    new LandscapeTransformer(lbr).divideBy(fac);
View Full Code Here
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.