ESAT
 All Classes Namespaces Files Functions Variables Enumerator Pages
Classes | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
umms.core.model.JCSAlignmentModel Class Reference
Inheritance diagram for umms.core.model.JCSAlignmentModel:
Inheritance graph
[legend]
Collaboration diagram for umms.core.model.JCSAlignmentModel:
Collaboration graph
[legend]

Classes

class  AlignmentCount
 
class  FilteredIterator
 
class  NodeIterator
 
class  WrapAlignmentCountIterator
 

Public Member Functions

 JCSAlignmentModel (String bamFile, CoordinateSpace coordinateSpace, Collection< Predicate< Alignment >> readFilters, boolean readOrCreatePairedEndBam)
 
 JCSAlignmentModel ()
 
 JCSAlignmentModel (String bamFile, CoordinateSpace coordinateSpace, Collection< Predicate< Alignment >> readFilters, boolean readOrCreatePairedEndBam, TranscriptionRead transcriptionRead)
 
 JCSAlignmentModel (String bamFile, CoordinateSpace coordinateSpace, Collection< Predicate< Alignment >> readFilters, boolean readOrCreatePairedEndBam, TranscriptionRead transcriptionRead, boolean fragment)
 
 JCSAlignmentModel (String bamFile, CoordinateSpace coordinateSpace, Collection< Predicate< Alignment >> readFilters, boolean readOrCreatePairedEndBam, TranscriptionRead transcriptionRead, String maskedRegionFile)
 
 JCSAlignmentModel (String bamFile, CoordinateSpace coordinateSpace, Collection< Predicate< Alignment >> readFilters, boolean readOrCreatePairedEndBam, TranscriptionRead transcriptionRead, boolean fragment, String maskedRegionFile)
 
 JCSAlignmentModel (String bamFile, CoordinateSpace coordinateSpace, Collection< Predicate< Alignment >> readFilters)
 
 JCSAlignmentModel (String bamFile, CoordinateSpace coordinateSpace, Collection< Predicate< Alignment >> readFilters, TranscriptionRead transcriptionRead)
 
 JCSAlignmentModel (String bamFile, CoordinateSpace coordinateSpace, boolean readOrCreatePairedEndBam)
 
 JCSAlignmentModel (String bamFile, CoordinateSpace coordinateSpace, boolean readOrCreatePairedEndBam, TranscriptionRead transcriptionRead)
 
 JCSAlignmentModel (String bamFile, CoordinateSpace coordinateSpace)
 
 JCSAlignmentModel (String bamFile, CoordinateSpace coordinateSpace, TranscriptionRead transcriptionRead)
 
SAMFileHeader getHeader ()
 
void computeGlobalStats ()
 
CloseableIterator< AlignmentgetReadIterator ()
 
CloseableIterator< AlignmentgetReadIterator (Annotation region)
 
double getRefSequenceCounts (String refName)
 
double getCount (Annotation window, boolean fullyContained)
 
double getCount ()
 
double getCount (CloseableIterator< AlignmentCount > iter)
 
double getGlobalLambda ()
 
double getGlobalLength ()
 
double getGlobalPairedFragments ()
 
EmpiricalDistribution getReadSizeDistribution (CoordinateSpace coord, int maxSize, int numBins)
 
EmpiricalDistribution getReadSizeDistribution (Annotation region, CoordinateSpace coord, int maxSize, int numBins)
 
double getMedianReadSize (Annotation region, CoordinateSpace coord, int maxSize, int numBins, boolean fullyContained)
 
double getMedianReadSize (Annotation region, CoordinateSpace coord, int maxSize, int numBins)
 
EmpiricalDistribution getReadSizeDistribution (Annotation region, CoordinateSpace coord, int maxSize, int numBins, boolean fullyContained)
 
CloseableIterator< AlignmentCountgetOverlappingReadCounts (Annotation region, boolean fullyContained)
 
CloseableIterator< AlignmentgetOverlappingSplicedReads (Annotation region, boolean fullyContained)
 
CloseableIterator< AlignmentgetOverlappingSplicedReads (String chr)
 
CloseableIterator< AlignmentgetOverlappingReads (String chr)
 
int getBasesCovered (Annotation region, boolean fullyContained)
 
CloseableIterator< AlignmentgetPermutedAnnotations (Annotation region)
 
double getGlobalNumReads ()
 
double getGlobalNumReadsReferenceSeqs ()
 
boolean isValid (Alignment read)
 
double getCount (Annotation window)
 
boolean containsReference (String refName)
 
double getGlobalCount ()
 
double getGlobalCountReferenceSeqs ()
 
int size ()
 
void addFilter (Predicate< Alignment > filter)
 
void addFilters (Collection< Predicate< Alignment >> filters)
 
WindowScoreIterator< CountScorescan (Annotation region, int windowSize, int overlap)
 
long getRefSequenceLength (String refName)
 
Iterator<?extends WindowwindowIterator (int windowSize, int overlap)
 
double getRefSequenceLambda (String refName)
 
Map< String, Integer > getRefSequenceLengths ()
 
CoordinateSpace getCoordinateSpace ()
 
String getBamFile ()
 
int getBasesCovered (Annotation region)
 
void removeFilter (Predicate< Alignment > readFilter)
 
int getIntronCounts (Annotation intron)
 
Map< Alignment, Integer > getOverlappingReadReplicateCounts (Annotation region, boolean fullyContained)
 
CloseableIterator< AlignmentgetOverlappingReads (Annotation region, boolean fullyContained)
 
Annotation getPeak (Annotation parent, Annotation region, boolean fullyContained)
 
CloseableIterator< AlignmentgetOverlappingAnnotations (Annotation region, boolean fullyContained)
 
CloseableIterator< Alignmentiterator ()
 
double getCountExcludingRegion (Annotation region, Annotation excluded)
 
double getSplicedCount (Alignments alignments, boolean fullyContained)
 
double getAverageCountPerPositionWithThreshold (Gene gene, int minCount)
 
double getAverageCountPerPosition (Gene gene)
 
double[] getCountsPerPosition (Gene gene)
 
List< Double > getCountsStrandedPerPosition (Annotation gene)
 
double getCountStrandedExcludingRegion (Annotation region, Annotation excluded)
 
AlignmentType getAlignmentType ()
 

Static Public Member Functions

static void main (String[] args) throws IOException
 

Protected Attributes

CoordinateSpace coordinateSpace
 

Detailed Description

Serves the purpose of the Generic DataAlignment model and the ContinuousDataAlignmentModel Will populate alignments If a paired end file has unmapped mates, it will be represented by a single end read If both mates are mapped it will be represented as paired end reads Therefore a single model might have both, use flag X to exclude or include only one type This will be a bridge to the analysis modules

Author
skadri

Constructor & Destructor Documentation

umms.core.model.JCSAlignmentModel.JCSAlignmentModel ( String  bamFile,
CoordinateSpace  coordinateSpace,
Collection< Predicate< Alignment >>  readFilters,
boolean  readOrCreatePairedEndBam 
)

Build with a BAM file Populate the alignment collection

Parameters
bamFile
coordinateSpace
readFilters
Exceptions
IOException
umms.core.model.JCSAlignmentModel.JCSAlignmentModel ( )

Here is the caller graph for this function:

umms.core.model.JCSAlignmentModel.JCSAlignmentModel ( String  bamFile,
CoordinateSpace  coordinateSpace,
Collection< Predicate< Alignment >>  readFilters,
boolean  readOrCreatePairedEndBam,
TranscriptionRead  transcriptionRead 
)

Populate the alignment collection

Parameters
bamFile
coordinateSpace
readFilters
Exceptions
IOException
umms.core.model.JCSAlignmentModel.JCSAlignmentModel ( String  bamFile,
CoordinateSpace  coordinateSpace,
Collection< Predicate< Alignment >>  readFilters,
boolean  readOrCreatePairedEndBam,
TranscriptionRead  transcriptionRead,
boolean  fragment 
)
umms.core.model.JCSAlignmentModel.JCSAlignmentModel ( String  bamFile,
CoordinateSpace  coordinateSpace,
Collection< Predicate< Alignment >>  readFilters,
boolean  readOrCreatePairedEndBam,
TranscriptionRead  transcriptionRead,
String  maskedRegionFile 
)
umms.core.model.JCSAlignmentModel.JCSAlignmentModel ( String  bamFile,
CoordinateSpace  coordinateSpace,
Collection< Predicate< Alignment >>  readFilters,
boolean  readOrCreatePairedEndBam,
TranscriptionRead  transcriptionRead,
boolean  fragment,
String  maskedRegionFile 
)

