uk.ac.sanger.cgp.standalonecsa.services
Class AnalysisServiceImpl

java.lang.Object
  extended by uk.ac.sanger.cgp.standalonecsa.services.AnalysisServiceImpl
All Implemented Interfaces:
AnalysisService

public class AnalysisServiceImpl
extends java.lang.Object
implements AnalysisService

Handles the actual processing of a unit of work. Expected path would be:

- Analyse variant and wildtype traces
- Select best normal traces
- Perform comparisons
- Pad coordinates to full amplimer
- Invert coordinates and reverse compliment sequence for reverse/antisense results
- Flag variants (if indicated in standaloneCsa.properties)
- Remove variants outside of Region Of Interest (if indicated in standaloneCsa.properties)
- Divide variants into categories for view types and annotate

Full analysis, comparison, flagging and annotation would involve the use of the following two methods:

- analyseTraceGroup(TraceGroupBean tgb)
- compareTraceGroup(TraceGroupBean tgb)

Author:
Original: kr2, $Author: kr2 $

Field Summary
protected static org.apache.commons.logging.Log log
           
 
Constructor Summary
AnalysisServiceImpl()
          Creates a new instance of FileLocatorServiceImpl
 
Method Summary
 void analyseTraceGroup(TraceGroupBean tgb)
          Performs trace analysis over all experiments in the TraceGroupBean.
 void cdsTranslation(CdsBean cds)
          Completes the setup of the CdsBean.
 void compareTraceGroup(TraceGroupBean tgb)
          Performs comparisons over all valid experiments in the TraceGroupBean.
 java.lang.String revCompDna(java.lang.String dnaSeq)
          Performs reverse compliment translation of a DNA string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.commons.logging.Log log
Constructor Detail

AnalysisServiceImpl

public AnalysisServiceImpl()
Creates a new instance of FileLocatorServiceImpl

Method Detail

analyseTraceGroup

public void analyseTraceGroup(TraceGroupBean tgb)
Description copied from interface: AnalysisService
Performs trace analysis over all experiments in the TraceGroupBean. This method is expected to perform the following:
- Analyse the variant experiments via autoCSA
- Analyse the wildtype experiments via autoCSA
- Calculate the best wildtype experiment for each direction

Any changes are written back to the mutable objects in the original object.

Specified by:
analyseTraceGroup in interface AnalysisService
Parameters:
tgb - the trace group to be analysed

compareTraceGroup

public void compareTraceGroup(TraceGroupBean tgb)
Description copied from interface: AnalysisService
Performs comparisons over all valid experiments in the TraceGroupBean. This method is expected to perform the following:

- Provided a working wildtype experiment is available for the direction of sequencing perform a comparison on the variant experiment (provided experiment is valid).
- Pad any internal data structures to the amplimer size, fill in holes etc.
- Standardise any variants marked as Constants.Zygosity.HETEROZYGOUS_TO_CHANGE to Constants.Zygosity.HETEROZYGOUS
- Convert any reverse coordinates to the forward strand.
- Perform flagging if relevant property is set.
- Remove any variants outside of 'region of interest' if relevent property is set (important if not using flagging).

Any changes are written back to the mutable objects in the original object.

Specified by:
compareTraceGroup in interface AnalysisService
Parameters:
tgb - the trace group to perform comparisons on

cdsTranslation

public void cdsTranslation(CdsBean cds)
Description copied from interface: AnalysisService
Completes the setup of the CdsBean. Populates the protein translation of the CDS and marks if the translation required the reverse compliment of the original CDS.

WARNING: this method will only give the best translation as the correct orientation i.e. the translation with the least number of stops.

Specified by:
cdsTranslation in interface AnalysisService
Parameters:
cds - the CdsBean to have protein translation performed

revCompDna

public java.lang.String revCompDna(java.lang.String dnaSeq)
Description copied from interface: AnalysisService
Performs reverse compliment translation of a DNA string.

Specified by:
revCompDna in interface AnalysisService
Parameters:
dnaSeq - the DNA sequence to be reverse complimented
Returns:
the reverse complimented DNA sequence