001package com.hfg.bio.seq;
002
003
004//------------------------------------------------------------------------------
005/**
006 Simple container for sequence mapping stats.
007 <div>
008  @see com.hfg.graphics.Gene2D
009  @author J. Alex Taylor, hairyfatguy.com
010 </div>
011 */
012//------------------------------------------------------------------------------
013// com.hfg XML/HTML Coding Library
014//
015// This library is free software; you can redistribute it and/or
016// modify it under the terms of the GNU Lesser General Public
017// License as published by the Free Software Foundation; either
018// version 2.1 of the License, or (at your option) any later version.
019//
020// This library is distributed in the hope that it will be useful,
021// but WITHOUT ANY WARRANTY; without even the implied warranty of
022// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
023// Lesser General Public License for more details.
024//
025// You should have received a copy of the GNU Lesser General Public
026// License along with this library; if not, write to the Free Software
027// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
028//
029// J. Alex Taylor, President, Founder, CEO, COO, CFO, OOPS hairyfatguy.com
030// jataylor@hairyfatguy.com
031//------------------------------------------------------------------------------
032
033public class SeqMappingCoverage
034{
035   private Integer mQueryLength;
036   private Integer mMappedLength;
037   private Float   mPctIdentity;
038
039   //##########################################################################
040   // PUBLIC METHODS
041   //##########################################################################
042
043   //--------------------------------------------------------------------------
044   /**
045    Sets the summed length of the query sequence that was successfully mapped.
046    @param inValue the length of the query seq portions that were covered by mapping
047    @return this SeqMappingCoverage object (for potential method chaining)
048    */
049   public SeqMappingCoverage setMappedLength(Integer inValue)
050   {
051      mMappedLength = inValue;
052      return this;
053   }
054
055   //--------------------------------------------------------------------------
056   /**
057    Returns the summed length of the query sequence that was successfully mapped.
058    @return the summed length of the query sequence that was successfully mapped
059    */
060   public Integer getMappedLength()
061   {
062      return mMappedLength;
063   }
064
065   //--------------------------------------------------------------------------
066   /**
067    Sets the length of the query sequence that was mapped.
068    @param inValue the query seq length
069    @return this SeqMappingCoverage object (for potential method chaining)
070    */
071   public SeqMappingCoverage setQueryLength(Integer inValue)
072   {
073      mQueryLength = inValue;
074      return this;
075   }
076
077   //--------------------------------------------------------------------------
078   /**
079    Returns the length of the query sequence that was mapped.
080    @return the query length
081    */
082   public Integer getQueryLength()
083   {
084      return mQueryLength;
085   }
086
087   //--------------------------------------------------------------------------
088   /**
089    Sets the percent identity of the query sequence to the mapping target for the
090    region(s) mapped.
091    @param inValue the pct. identity of the query seq to the mapping target
092    @return this SeqMappingCoverage object (for potential method chaining)
093    */
094   public SeqMappingCoverage setPercentIdentity(Float inValue)
095   {
096      mPctIdentity = inValue;
097      return this;
098   }
099
100   //--------------------------------------------------------------------------
101   /**
102    Returns the percent identity of the query sequence to the mapping target for the
103    region(s) mapped.
104    @return the pct. identity of the query sequence to the mapping target sequence for the mapped region(s)
105    */
106   public Float getPercentIdentity()
107   {
108      return mPctIdentity;
109   }
110}