ESAT
 All Classes Namespaces Files Functions Variables Enumerator Pages
Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
broad.pda.seq.protection.SampleData Class Reference
Inheritance diagram for broad.pda.seq.protection.SampleData:
Inheritance graph
[legend]
Collaboration diagram for broad.pda.seq.protection.SampleData:
Collaboration graph
[legend]

Public Member Functions

 SampleData (String bamFile, boolean firstReadTranscriptionStrand, Map< String, Collection< Gene >> genes, int window, int step, double expressionCutoff, boolean expByScanPval, boolean fullyContained) throws IOException
 
int hashCode ()
 
void setExpressionScanPvalueCutoff (double expressionScanPvalCutoff)
 
double getExpressionScanPvalueCutoff ()
 
double getGeneCount (Gene gene)
 
double getGeneScanPval (Gene gene)
 
double getGeneAverageCoverage (Gene gene)
 
boolean isExpressed (Gene gene)
 
double getWindowCount (Gene gene, Annotation window)
 
boolean firstReadTranscriptionStrand ()
 
Map< Annotation,
ScanStatisticScore > 
getWindowScores (Gene gene)
 
boolean gotWindowScoresFromFile ()
 
double getEnrichmentOverGene (Gene gene, Annotation window)
 
ScanStatisticScore scoreWindowWithFragmentLengthFilter (Gene gene, Annotation window)
 
ScanStatisticScore scoreWindow (Gene gene, Annotation window)
 
ScanStatisticScore scoreWindow (Gene gene, Annotation window, double count)
 
Logger getLogger ()
 
String getSampleName ()
 
String getOriginalBamFile ()
 
void setSampleName (String name)
 
int getWindowSize ()
 
int getStepSize ()
 
TranscriptomeSpaceAlignmentModel getData ()
 
TranscriptomeSpaceAlignmentModel getFragmentLengthFilterData ()
 

Static Public Member Functions

static Annotation trimMaxContiguous (Annotation window, List< Double > data, double quantile)
 

Protected Attributes

String sampleName
 
TranscriptomeSpaceAlignmentModel data
 
TranscriptomeSpaceAlignmentModel maxFragmentLengthData
 
Map< Gene, ScanStatisticScore > geneScores
 
Map< Gene, Double > geneAvgCoverage
 
Map< Gene, Map< Annotation,
ScanStatisticScore > > 
windowScores
 
int windowSize
 
int stepSize
 
Map< String, Collection< Gene > > genesByChr
 
Map< String, Gene > genesByName
 
double expressionCutoffValue
 
boolean expressionByScanPval
 
boolean fullyContainedReads
 

Static Protected Attributes

static Logger logger = Logger.getLogger(SampleData.class.getName())
 

Detailed Description

Author
prussell

Constructor & Destructor Documentation

broad.pda.seq.protection.SampleData.SampleData ( String  bamFile,
boolean  firstReadTranscriptionStrand,
Map< String, Collection< Gene >>  genes,
int  window,
int  step,
double  expressionCutoff,
boolean  expByScanPval,
boolean  fullyContained 
) throws IOException
Parameters
bamFileBam file
firstReadTranscriptionStrandWhether read 1 is in direction of transcription
genesGenes by chromosome
windowWindow size
stepStep size
expressionCutoffP value cutoff for scan test of gene expression
expByScanPvalExpression is assessed by scan P value. If false, uses average read depth
fullyContainedCount fully contained reads only
Exceptions
IOException

Here is the call graph for this function:

Member Function Documentation

boolean broad.pda.seq.protection.SampleData.firstReadTranscriptionStrand ( )

Whether read 1 is in direction of transcription

Returns
True iff first read transcription strand is true

Here is the caller graph for this function:

TranscriptomeSpaceAlignmentModel broad.pda.seq.protection.SampleData.getData ( )

Write the window scores to a file for future use

Parameters
mMulti sample binding site caller that this belongs to
Exceptions
IOExceptionGet the alignment data
Returns
Alignment model
double broad.pda.seq.protection.SampleData.getEnrichmentOverGene ( Gene  gene,
Annotation  window 
)

Get enrichment of a window over a gene

Parameters
geneThe gene
windowWindow contained in the gene
Returns
Enrichment of window over gene background

Here is the call graph for this function:

double broad.pda.seq.protection.SampleData.getExpressionScanPvalueCutoff ( )

Get genome wide scan P value cutoff for expression of transcript

Returns
P value cutoff for transcript expression against genomic background
TranscriptomeSpaceAlignmentModel broad.pda.seq.protection.SampleData.getFragmentLengthFilterData ( )

Get the alignment data filtered by max fragment length

Returns
Alignment model
double broad.pda.seq.protection.SampleData.getGeneAverageCoverage ( Gene  gene)

Get average coverage of gene Get score from cache or calculate and cache score

Parameters
geneThe gene
Returns
The average coverage of the gene

Here is the caller graph for this function:

double broad.pda.seq.protection.SampleData.getGeneCount ( Gene  gene)

Get number of fragments mapping to gene Get score from cache or calculate and cache score

Parameters
geneThe gene
Returns
The number of fragments mapping to the gene

Here is the caller graph for this function:

double broad.pda.seq.protection.SampleData.getGeneScanPval ( Gene  gene)

Get coordinate space wide scan P value of number of fragments mapping to the gene Get score from cache or calculate and cache score

Parameters
geneThe gene
Returns
The scan P value of the number of fragments mapping to the gene with respect to teh coordinate space
Logger broad.pda.seq.protection.SampleData.getLogger ( )

Get the logger

Returns
The logger
String broad.pda.seq.protection.SampleData.getOriginalBamFile ( )

Get name of original bam file

Returns
Bam file name
String broad.pda.seq.protection.SampleData.getSampleName ( )

Get the sample name

Returns
Sample name
int broad.pda.seq.protection.SampleData.getStepSize ( )
double broad.pda.seq.protection.SampleData.getWindowCount ( Gene  gene,
Annotation  window 
)

Get number of fragments mapping to gene window Get score from cache or calculate and cache score

Parameters
geneThe gene
windowThe window
Returns
The number of fragments mapping to the gene
Map<Annotation, ScanStatisticScore> broad.pda.seq.protection.SampleData.getWindowScores ( Gene  gene)

Get scores for each window in the gene

Parameters
geneThe gene
Returns
The scores by window
int broad.pda.seq.protection.SampleData.getWindowSize ( )
boolean broad.pda.seq.protection.SampleData.gotWindowScoresFromFile ( )

Whether the window scores were read from an existing file

Returns
Whether the window scores were read from an existing file
int broad.pda.seq.protection.SampleData.hashCode ( )
boolean broad.pda.seq.protection.SampleData.isExpressed ( Gene  gene)

Whether the gene is significantly expressed in the sample

Parameters
geneThe gene
Returns
Whether the gene is expressed at the given significance level

Here is the call graph for this function:

ScanStatisticScore broad.pda.seq.protection.SampleData.scoreWindow ( Gene  gene,
Annotation  window 
)

Get scan statistic score for a specified window

Parameters
geneParent gene
windowThe window
Returns
Scan statistic score for window with global stats referring to parent transcript

Here is the caller graph for this function:

ScanStatisticScore broad.pda.seq.protection.SampleData.scoreWindow ( Gene  gene,
Annotation  window,
double  count 
)

Get scan statistic score for a specified window

Parameters
geneParent gene
windowThe window
countThe number to use as the region count in score
Returns
Scan statistic score for window with global stats referring to parent transcript

Here is the call graph for this function:

ScanStatisticScore broad.pda.seq.protection.SampleData.scoreWindowWithFragmentLengthFilter ( Gene  gene,
Annotation  window 
)

Get scan statistic score for a window based on filtering fragments overlapping the window by size

Parameters
geneThe gene
windowThe window
Returns
Scan statistic score for window with global stats referring to parent transcript

Here is the call graph for this function:

void broad.pda.seq.protection.SampleData.setExpressionScanPvalueCutoff ( double  expressionScanPvalCutoff)

Set genome wide scan P value cutoff for expression of transcript

Parameters
expressionScanPvalCutoffP value cutoff for transcript expression against genomic background
void broad.pda.seq.protection.SampleData.setSampleName ( String  name)

Set the sample name

Parameters
nameSample name
static Annotation broad.pda.seq.protection.SampleData.trimMaxContiguous ( Annotation  window,
List< Double >  data,
double  quantile 
)
static

Trim the region to max contiguous subregion above a certain quantile

Parameters
windowThe region
dataPosition level list of counts within the region
quantileQuantile for trim max contiguous
Returns
Trimmed region

Member Data Documentation

TranscriptomeSpaceAlignmentModel broad.pda.seq.protection.SampleData.data
protected
boolean broad.pda.seq.protection.SampleData.expressionByScanPval
protected
double broad.pda.seq.protection.SampleData.expressionCutoffValue
protected
boolean broad.pda.seq.protection.SampleData.fullyContainedReads
protected
Map<Gene, Double> broad.pda.seq.protection.SampleData.geneAvgCoverage
protected
Map<String, Collection<Gene> > broad.pda.seq.protection.SampleData.genesByChr
protected
Map<String, Gene> broad.pda.seq.protection.SampleData.genesByName
protected
Map<Gene, ScanStatisticScore> broad.pda.seq.protection.SampleData.geneScores
protected
Logger broad.pda.seq.protection.SampleData.logger = Logger.getLogger(SampleData.class.getName())
staticprotected
TranscriptomeSpaceAlignmentModel broad.pda.seq.protection.SampleData.maxFragmentLengthData
protected
String broad.pda.seq.protection.SampleData.sampleName
protected
int broad.pda.seq.protection.SampleData.stepSize
protected
Map<Gene, Map<Annotation, ScanStatisticScore> > broad.pda.seq.protection.SampleData.windowScores
protected
int broad.pda.seq.protection.SampleData.windowSize
protected

The documentation for this class was generated from the following file: