Bases: TASSELpy.java.lang.Object.Object
Methods
Builder | |
castTo(pyType) | Casts this object to another java/python type |
clone(*args) | Creates and returns a copy of this object |
dPrime(*args) | Gets the D’ value |
equals(*args) | Indicates whether some other object is “equal to” this one |
getArray(size) | Gets an empty wrapped java array that can accept the type of the wrapped |
getClass(*args) | Returns the runtime class of this Object. |
getDblArray(rows[, cols]) | Gets an empty wrapped java array that can accept the type of other wrapped java arrays: i.e. |
hashCode(*args) | Returns a hash code vlaue for the object |
n(*args) | Gets the number of individuals used to calculate LD |
p(*args) | Gets the p-value for r2 |
r2(*args) | Gets the r2 value |
site1(*args) | Gets the first site |
site2(*args) | Gets the second site |
toString(*args) | Returns a string representation of the object |
wrap_existing_array(arr_instance) | Wraps a java array of this class’s type |
Bases: TASSELpy.java.lang.Object.Object
Methods
build | |
castTo | |
clone | |
dprime | |
equals | |
getArray | |
getClass | |
getDblArray | |
hashCode | |
n | |
p | |
r2 | |
toString | |
wrap_existing_array |
Constructs an LDResult builder
Signature: | Builder (int site1, int site2) |
---|---|
Parameters: |
|
Builds the LDResult
Signature: | build () |
---|---|
Returns: | The LDResult |
Return type: | LDResult |
Adds the dprime value
Signature: | dprime (float value) |
---|---|
Parameters: | value (float) – The dprime value |
Returns: | The builder with the dprime value included |
Return type: | Builder |
Adds the n value
Signature: | n (int value) |
---|---|
Parameters: | value (int) – The n value |
Returns: | The builder with the n value included |
Return type: | Builder |
Constructs an LDResult
Signature: | LDResult (int site1, int site2, float r2, float dprime, float p, int n) |
---|
Gets the D’ value
Signature: | dPrime () |
---|---|
Returns: | The D’ value |
Return type: | float |
Gets the number of individuals used to calculate LD
Signature: | n () |
---|---|
Returns: | The number of individuals used to calculate LD |
Return type: | int |
Gets the p-value for r2
Signature: | p () |
---|---|
Returns: | The p value |
Return type: | float |
Gets the r2 value
Signature: | r2 () |
---|---|
Returns: | The r2 value |
Return type: | float |
Bases: TASSELpy.java.lang.Thread.Thread, TASSELpy.net.maizegenetics.util.TableReport.TableReport
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 numSites.
{@link testDesign} sets matrix design for LD calculation. Either all by
all, sliding window, site by all, or site list.
There are multiple approaches for dealing with heterozygous sites. {@link HetTreatment} sets the way these are treated. Haplotype assumes fully phased heterozygous sites (any hets are double counted). This is the best approach for speed when things are fully phased. Homozygous converted all hets to missing. Genotype does a 3x3 genotype analysis (to be implemented)
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. In TASSEL 3 in 2010, Buckler removed these approach as the relative magnitudes and meaningfulness of these approaches has never been clear. Additionally with the moving away from SSR to SNPs these methods are less relevant. Researchers should convert to biallelic - either by ignoring rarer classes or collapsing rarer states.
Methods
calculateBitLDForHaplotype(*args) | Calculates the Bit LD between two sites | ||
calculateDPrime(*args) | Calculates the normalized D’ from Weir Genetic Analysis II 1986 pg. | ||
calculateRSqr(*args) | Calculates the normalized r2 from Awadella Science 1999 286:2524 | ||
castTo(pyType) | Casts this object to another java/python type | ||
clone(*args) | Creates and returns a copy of this object | ||
equals(*args) | Indicates whether some other object is “equal to” this one | ||
getAlignment(*args) | Returns an annotated alignment if one was used for this LD. | ||
getArray(size) | Gets an empty wrapped java array that can accept the type of the wrapped | ||
getClass(*args) | Returns the runtime class of this Object. | ||
getColumnCount(*args) | Gets the number of columns | ||
getDPrime(*args) | Gets the D’ estimate for a given pair of numSites | ||
getDblArray(rows[, cols]) | Gets an empty wrapped java array that can accept the type of other wrapped java arrays: i.e. | ||
getElementCount(*args) | Gets the total number of elements in the dataset | ||
getLDForSitePair(*args) | Method for estimating LD between a pair of bit sets. | ||
getPval(*args) | Returns P-value estimate for a given pair of numPSites. | ||
getRSqr(*args) | Gets the r2 estimate for a given pair of numSites | ||
getRow(*args) | Returns specified row | ||
getRowCount(*args) | Gets the number of rows | ||
getSampleSize(*args) | Get number of gametes included in LD calculations (after missing data | ||
getSiteCount(*args) | Gets the counts of the numSites in the alignment | ||
getTableColumnNames(*args) | Gets the names of the columns | ||
getTableTitle(*args) | Gets the title of the table | ||
getValueAt(*args) | Returns value at given row and column | ||
getX(*args) |
|
||
getY(*args) |
|
||
hashCode(*args) | Returns a hash code vlaue for the object | ||
run(*args) | When an object implementing interface Runnable is used to create a thread, starting the | ||
toDict() | Outputs the table as a dictionary | ||
toString(*args) | Returns a string representation of the object | ||
wrap_existing_array(arr_instance) | Wraps a java array of this class’s type |
Constructor for doing LD analysis
Signature: | LinkageDisequilibrium (GenotypeTable alignment, int windowSize, testDesign LDType, int testSite, ProgressListener listener, boolean isAccumulativeReport, int numAccumulateIntervals, int[] sitesList, HetTreatment hetTreatment) |
---|---|
Parameters: |
|
Calculates the Bit LD between two sites
Signature: | calculateBitLDForHaplotype (boolean ignoreHets, int minTaxaForEstimate, GenotypeTable alignment, int site1, int site2) |
---|---|
Parameters: |
|
Returns: | LDResult containing the LD info |
Return type: | LDResult |
Calculates the normalized D’ from Weir Genetic Analysis II 1986 pg. 120
Signature: | calculateDPrime (int countAB, int countAb, int countaB, int countab, int minTaxaForEstimate) |
---|---|
Parameters: |
|
Returns: | Value of D’ |
Return type: | double |
Calculates the normalized r2 from Awadella Science 1999 286:2524
Signature: | calculateRSqr (int countAB, int countAb, int countaB, int countab, int minTaxaForEstimate) |
---|---|
Parameters: |
|
Returns: | Value of r2 |
Return type: | double |
Returns an annotated alignment if one was used for this LD. This could be used to access information of locus position
Signatures:
GenotypeTable getAlignment
Returns:
The GenotypeTable
Gets the D’ estimate for a given pair of numSites
Signature: | getDPrime (int r, int c) |
---|---|
Parameters: |
|
Returns: | D’ |
Return type: | float |
Method for estimating LD between a pair of bit sets. Since there can be tremendous missing data, minimum minor and minimum site counts ensure that meaningful results are estimated. Site indices are merely there for annotating the LDResult.
Signature: | getLDForSitePair (BitSet rMj, BitSet rMn, BitSet cMj, BitSet cMn, int minMinorCnt, int minCnt, float minR2, FisherExact myFisherExact, int site1Index, int site2Index) |
---|---|
Parameters: |
|
Returns: | An LDResult for the pair of sites |
Return type: | LDResult |
Returns P-value estimate for a given pair of numPSites. If there were only 2 alleles at each locus, then the Fisher Exact P-value (one-tail) is returned. If more states, then the permuted Monte Carlo test is used
Signature: | getPVal (int r, int c) |
---|---|
Parameters: |
|
Returns: | P-value |
Return type: | double |
Gets the r2 estimate for a given pair of numSites
Signature: | getRSqr (int r, int c) |
---|---|
Parameters: |
|
Returns: | r2 |
Return type: | float |
Get number of gametes included in LD calculations (after missing data was excluded)
Signature: | getSampleSize (int r, int c) |
---|---|
Parameters: |
|
Returns: | Number of gametes |
Return type: | int |
Gets the counts of the numSites in the alignment
Signature: | getSiteCount () |
---|---|
Returns: | The counts of the numSites in the alignment |
Return type: | int |