|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.metaqtl.MetaQtlData
public class MetaQtlData
QTL meta analysis first requires to gather the QTL according to the group trait they belong and then to format the QTL data into data points to perfom clustering. This class is dedicated to this task.
Chromosome chrom = ... // Compute the standard deviations of the QTL positions // on the chromosome. chrom.computeQtlSD(IMetaQtlConstants.SD_MODE_AVAILABLE); MetaQtlData qtlData = new MetaQtlData(); qtlData.qtls = chroms.qtls; // First we clusterize // QTL w.r.t to the trait group information qtlData.doTraitGroupClustering(); // Then we loop on each trait group for(int i=0;i<qtlData.ntg;i++) { Double[][] XSD = qtlData.getDataPoints(i); Double[] X = X[0]; // the qtl positions Double[] SD = X[1]; // the qtl standard deviations. // do something... }
Field Summary | |
---|---|
protected int |
ntg
The number of trait group. |
protected int[] |
ntgQtls
The number of QTL in each trait group. |
protected Qtl[] |
qtls
The QTL. |
protected int[][] |
tgidx
The indices of the QTL in the trait groups. |
protected java.lang.String[] |
tgnames
The trait group names. |
Constructor Summary | |
---|---|
MetaQtlData(Qtl[] qtls)
Create a new instance of MetaQtlData which
will represent the given array of Qtl . |
Method Summary | |
---|---|
void |
doTraitGroupClustering()
According to the values of the QTLTrait.group attribute of the trait attribute of the qtls this methos clusterize the qtls in trait groups. |
void |
doTraitOntologyClustering(IBioOntology ontology)
According to the given trait ontology this methods clusterize the QTL in group in such a way that each group represents a trait term in the ontology. |
java.lang.Double[][] |
getDataPoints(int tg,
boolean ignore)
For a given trait group indice this methods returns the data points as a matrix of Double X[0..1][0..n-1] where X[0] is the vector of the n position values and X[1] is the vector of the n standard deviations of the positions. |
Qtl |
getQtl(int i,
int j)
Returns the j^th QTL in the i^th cluster. |
int[] |
getQtlIdx(int i)
Returns the indices of the Qtl for the given trait cluster indice i . |
int |
getQtlNumber()
|
java.lang.String |
getTraitClusterName(int i)
|
java.lang.String[] |
getTraitClusterNames()
Returns the names of the trait clusters. |
int |
getTraitClusterNumber()
Returns the number of trait groups for this data set as defined by the clustering method. |
int |
getTraitClusterSize(int i)
Returns the size of the trait cluster i. |
void |
manageMissingData(int opt)
Manage the missing data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Qtl[] qtls
protected int ntg
protected int[] ntgQtls
protected java.lang.String[] tgnames
protected int[][] tgidx
Constructor Detail |
---|
public MetaQtlData(Qtl[] qtls)
MetaQtlData
which
will represent the given array of Qtl
.
qtls
- Method Detail |
---|
public void doTraitGroupClustering()
public java.lang.Double[][] getDataPoints(int tg, boolean ignore)
tg
- the trait group indice
public void doTraitOntologyClustering(IBioOntology ontology)
ontology
- the trait ontology.public int getQtlNumber()
public void manageMissingData(int opt)
opt
to parametrize the behaviour of the method to
do the imputation.
opt
- the option for missing data management.public int getTraitClusterNumber()
doTraitGroupClustering()
,
doTraitOntologyClustering(IBioOntology)
public java.lang.String getTraitClusterName(int i)
public int[] getQtlIdx(int i)
i
.
i
- the indice of the trait cluster.
public java.lang.String[] getTraitClusterNames()
public int getTraitClusterSize(int i)
i
-
public Qtl getQtl(int i, int j)
i
- j
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |