public final class GenotypingData<A extends htsjdk.variant.variantcontext.Allele> extends java.lang.Object implements SampleList, AlleleList<A>
AlleleList.ActualPermutation<A extends htsjdk.variant.variantcontext.Allele>, AlleleList.NonPermutation<A extends htsjdk.variant.variantcontext.Allele>
EMPTY_LIST
EMPTY_LIST
Constructor and Description |
---|
GenotypingData(PloidyModel ploidyModel,
ReadLikelihoods<A> likelihoods)
Constructs a new genotyping-data collection providing the ploidy model to apply to the input model
and the read-likelihoods collection.
|
Modifier and Type | Method and Description |
---|---|
A |
getAllele(int index)
Returns the allele at the given index in this AlleleList.
|
java.lang.String |
getSample(int sampleIndex)
Returns the element given its index within the set.
|
int |
indexOfAllele(A allele)
Returns the index of the given Allele in this AlleleList.
|
int |
indexOfSample(java.lang.String sample)
Returns the index of an object.
|
int |
numberOfAlleles()
Returns the number of alleles in this AlleleList.
|
int |
numberOfSamples()
Returns number of elements in the list.
|
PloidyModel |
ploidyModel()
Returns the ploidy model that corresponds to the data provided.
|
ReadLikelihoods<A> |
readLikelihoods()
Returns read-likelihoods to use for genotyping.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
asListOfSamples, asSetOfSamples, emptySampleList, equals, singletonSampleList
asListOfAlleles, containsAllele, emptyAlleleList, equals, indexOfReference, permutation
public GenotypingData(PloidyModel ploidyModel, ReadLikelihoods<A> likelihoods)
ploidyModel
- the ploidy model.likelihoods
- the read-likelihoods collection.java.lang.IllegalArgumentException
- if either ploidyModel
or likelihoods
is null
,
or they are not compatible in terms of the samples they contain; their lists must match.public PloidyModel ploidyModel()
null
.public int numberOfSamples()
SampleList
numberOfSamples
in interface SampleList
public int indexOfSample(java.lang.String sample)
SampleList
indexOfSample
in interface SampleList
sample
- the sample of interest.-1
if such a sample is not an element of this set, otherwise is index in the set thus a
values within [0,SampleList.numberOfSamples()
).public java.lang.String getSample(int sampleIndex)
SampleList
getSample
in interface SampleList
sampleIndex
- the target samples's index.null
; as null is not a valid element.public ReadLikelihoods<A> readLikelihoods()
null
.public int numberOfAlleles()
AlleleList
numberOfAlleles
in interface AlleleList<A extends htsjdk.variant.variantcontext.Allele>
public int indexOfAllele(A allele)
AlleleList
indexOfAllele
in interface AlleleList<A extends htsjdk.variant.variantcontext.Allele>
public A getAllele(int index)
AlleleList
getAllele
in interface AlleleList<A extends htsjdk.variant.variantcontext.Allele>