Class Exon

java.lang.Object
  extended by Exon

public class Exon
extends java.lang.Object

Stores and manipulates relevant exon information

Author:
arthiramachandran

Field Summary
(package private)  int chr
           
(package private)  double FPKM
           
(package private)  java.lang.String geneName
           
 double likelihoodRatio
           
(package private)  int numberOfOverlappingReads
           
 double numPileupPositions
           
(package private)  int posLeft
           
(package private)  int posRight
           
 double pValue
           
static int READLENGTH
           
(package private)  java.util.ArrayList<MappedReads> reads
           
(package private)  java.lang.String referenceSequence
           
(package private)  java.util.HashMap<java.lang.Integer,java.lang.Integer> SNPPositions
           
(package private)  double SNPs
           
(package private)  State state
           
 
Constructor Summary
Exon()
           
Exon(java.lang.String dataLine, boolean fromExonFile)
          parse a line of data (modified SAM format) and input appropriate fields
 
Method Summary
static java.util.ArrayList<Exon> calculateExpectedValues(java.util.ArrayList<java.lang.String> baselineExonFileNames, int chromosome)
          Computes the expected value for each exon by average the values in the baseline files
static java.util.ArrayList<Exon> calculateNormalizationFactor(java.util.ArrayList<java.lang.String> baselineExonFileNames, int i)
          Deprecated
private static void calculateSNPPositions(Exon exon, MappedReads read)
          Calculated the positions of the SNPs
static java.util.ArrayList<Exon> calculateStdDevValues(java.util.ArrayList<java.lang.String> baselineExonFileNames, int chromosome, java.util.ArrayList<Exon> expectedValues)
          Computes the std deviation values for each exon by average the values in the baseline files
 boolean containsPosition(int position)
          Does this exon contain the specified genomic position?
(package private) static void getFPKM(java.util.ArrayList<Expression> Expressions, java.util.ArrayList<Exon> Exons)
          Given an array of exons and expression data, calculate the FPKM levels per exon
static double getGenomeWideGammaParametersK(java.util.ArrayList<Exon> exons)
          Find the k parameter for the Gamma distribution describing the genomewide coverage distribution MLE for Gamma
static double getGenomeWideGammaParametersSNPsK(java.util.ArrayList<Exon> exons)
          Find the k parameter for the Gamma distribution describing the genomewide heterozygosity distribution MLE for Gamma
static double getGenomeWideGammaParametersSNPsTheta(java.util.ArrayList<Exon> exons, double k)
          Find the Theta parameter for the Gamma distribution describing the genomewide heterozygosity distribution MLE for Gamma
static double getGenomeWideGammaParametersTheta(java.util.ArrayList<Exon> exons, double k)
          Find the Theta parameter for the Gamma distribution describing the genomewide coverage distribution MLE for Gamma
static int getNumberOfDifferences(java.lang.String s1, java.lang.String s2)
          Gets the number of differences (ie SNPs) between the two sequences
 void getReferenceSequence(java.io.RandomAccessFile inputReference)
          Reads reference file and computes the reference sequence for the exon
static void getSNPs(java.util.ArrayList<Exon> exons, java.util.ArrayList<MappedReads> mappedReads)
          Gets the number of SNPs per exon
 java.lang.String inputData()
          Huh?
(package private)  int length()
           
private  boolean overlaps(MappedReads mappedRead)
          Does exon (this) overlap with mapped reads?
static java.util.ArrayList<Exon> readAndStoreExonFile(java.lang.String exonFileName, int chromosome)
          Reads exon file; stores necessary info in array of exons
static java.util.ArrayList<Exon> readExon(java.lang.String exonFileName, int chromosome)
          Parses the file (br) Reads file until the next chromosome Loads into an array of Exon objects
(package private) static void sortExons(java.util.ArrayList<Exon> data)
          Sort exons in order of their genomic position
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

chr

int chr

posLeft

int posLeft

posRight

int posRight

geneName

java.lang.String geneName

FPKM

double FPKM

referenceSequence

java.lang.String referenceSequence

SNPs

double SNPs

numberOfOverlappingReads

int numberOfOverlappingReads

reads

java.util.ArrayList<MappedReads> reads

SNPPositions

java.util.HashMap<java.lang.Integer,java.lang.Integer> SNPPositions

state

State state

numPileupPositions

public double numPileupPositions

likelihoodRatio

public double likelihoodRatio

pValue

public double pValue

READLENGTH

public static final int READLENGTH
See Also:
Constant Field Values
Constructor Detail

Exon

Exon()

Exon

Exon(java.lang.String dataLine,
     boolean fromExonFile)
parse a line of data (modified SAM format) and input appropriate fields

Parameters:
dataLine -
fromExonFile -
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

readExon

public static java.util.ArrayList<Exon> readExon(java.lang.String exonFileName,
                                                 int chromosome)
Parses the file (br) Reads file until the next chromosome Loads into an array of Exon objects

Parameters:
exonFileName -
chromosome -
Returns:
Array of exons

getFPKM

static void getFPKM(java.util.ArrayList<Expression> Expressions,
                    java.util.ArrayList<Exon> Exons)
Given an array of exons and expression data, calculate the FPKM levels per exon

Expressions & Exons should be sorted in order of beginning position

Think its deprecated

Parameters:
Expressions -
Exons -

getReferenceSequence

public void getReferenceSequence(java.io.RandomAccessFile inputReference)
Reads reference file and computes the reference sequence for the exon

Deprecated

Parameters:
inputReference -

getNumberOfDifferences

public static int getNumberOfDifferences(java.lang.String s1,
                                         java.lang.String s2)
Gets the number of differences (ie SNPs) between the two sequences

Deprecated

Parameters:
s1 -
s2 -
Returns:

getSNPs

public static void getSNPs(java.util.ArrayList<Exon> exons,
                           java.util.ArrayList<MappedReads> mappedReads)
Gets the number of SNPs per exon

Deprecated

Parameters:
exons -
mappedReads -

length

int length()

calculateSNPPositions

private static void calculateSNPPositions(Exon exon,
                                          MappedReads read)
Calculated the positions of the SNPs

Deprecated

Parameters:
exon -
read -

overlaps

private boolean overlaps(MappedReads mappedRead)
Does exon (this) overlap with mapped reads?

Deprecated

Parameters:
mappedRead -
Returns:

sortExons

static void sortExons(java.util.ArrayList<Exon> data)
Sort exons in order of their genomic position

Parameters:
data - list of exons

containsPosition

public boolean containsPosition(int position)
Does this exon contain the specified genomic position?

Parameters:
position -
Returns:
true/false

inputData

public java.lang.String inputData()
Huh?

Returns:

readAndStoreExonFile

public static java.util.ArrayList<Exon> readAndStoreExonFile(java.lang.String exonFileName,
                                                             int chromosome)
Reads exon file; stores necessary info in array of exons

Parameters:
exonFileName - name of file with list of exons
chromosome -
Returns:
array of exons

calculateExpectedValues

public static java.util.ArrayList<Exon> calculateExpectedValues(java.util.ArrayList<java.lang.String> baselineExonFileNames,
                                                                int chromosome)
Computes the expected value for each exon by average the values in the baseline files

Parameters:
baselineExonFileNames - array of names of the baseline files (the samples that to be compared against)
chromosome - chromosome
Returns:
list of exons with values of coverage/heterozygosity being the averages for the baselines

calculateStdDevValues

public static java.util.ArrayList<Exon> calculateStdDevValues(java.util.ArrayList<java.lang.String> baselineExonFileNames,
                                                              int chromosome,
                                                              java.util.ArrayList<Exon> expectedValues)
Computes the std deviation values for each exon by average the values in the baseline files

Parameters:
baselineExonFileNames - array of names of the baseline files (the samples that to be compared against)
chromosome - chromosome
expectedValues - list of expected values per exon
Returns:
list of exons with values of coverage/heterozygosity being the std deviation for the baselines

calculateNormalizationFactor

public static java.util.ArrayList<Exon> calculateNormalizationFactor(java.util.ArrayList<java.lang.String> baselineExonFileNames,
                                                                     int i)
Deprecated

Parameters:
baselineExonFileNames -
i -
Returns:

getGenomeWideGammaParametersK

public static double getGenomeWideGammaParametersK(java.util.ArrayList<Exon> exons)
Find the k parameter for the Gamma distribution describing the genomewide coverage distribution MLE for Gamma

Parameters:
exons - list of observation values per exon
Returns:
value of k parameter

getGenomeWideGammaParametersTheta

public static double getGenomeWideGammaParametersTheta(java.util.ArrayList<Exon> exons,
                                                       double k)
Find the Theta parameter for the Gamma distribution describing the genomewide coverage distribution MLE for Gamma

Parameters:
exons - list of observation values per exon
k - gamma parameter k
Returns:
value of Theta parameter

getGenomeWideGammaParametersSNPsK

public static double getGenomeWideGammaParametersSNPsK(java.util.ArrayList<Exon> exons)
Find the k parameter for the Gamma distribution describing the genomewide heterozygosity distribution MLE for Gamma

Parameters:
exons - list of observation values per exon
Returns:
value of k parameter

getGenomeWideGammaParametersSNPsTheta

public static double getGenomeWideGammaParametersSNPsTheta(java.util.ArrayList<Exon> exons,
                                                           double k)
Find the Theta parameter for the Gamma distribution describing the genomewide heterozygosity distribution MLE for Gamma

Parameters:
exons - list of observation values per exon
k - gamma parameter k
Returns:
value of Theta parameter