org.intermine.bio.postprocess
Class IntergenicRegionUtil

java.lang.Object
  extended by org.intermine.bio.postprocess.IntergenicRegionUtil

public class IntergenicRegionUtil
extends java.lang.Object

Methods for creating feature for intergenic regions.


Constructor Summary
IntergenicRegionUtil(ObjectStoreWriter osw)
          Create a new IntergenicRegionUtil object that will operate on the given ObjectStoreWriter.
 
Method Summary
 void createIntergenicRegionFeatures()
          Create IntergenicRegion objects
protected  java.util.Iterator<?> createIntergenicRegionFeatures(java.util.Set<org.intermine.model.bio.Location> locationSet, java.util.Map<org.intermine.model.bio.Location,java.util.Set<org.intermine.model.bio.Gene>> locToGeneMap, java.lang.Integer chrId)
          Return an iterator over a Set of IntergenicRegion objects that don't overlap the Locations in the locationSet argument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntergenicRegionUtil

public IntergenicRegionUtil(ObjectStoreWriter osw)
Create a new IntergenicRegionUtil object that will operate on the given ObjectStoreWriter.

Parameters:
osw - the ObjectStoreWriter to use when creating/changing objects
Method Detail

createIntergenicRegionFeatures

public void createIntergenicRegionFeatures()
                                    throws ObjectStoreException
Create IntergenicRegion objects

Throws:
ObjectStoreException - if there is an ObjectStore problem

createIntergenicRegionFeatures

protected java.util.Iterator<?> createIntergenicRegionFeatures(java.util.Set<org.intermine.model.bio.Location> locationSet,
                                                               java.util.Map<org.intermine.model.bio.Location,java.util.Set<org.intermine.model.bio.Gene>> locToGeneMap,
                                                               java.lang.Integer chrId)
                                                        throws ObjectStoreException
Return an iterator over a Set of IntergenicRegion objects that don't overlap the Locations in the locationSet argument. The caller must call ObjectStoreWriter.store() on the IntergenicRegion, its chromosomeLocation and the synonym in the synonyms collection.

Parameters:
locationSet - a set of Locations for the Genes on a particular chromosome
locToGeneMap - a Map from Location.start to Gene and Location.end to Gene, used by this method to find the next and previous Genes for setting the IntergenicRegion.upstreamGene and downstreamGene fields
chrId - the ID of the Chromosome that the Locations refer to
Returns:
an Iterator over IntergenicRegion objects
Throws:
ObjectStoreException - if there is an ObjectStore problem