Package pal.alignment

Class ConcatenatedAnnotatedAlignment

  • All Implemented Interfaces:
    java.io.Serializable, Alignment, AnnotationAlignment, IdGroup, Report

    public class ConcatenatedAnnotatedAlignment
    extends AbstractAlignment
    implements AnnotationAlignment
    This is an annotation version of the ConcatenatedAlignment Unlike normal ConcatenatedAlignment, it permits for merges with different numbers of sequences. It will merge by either union or intersection. Missing taxa will return missing values on getData.
    Version:
    $Id:
    Author:
    Ed Buckler
    See Also:
    Serialized Form
    • Constructor Detail

      • ConcatenatedAnnotatedAlignment

        public ConcatenatedAnnotatedAlignment​(AnnotationAlignment[] list,
                                              boolean mergeByID,
                                              boolean union)
                                       throws java.lang.IllegalArgumentException
        concatenate alignments
        Parameters:
        list - array with alignments to concatenate
        mergeByID - if true it will be by ID name
        union - if true it will create the union of the list, if false the intersection will be produced
        Throws:
        java.lang.IllegalArgumentException
    • Method Detail

      • getDataType

        public DataType getDataType​(int site)
        Return the datatype for a given site, which can differ between source alignments
        Specified by:
        getDataType in interface AnnotationAlignment
      • getLocusPosition

        public int getLocusPosition​(int site)
        Return the position along the locus (ignores gaps)
        Specified by:
        getLocusPosition in interface AnnotationAlignment
      • 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
      • getLocusName

        public java.lang.String getLocusName​(int site)
        Returns the name of the locus
        Specified by:
        getLocusName in interface AnnotationAlignment
      • sortSites

        public void sortSites()
        sort the sites by chromosome, then by chromosomal location, and final locusPosition
      • report

        public void report​(java.io.PrintWriter out)
        Description copied from interface: Report
        print human readable report (e.g., on parameters and associated model)
        Specified by:
        report in interface AnnotationAlignment
        Specified by:
        report in interface Report
        Overrides:
        report in class AbstractAlignment
        Parameters:
        out - output stream