Populate the alignment collection

Parameters
bamFile
coordinateSpace
readFilters
Exceptions
IOException

Here is the call graph for this function:

umms.core.model.JCSAlignmentModel.JCSAlignmentModel ( String  bamFile,
CoordinateSpace  coordinateSpace,
Collection< Predicate< Alignment >>  readFilters 
)
umms.core.model.JCSAlignmentModel.JCSAlignmentModel ( String  bamFile,
CoordinateSpace  coordinateSpace,
Collection< Predicate< Alignment >>  readFilters,
TranscriptionRead  transcriptionRead 
)
umms.core.model.JCSAlignmentModel.JCSAlignmentModel ( String  bamFile,
CoordinateSpace  coordinateSpace,
boolean  readOrCreatePairedEndBam 
)
umms.core.model.JCSAlignmentModel.JCSAlignmentModel ( String  bamFile,
CoordinateSpace  coordinateSpace,
boolean  readOrCreatePairedEndBam,
TranscriptionRead  transcriptionRead 
)
umms.core.model.JCSAlignmentModel.JCSAlignmentModel ( String  bamFile,
CoordinateSpace  coordinateSpace 
)
umms.core.model.JCSAlignmentModel.JCSAlignmentModel ( String  bamFile,
CoordinateSpace  coordinateSpace,
TranscriptionRead  transcriptionRead 
)

Member Function Documentation

void umms.core.model.JCSAlignmentModel.addFilter ( Predicate< Alignment filter)

Here is the caller graph for this function:

void umms.core.model.JCSAlignmentModel.addFilters ( Collection< Predicate< Alignment >>  filters)

Here is the call graph for this function:

void umms.core.model.JCSAlignmentModel.computeGlobalStats ( )

Compute global stats and cache to a file for future use, or read from file if already cached

Here is the call graph for this function:

Here is the caller graph for this function:

boolean umms.core.model.JCSAlignmentModel.containsReference ( String  refName)

Here is the caller graph for this function:

AlignmentType umms.core.model.JCSAlignmentModel.getAlignmentType ( )

Returns the alignment type of the model

Returns
double umms.core.model.JCSAlignmentModel.getAverageCountPerPosition ( Gene  gene)

Get the average position level coverage

Parameters
geneThe gene
Returns
The average of all position counts in the gene

Here is the call graph for this function:

double umms.core.model.JCSAlignmentModel.getAverageCountPerPositionWithThreshold ( Gene  gene,
int  minCount 
)

Get average position level coverage of only positions with count above a threshold (denominator excludes positions not passing threshold)

Parameters
geneThe gene
minCountMin coverage to include a position
Returns
The average of all position counts over threshold in the gene

Here is the call graph for this function:

String umms.core.model.JCSAlignmentModel.getBamFile ( )
int umms.core.model.JCSAlignmentModel.getBasesCovered ( Annotation  region,
boolean  fullyContained 
)

Here is the caller graph for this function:

int umms.core.model.JCSAlignmentModel.getBasesCovered ( Annotation  region)

Here is the call graph for this function:

CoordinateSpace umms.core.model.JCSAlignmentModel.getCoordinateSpace ( )
double umms.core.model.JCSAlignmentModel.getCount ( Annotation  window,
boolean  fullyContained 
)

Use the coordinate space to decide what is an overlapping read

Parameters
window
fullyContained
Returns

Here is the call graph for this function:

double umms.core.model.JCSAlignmentModel.getCount ( )

Use the coordinate space to decide what is an overlapping read Gets the count over the entire genome

Returns

Here is the caller graph for this function:

double umms.core.model.JCSAlignmentModel.getCount ( CloseableIterator< AlignmentCount iter)
double umms.core.model.JCSAlignmentModel.getCount ( Annotation  window)

Here is the call graph for this function:

double umms.core.model.JCSAlignmentModel.getCountExcludingRegion ( Annotation  region,
Annotation  excluded 
)

Here is the call graph for this function:

double [] umms.core.model.JCSAlignmentModel.getCountsPerPosition ( Gene  gene)

This function returns an array list of counts for each position along the specified gene

Parameters
gene
Returns

Here is the call graph for this function:

Here is the caller graph for this function:

List<Double> umms.core.model.JCSAlignmentModel.getCountsStrandedPerPosition ( Annotation  gene)

This function returns an array list of counts for each position along the specified gene

Parameters
gene
Returns

Here is the call graph for this function:

double umms.core.model.JCSAlignmentModel.getCountStrandedExcludingRegion ( Annotation  region,
Annotation  excluded 
)

Here is the call graph for this function:

double umms.core.model.JCSAlignmentModel.getGlobalCount ( )

Here is the call graph for this function:

Here is the caller graph for this function:

double umms.core.model.JCSAlignmentModel.getGlobalCountReferenceSeqs ( )

Here is the call graph for this function:

double umms.core.model.JCSAlignmentModel.getGlobalLambda ( )

Here is the call graph for this function:

double umms.core.model.JCSAlignmentModel.getGlobalLength ( )

Here is the call graph for this function:

double umms.core.model.JCSAlignmentModel.getGlobalNumReads ( )

Get total number of reads

Returns
Total read count

Here is the call graph for this function:

double umms.core.model.JCSAlignmentModel.getGlobalNumReadsReferenceSeqs ( )

Get total number of reads mapping to the coordinate space

Returns
Total read count on coordinate space

Here is the call graph for this function:

double umms.core.model.JCSAlignmentModel.getGlobalPairedFragments ( )

Here is the call graph for this function:

SAMFileHeader umms.core.model.JCSAlignmentModel.getHeader ( )

Returns the SAM file header for this reader

Returns
int umms.core.model.JCSAlignmentModel.getIntronCounts ( Annotation  intron)

This will count the number of spliced reads with exactly this intron

Parameters
intronthe intron to count
Returns

Here is the call graph for this function:

double umms.core.model.JCSAlignmentModel.getMedianReadSize ( Annotation  region,
CoordinateSpace  coord,
int  maxSize,
int  numBins,
boolean  fullyContained 
)

Get the median of all read (or fragment) sizes in an annotation

Parameters
regionThe annotation in which to count read sizes
coordCoordinate space in which to compute read sizes
maxSizeThe maximum read size to check for
numBinsThe number of bins for histogram
fullyContainedCount fully contained reads/fragments only
Returns
Distribution of read sizes with respect to coordinate space

Here is the call graph for this function:

double umms.core.model.JCSAlignmentModel.getMedianReadSize ( Annotation  region,
CoordinateSpace  coord,
int  maxSize,
int  numBins 
)

Get the median of all read (or fragment) sizes in an annotation

Parameters
regionThe annotation in which to count read sizes
coordCoordinate space in which to compute read sizes
maxSizeThe maximum read size to check for
numBinsThe number of bins for histogram
Returns
Distribution of read sizes with respect to coordinate space

Here is the call graph for this function:

CloseableIterator<Alignment> umms.core.model.JCSAlignmentModel.getOverlappingAnnotations ( Annotation  region,
boolean  fullyContained 
)
CloseableIterator<AlignmentCount> umms.core.model.JCSAlignmentModel.getOverlappingReadCounts ( Annotation  region,
boolean  fullyContained 
)

Return the reads that overlap with this region in coordinate space If the Alignment model has a strand which is NOT unstranded, then returns stranded counts

Here is the caller graph for this function:

Map<Alignment, Integer> umms.core.model.JCSAlignmentModel.getOverlappingReadReplicateCounts ( Annotation  region,
boolean  fullyContained 
)

Get number of replicates of each read overlapping the region

Parameters
regionThe region
fullyContainedCount fully contained reads only
Returns
For each unique read position, the number of replicates

Here is the call graph for this function:

CloseableIterator<Alignment> umms.core.model.JCSAlignmentModel.getOverlappingReads ( String  chr)

Here is the call graph for this function:

Here is the caller graph for this function:

CloseableIterator<Alignment> umms.core.model.JCSAlignmentModel.getOverlappingReads ( Annotation  region,
boolean  fullyContained 
)

Here is the call graph for this function:

CloseableIterator<Alignment> umms.core.model.JCSAlignmentModel.getOverlappingSplicedReads ( Annotation  region,
boolean  fullyContained 
)

Return the reads that overlap with this region in coordinate space

Here is the caller graph for this function:

CloseableIterator<Alignment> umms.core.model.JCSAlignmentModel.getOverlappingSplicedReads ( String  chr)

Return the reads that overlap with this region in coordinate space

Here is the call graph for this function:

Annotation umms.core.model.JCSAlignmentModel.getPeak ( Annotation  parent,
Annotation  region,
boolean  fullyContained 
)

Get the span covered by all reads overlapping a region

Parameters
parentParent annotation of the region of interest
regionThe region of interest
fullyContainedFully contained reads only
Returns
The subregion of the parent gene enclosing all reads overlapping the region or null if no overlappers

Here is the call graph for this function:

CloseableIterator<Alignment> umms.core.model.JCSAlignmentModel.getPermutedAnnotations ( Annotation  region)

Here is the call graph for this function:

CloseableIterator<Alignment> umms.core.model.JCSAlignmentModel.getReadIterator ( )

Here is the call graph for this function:

Here is the caller graph for this function:

CloseableIterator<Alignment> umms.core.model.JCSAlignmentModel.getReadIterator ( Annotation  region)

Here is the call graph for this function:

EmpiricalDistribution umms.core.model.JCSAlignmentModel.getReadSizeDistribution ( CoordinateSpace  coord,
int  maxSize,
int  numBins 
)

Get the distribution of all read (or fragment) sizes with respect to a coordinate space

Parameters
coordThe coordinate space
maxSizeThe maximum read size to consider
numBinsThe number of bins for histogram
Returns
Distribution of read sizes with respect to coordinate space

Here is the call graph for this function:

Here is the caller graph for this function:

EmpiricalDistribution umms.core.model.JCSAlignmentModel.getReadSizeDistribution ( Annotation  region,
CoordinateSpace  coord,
int  maxSize,
int  numBins 
)

Get the distribution of read (or fragment) sizes in an annotation

Parameters
regionThe annotation in which to count read sizes
coordCoordinate space in which to compute read sizes
maxSizeThe maximum read size to check for
numBinsThe number of bins for histogram
Returns
Distribution of read sizes with respect to coordinate space

Here is the call graph for this function:

EmpiricalDistribution umms.core.model.JCSAlignmentModel.getReadSizeDistribution ( Annotation  region,
CoordinateSpace  coord,
int  maxSize,
int  numBins,
boolean  fullyContained 
)

Get the distribution of read (or fragment) sizes in an annotation

Parameters
regionThe annotation in which to count read sizes
coordCoordinate space in which to compute read sizes
maxSizeThe maximum read size to check for
numBinsThe number of bins for histogram
fullyContainedCount fully contained reads/fragments only
Returns
Distribution of read sizes with respect to coordinate space

Here is the call graph for this function:

double umms.core.model.JCSAlignmentModel.getRefSequenceCounts ( String  refName)

This function calculates the number of proper paired end reads over the entire coordinate space

Author
skadri
Returns
Returns the counts for the specified reference sequence
Parameters
refName
Returns

Here is the call graph for this function:

double umms.core.model.JCSAlignmentModel.getRefSequenceLambda ( String  refName)

Here is the call graph for this function:

long umms.core.model.JCSAlignmentModel.getRefSequenceLength ( String  refName)

Here is the caller graph for this function:

Map<String, Integer> umms.core.model.JCSAlignmentModel.getRefSequenceLengths ( )

Get the lengths of the reference sequences

Returns
Map associating each reference name with sequence length

Here is the caller graph for this function:

double umms.core.model.JCSAlignmentModel.getSplicedCount ( Alignments  alignments,
boolean  fullyContained 
)

Here is the call graph for this function:

boolean umms.core.model.JCSAlignmentModel.isValid ( Alignment  read)
CloseableIterator<Alignment> umms.core.model.JCSAlignmentModel.iterator ( )
static void umms.core.model.JCSAlignmentModel.main ( String[]  args) throws IOException
static

Here is the call graph for this function:

void umms.core.model.JCSAlignmentModel.removeFilter ( Predicate< Alignment readFilter)

Removes a read filter from the set

Parameters
readFilterto remove
WindowScoreIterator<CountScore> umms.core.model.JCSAlignmentModel.scan ( Annotation  region,
int  windowSize,
int  overlap 
)
int umms.core.model.JCSAlignmentModel.size ( )

Here is the call graph for this function:

Iterator<? extends Window> umms.core.model.JCSAlignmentModel.windowIterator ( int  windowSize,
int  overlap 
)

Iterate through the whole coordinate space in windows and score them using the provided window processor

Parameters
windowSizesize of the windows to score

Member Data Documentation

CoordinateSpace umms.core.model.JCSAlignmentModel.coordinateSpace
protected

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