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

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

public class AlignmentServiceImpl
extends java.lang.Object
implements AlignmentService

An implementation of basic alignment tools for aligning an amplimer (query) to a CDS (target)

Author:
Original: kr2, $Author: kr2 $

Field Summary
protected static org.apache.commons.logging.Log log
          The logging instance (log4j).
 
Constructor Summary
AlignmentServiceImpl()
          Creates a new instance of AlignmentServiceImpl
 
Method Summary
 int[] getAmplimerReadingFrameRegion(java.lang.String targetSeq, java.lang.String querySeq)
          Maps the amplimer (querySeq) to the CDS (targetSeq).
 
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
The logging instance (log4j).

Constructor Detail

AlignmentServiceImpl

public AlignmentServiceImpl()
Creates a new instance of AlignmentServiceImpl

Method Detail

getAmplimerReadingFrameRegion

public int[] getAmplimerReadingFrameRegion(java.lang.String targetSeq,
                                           java.lang.String querySeq)
Maps the amplimer (querySeq) to the CDS (targetSeq). This method returns an int[] of size 3:
[0] - Coding start in query sequence
[1] - Coding stop in query sequence
[2] - Start of coding match on target sequence

All mappings are indexed from 1. If (int[] == null) no match was found. All alignments should be performed with both the forward and reverse complimented version of the query sequence looking for the longest match in the results.

Specified by:
getAmplimerReadingFrameRegion in interface AlignmentService
Parameters:
targetSeq - the longer of the two sequences e.g. the CDS
querySeq - the shorter of the two sequences e.g. the amplimer
Returns:
the mapping results {queryStart, queryStop, startOnTarget}