protected void init() throws Exception{
LandscapeScoring ls = getScoring();
ArrayList<LandscapeScoringResultEntry> res= ls.getResultEntries();
vec= new Vector(new double[res.get(0).scores.length]);
for( int i=0; i<res.size(); i++ ){
LandscapeScoringResultEntry en= res.get(i);
/*
bw.write( ((BedAttribute)en.gr.attribute()).getFieldA() );
double[] vs= en.scores;
for( int j=0; j<vs.length; j++ ){
bw.write("\t"+ (double)Math.round(vs[j]*100)/100);
}
bw.write("\n");
*/
DirectionalGenomicRegion dr= (DirectionalGenomicRegion)en.gr;
boolean ifflip= dr.strand=='-';
Vector vadd= new Vector(en.scores);
if(ifflip){
vadd= vadd.invert();
}
if(vadd.size()==vec.size()){
vec= vec.add(vadd);
}
}
vec= vec.multiplyScalar((double)1/res.size());
}