Package pal.alignment

Class MultiLocusAnnotatedAlignment

All Implemented Interfaces:
Serializable, Alignment, AnnotationAlignment, IdGroup, Report

public class MultiLocusAnnotatedAlignment extends SimpleAlignment implements AnnotationAlignment
MultiLocusAnnotatedAlignment is an extension of the SimpleAlignment that includes Annotation, and is designed for multiple loci. Separate annotation information is stored from each sites. This would be good SNP SSR type of data, but it would be inefficient for single gene data.
Version:
$Id:
Author:
Ed Buckler
See Also:
  • Field Details

    • chromosomePosition

      public float[] chromosomePosition
      used to designate position along chromosome
    • chromosome

      public int[] chromosome
      used to designate chromosome
    • weightedPosition

      public float[] weightedPosition
      used to designate weighted position; accounts for gaps
    • locusPosition

      public int[] locusPosition
      used to designate position; do not account for gaps
    • positionType

      public char[] positionType
      used to designate position Type
    • locusName

      public String[] locusName
      used to designate locus name
    • siteDataType

      public DataType[] siteDataType
      provides datatype for each locus separately
  • Constructor Details

    • MultiLocusAnnotatedAlignment

      public MultiLocusAnnotatedAlignment(Alignment a)
      Basic constructor.
    • MultiLocusAnnotatedAlignment

      public MultiLocusAnnotatedAlignment()
      null constructor.
    • MultiLocusAnnotatedAlignment

      public MultiLocusAnnotatedAlignment(AnnotationAlignment a)
      Clone constructor for Annotated alignment
    • MultiLocusAnnotatedAlignment

      public MultiLocusAnnotatedAlignment(Identifier[] ids, String[] sequences, String gaps, DataType dt)
    • MultiLocusAnnotatedAlignment

      public MultiLocusAnnotatedAlignment(IdGroup group, String[] sequences, DataType dt)
    • MultiLocusAnnotatedAlignment

      public MultiLocusAnnotatedAlignment(IdGroup group, String[] sequences, String gaps, DataType dt)
    • MultiLocusAnnotatedAlignment

      public MultiLocusAnnotatedAlignment(AnnotationAlignment a, IdGroup newGroup)
      This constructor will subset the alignment based on the taxa in IdGroup
  • Method Details

    • initMatrices

      protected void initMatrices()
    • init

      protected void init(IdGroup group, String[] sequences)
    • getChromosomePosition

      public float getChromosomePosition(int site)
      Return the position along chromosome
      Specified by:
      getChromosomePosition in interface AnnotationAlignment
    • setChromosomePosition

      public void setChromosomePosition(float position, int site)
      Set the position along chromosome
    • getChromosome

      public int getChromosome(int site)
      Returns chromosome
      Specified by:
      getChromosome in interface AnnotationAlignment
    • setChromosome

      public void setChromosome(int chromosome, int site)
      Sets chromosome
    • getWeightedLocusPosition

      public float getWeightedLocusPosition(int site)
      Return the weighted position along the gene (handles gaps)
      Specified by:
      getWeightedLocusPosition in interface AnnotationAlignment
    • setWeightedLocusPosition

      public void setWeightedLocusPosition(int site, float weightedPos)
      Sets the weighted position along the gene (handles gaps)
    • getLocusPosition

      public int getLocusPosition(int site)
      Return the position along the locus (ignores gaps)
      Specified by:
      getLocusPosition in interface AnnotationAlignment
    • setLocusPosition

      public void setLocusPosition(int position, int site)
      Set the position within the locus
    • getPositionType

      public char getPositionType(int site)
      Returns position type (eg. I=intron, E-exon, P=promoter, 1=first, 2=second, 3=third, etc.
      Specified by:
      getPositionType in interface AnnotationAlignment
    • setPositionType

      public void setPositionType(int site, char posType)
      Set thes position type (eg. I=intron, E-exon, P=promoter, 1=first, 2=second, 3=third, etc.
    • getLocusName

      public String getLocusName(int site)
      Returns the name of the locus
      Specified by:
      getLocusName in interface AnnotationAlignment
    • setLocusName

      public void setLocusName(String locusName, int site)
      Sets the name of the locus
    • getDataType

      public DataType getDataType(int site)
      Returns the datatype
      Specified by:
      getDataType in interface AnnotationAlignment