pal.alignment
Class ConcatenatedAnnotatedAlignment
java.lang.Object
|
+--pal.alignment.AbstractAlignment
|
+--pal.alignment.ConcatenatedAnnotatedAlignment
- All Implemented Interfaces:
- Alignment, AnnotationAlignment, IdGroup, Report, java.io.Serializable
- 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.
- See Also:
- Serialized Form
Method Summary |
int |
getChromosome(int site)
Returns chromosome |
float |
getChromosomePosition(int site)
Return the position along chromosome |
char |
getData(int seq,
int site)
sequence alignment at (sequence, site) |
DataType |
getDataType(int site)
Return the datatype for a given site, which can differ between source alignments |
java.lang.String |
getLocusName(int site)
Returns the name of the locus |
int |
getLocusPosition(int site)
Return the position along the locus (ignores gaps) |
char |
getPositionType(int site)
Returns position type (eg. |
float |
getWeightedLocusPosition(int site)
Return the weighted position along the gene (handles gaps) |
void |
report(java.io.PrintWriter out)
Returns a report for the alignment |
void |
sortSites()
sort the sites by chromosome, then by chromosomal location, and final locusPosition |
Methods inherited from class pal.alignment.AbstractAlignment |
getAlignedSequenceString, getDataType, getFrequency, getIdCount, getIdentifier, getLength, getSequenceCount, getSiteCount, getStates, guessDataType, isGap, setDataType, setFrequency, setIdentifier, toString, whichIdNumber |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ConcatenatedAnnotatedAlignment
public ConcatenatedAnnotatedAlignment(AnnotationAlignment[] list,
boolean mergeByID,
boolean union)
throws java.lang.IllegalArgumentException
- concatenate alignments
- Parameters:
list
- array with alignments to concatenatemergeByID
- if true it will be by ID nameunion
- if true it will create the union of the list, if false the intersection will be produced
getData
public char getData(int seq,
int site)
- sequence alignment at (sequence, site)
- Specified by:
getData
in interface Alignment
- Overrides:
getData
in class AbstractAlignment
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
getChromosomePosition
public float getChromosomePosition(int site)
- Return the position along chromosome
- Specified by:
getChromosomePosition
in interface AnnotationAlignment
getChromosome
public int getChromosome(int site)
- Returns chromosome
- Specified by:
getChromosome
in interface AnnotationAlignment
getWeightedLocusPosition
public float getWeightedLocusPosition(int site)
- Return the weighted position along the gene (handles gaps)
- Specified by:
getWeightedLocusPosition
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:
AnnotationAlignment
- Returns a report for the alignment
- Specified by:
report
in interface AnnotationAlignment
- Overrides:
report
in class AbstractAlignment
- Following copied from interface:
pal.misc.Report
- Parameters:
out
- output stream