@@ -0,0 +1,1485 @@
+package edu.psu.compbio.seqcode.projects.akshay.Utils;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.HashMap;%0Aimport java.util.List;%0Aimport java.util.Map;%0A%0Aimport edu.psu.compbio.seqcode.gse.datasets.general.Point;%0A%0Apublic class GenomicRegionStats %7B%0A%09public List%3CList%3CPoint%3E%3E points_lists = new ArrayList%3CList%3CPoint%3E%3E();%0A%09public List%3CString%3E factor_string = new ArrayList%3CString%3E();%0A%09public int min_dist;%0A%09%0A%09public Map%3CString, Integer%3E interesect_numbers = new HashMap%3CString, Integer%3E();%0A%09%0A%09public void setIntersectNumbers()%7B%0A%09%09for(int i=0; i%3C points_lists.size(); i++)%7B%0A%09%09%09%0A%09%09%7D%0A%09%7D%0A%09%0A%09%0A%09%0A%09%0A%09%0A%09%0A%09public List%3CInteger%3E getIntersectIndexes(List%3CInteger%3E list_ids)%7B%0A%09%09List%3CInteger%3E ret = new ArrayList%3CInteger%3E();%0A%09%09List%3CPoint%3E ref_list = this.points_lists.get(list_ids.get(0));%0A%09%09for(int i=0; i%3Cref_list.size(); i++)%7B%0A%09%09%09boolean intersect = true;%0A%09%09%09Point ref_point = ref_list.get(i);%0A%09%09%09for(int l=1; l%3Clist_ids.size(); l++)%7B%0A%09%09%09%09int mid_ind = this.getMinDistIndex(ref_point, this.points_lists.get(l));%0A%09%09%09%09int dist = ref_point.distance(this.points_lists.get(l).get(mid_ind));%0A%09%09%09%09if(dist %3E  this.min_dist)%7B%0A%09%09%09%09%09intersect = false;%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%09if(intersect)%7B%0A%09%09%09%09ret.add(i);%0A%09%09%09%7D%0A%09%09%7D%0A%09%09return ret;%0A%09%7D%0A%09%0A%09public Integer getMinDistIndex(Point a, List%3CPoint%3E points_list)%7B%0A%09%09int index=0;%0A%09%09int min = Integer.MAX_VALUE;%0A%09%09for(int i=0; i%3Cpoints_list.size(); i++)%7B%0A%09%09%09int dist = a.distance(points_list.get(i));%0A%09%09%09if(dist %3C min)%7B%0A%09%09%09%09min = dist;%0A%09%09%09%09index = i;%0A%09%09%09%7D%0A%09%09%7D%0A%09%09return index;%0A%09%7D%0A%0A%7D%0A

adding code to compute common genomic locations in a given list of points