|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
pal.popgen.LinkageDisequilibrium
public class LinkageDisequilibrium
This class calculates D' and r^2 estimates of linkage disequilibrium. It also calculates the significance of the LD by either Fisher Exact or the multinomial permutation test. This class can work with either normal alignments of annotated alignments. The alignments should be stripped of invariable sites. 2 state estimates of D' and r^2 can be found reviewed and discussed in Weir 1996 multi-state loci (>=3) require an averaging approach. These should not be used for popgen parameter estimates, unless you know specifically that it works for multistate loci. The estimate of D' is the approach used by Farnir 2000 Genome Research 10:220-227 that follows Hedrick 1987. r^2 was estimated in a similar way.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
protected Alignment |
theAlignment
|
protected AnnotationAlignment |
theAnnotationAlignment
|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
LinkageDisequilibrium(Alignment alignment)
compute LD based on an alignment. |
|
LinkageDisequilibrium(Alignment alignment,
boolean rapidPermute,
int numberOfPermutations)
compute LD based on an alignment |
Method Summary | |
---|---|
AnnotationAlignment |
getAnnotatedAlignment()
Returns an annotated aligment if one was used for this LD this could be used to access information of locus position |
double |
getDPrime(int r,
int c)
Returns D' estimate for a given pair of sites |
int |
getN(int r,
int c)
Get number of gametes included in LD calculations (after missing data was excluded) |
double |
getP(int r,
int c)
Returns P-value estimate for a given pair of sites. |
double |
getRSqr(int r,
int c)
Returns r^2 estimate for a given pair of sites |
int |
getSiteCount()
Returns the counts of the sites in the alignment |
java.lang.Object[] |
getTableColumnNames()
get the names of the columns |
java.lang.Object[][] |
getTableData()
get the data elements |
java.lang.String |
getTableTitle()
get the title of the table |
void |
print(LinkageDisequilibrium ld,
java.io.PrintWriter out)
print the LD to the PrintWrite |
void |
run()
starts the thread to calculate LD |
java.lang.String |
toString()
returns representation of the LD results as a string |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Alignment theAlignment
protected AnnotationAlignment theAnnotationAlignment
Constructor Detail |
---|
public LinkageDisequilibrium(Alignment alignment)
alignment
- Alignment or AnnotationAlignment (this should only contain
polymorphic sites)public LinkageDisequilibrium(Alignment alignment, boolean rapidPermute, int numberOfPermutations)
alignment
- Alignment or AnnotationAlignment (this should only contain
polymorphic sites)rapidPermute
- Use a rapid approach to P-value estimation (see Contigency Table)numberOfPermutations
- The number of permutations to determine P valuesMethod Detail |
---|
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public double getP(int r, int c)
r
- is site 1c
- is site 2
public int getN(int r, int c)
r
- is site 1c
- is site 2
public double getDPrime(int r, int c)
r
- is site 1c
- is site 2
public double getRSqr(int r, int c)
r
- is site 1c
- is site 2
public int getSiteCount()
public AnnotationAlignment getAnnotatedAlignment()
public java.lang.String toString()
toString
in class java.lang.Thread
public void print(LinkageDisequilibrium ld, java.io.PrintWriter out)
public java.lang.Object[] getTableColumnNames()
TableReport
getTableColumnNames
in interface TableReport
public java.lang.Object[][] getTableData()
TableReport
getTableData
in interface TableReport
public java.lang.String getTableTitle()
TableReport
getTableTitle
in interface TableReport
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |