uk.ac.sanger.psu.gfmerge.util.biotools
Class BioTools_

java.lang.Object
  |
  +--uk.ac.sanger.psu.gfmerge.util.biotools.BioTools_

public class BioTools_
extends java.lang.Object


Constructor Summary
BioTools_()
           
 
Method Summary
static MyTreeMap addToTreeMap(MyTreeMap tMap, java.util.ArrayList locatableArrList)
          AddToTreeMap method creates a binary tree of locateable objects sorted by their start location.
static Sequence createNewSeqOfPickedGms(Sequence thisPredSeq, java.util.ArrayList thisRegionsOfPickedGmsArr)
           
static java.util.HashMap getCDnaScoredSpliceSiteHash_old(java.util.HashMap hashCDnaOverlappedGms)
           
static java.util.HashMap getCDnaScoredSpliceSiteHash(java.util.ArrayList _arrListOfGMRegions, java.util.HashMap hashCDnaOverlappedGms)
           
static java.util.HashMap getExonOverlap(java.util.HashMap hashOfOverlappedGms)
           
static java.util.HashMap getExonOverlapLength(java.util.HashMap thisHashExonOverlapSubLocs)
           
static java.util.HashMap getExonOverlapSubLocs(java.util.HashMap thisHashExonOverlap)
           
static java.lang.String getGenePredicterFromSequence(Sequence _sequence, java.lang.String _fname)
          getGenePredicterFromSequence method returns genefinder name of geneprediction if all features have the same 'method' value in the prediction file otherwise it throughs an exception.
static java.util.HashMap getGmScore(java.util.HashMap thisHashGmRegion, java.util.HashMap thisHashExonOverlapLength, java.util.HashMap thisHashEqualGms)
           
static java.util.HashMap getHashOfEqualGms(java.util.ArrayList thisArrListOfGMRegions)
           
static java.util.HashMap getLocRegionHash(java.util.ArrayList arrListOfRegions)
           
static double getMaxACP(java.util.ArrayList thisArrListOfGMs)
           
static java.util.ArrayList getRegionsOfPickedGms(java.util.ArrayList thisGmScoreTreeForRegionsArr)
           
static java.util.ArrayList getSortedGmsInRegion(java.util.ArrayList thisArrListOfGMRegions, java.util.HashMap thisHashGmScore)
           
static StrandedFeature.Strand getStrand(Feature f)
          getStrand Method which returns strand of given feature.
static java.util.HashMap pickObjOnHighScoringPath(java.util.HashMap objScoreHash)
           
static java.util.ArrayList search(MyTreeMap tMap)
          Search method calculates regions of overlapping features.
static Sequence seqs2Seq(SequenceIterator sequences)
          Seq2Seq method returns a sequence object when sequence iterator is given.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BioTools_

public BioTools_()
Method Detail

seqs2Seq

public static Sequence seqs2Seq(SequenceIterator sequences)
Seq2Seq method returns a sequence object when sequence iterator is given.

Called by the main method in GFMerge.

Parameters:
sequences - SequenceIterator object which may contain more than one more than one sequence, but only the first sequence is returned
Returns:
Sequence Sequence object
See Also:
SequenceIterator, Sequence

getGenePredicterFromSequence

public static java.lang.String getGenePredicterFromSequence(Sequence _sequence,
                                                            java.lang.String _fname)
getGenePredicterFromSequence method returns genefinder name of geneprediction if all features have the same 'method' value in the prediction file otherwise it throughs an exception.

Called by the main method in GFMerge.

Parameters:
_sequence - Sequence object
_fname - filename of the prediction file which is needed for the exception method
Returns:
String method value of the prediction file
Throws:
java.util.NoSuchElementException - If no method entry is in file
"Exception" - If different method values are in file
See Also:
Sequence

getStrand

public static StrandedFeature.Strand getStrand(Feature f)
getStrand Method which returns strand of given feature.

Parameters:
f - Feature
Returns:
StrandedFeature.Strand
See Also:
Feature, StrandedFeature.Strand

addToTreeMap

public static MyTreeMap addToTreeMap(MyTreeMap tMap,
                                     java.util.ArrayList locatableArrList)
AddToTreeMap method creates a binary tree of locateable objects sorted by their start location.

Called by the main method in GFMerge. Key is the start location of a LocateAble object, Value is an array of LocateAble objects with the same start location

Parameters:
tMap - binary tree instanced from MyTreeMap each key-value-pair contains the start location of features as key and an array of LocateAble as value. tree is empty when called first, new leaves will be added.
locatableArrList - ArrayList of LocateAble objects
Returns:
MyTreeMap binary tree of LocateAble objects
See Also:
MyTreeMap, LocateAble

search

public static java.util.ArrayList search(MyTreeMap tMap)
Search method calculates regions of overlapping features.

Called by the main method in GFMerge.

Parameters:
tMap - binary tree instanced from MyTreeMap each key-value-pair contains the start location of features as key and an array of LocateAble as value
Returns:
ArrayList of Regions which contain themselves LocateAble objects
See Also:
MyTreeMap, LocateAble

getLocRegionHash

public static java.util.HashMap getLocRegionHash(java.util.ArrayList arrListOfRegions)

getCDnaScoredSpliceSiteHash

public static java.util.HashMap getCDnaScoredSpliceSiteHash(java.util.ArrayList _arrListOfGMRegions,
                                                            java.util.HashMap hashCDnaOverlappedGms)

getCDnaScoredSpliceSiteHash_old

public static java.util.HashMap getCDnaScoredSpliceSiteHash_old(java.util.HashMap hashCDnaOverlappedGms)

getHashOfEqualGms

public static java.util.HashMap getHashOfEqualGms(java.util.ArrayList thisArrListOfGMRegions)

getExonOverlap

public static java.util.HashMap getExonOverlap(java.util.HashMap hashOfOverlappedGms)

getExonOverlapSubLocs

public static java.util.HashMap getExonOverlapSubLocs(java.util.HashMap thisHashExonOverlap)

getExonOverlapLength

public static java.util.HashMap getExonOverlapLength(java.util.HashMap thisHashExonOverlapSubLocs)

getGmScore

public static java.util.HashMap getGmScore(java.util.HashMap thisHashGmRegion,
                                           java.util.HashMap thisHashExonOverlapLength,
                                           java.util.HashMap thisHashEqualGms)

getSortedGmsInRegion

public static java.util.ArrayList getSortedGmsInRegion(java.util.ArrayList thisArrListOfGMRegions,
                                                       java.util.HashMap thisHashGmScore)

getRegionsOfPickedGms

public static java.util.ArrayList getRegionsOfPickedGms(java.util.ArrayList thisGmScoreTreeForRegionsArr)

createNewSeqOfPickedGms

public static Sequence createNewSeqOfPickedGms(Sequence thisPredSeq,
                                               java.util.ArrayList thisRegionsOfPickedGmsArr)

pickObjOnHighScoringPath

public static java.util.HashMap pickObjOnHighScoringPath(java.util.HashMap objScoreHash)

getMaxACP

public static double getMaxACP(java.util.ArrayList thisArrListOfGMs)