public final class GenotypeCalls extends Object implements Iterable<Map.Entry<String,Genotype>>
GenotypeList
as "list" indicates more of a "vertical" arrangement (multiple
sites) of genotypes instead of a "horizontal" one (one site, multiple samples).
Note: of course, the class is only immutable as long as payload
is immutable!Constructor and Description |
---|
GenotypeCalls(ChromosomeType chromType,
Iterable<? extends Map.Entry<String,Genotype>> sampleToGenotype)
Initialize
GenotypeCalls with mapping from sample to genotype |
GenotypeCalls(ChromosomeType chromType,
Iterable<? extends Map.Entry<String,Genotype>> sampleToGenotype,
Object payload)
Initialize
GenotypeCalls with mapping from sample to genotype and an additional "payload" object |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
ChromosomeType |
getChromType() |
Genotype |
getGenotypeBySampleNo(int sampleNo) |
Genotype |
getGenotypeForSample(String sample) |
int |
getNSamples() |
Object |
getPayload() |
com.google.common.collect.ImmutableList<String> |
getSampleNames() |
com.google.common.collect.ImmutableSortedMap<String,Genotype> |
getSampleToGenotype() |
int |
hashCode() |
Iterator<Map.Entry<String,Genotype>> |
iterator() |
String |
toString() |
forEach, spliterator
public GenotypeCalls(ChromosomeType chromType, Iterable<? extends Map.Entry<String,Genotype>> sampleToGenotype)
GenotypeCalls
with mapping from sample to genotypepublic GenotypeCalls(ChromosomeType chromType, Iterable<? extends Map.Entry<String,Genotype>> sampleToGenotype, Object payload)
GenotypeCalls
with mapping from sample to genotype and an additional "payload" objectchromType
- type of the chromosome of this genotype call sitesampleToGenotype
- Iterable
with mapping from sample name to Genotype
payload
- An arbitrary payload object. This could be something to later match the constructed
GenotypeCalls
back to an object in your application (e.g., the HTSJDK
VariantContext
that was used for constructing the GenotypeCalls
).public int getNSamples()
public Genotype getGenotypeBySampleNo(int sampleNo)
public ChromosomeType getChromType()
public com.google.common.collect.ImmutableSortedMap<String,Genotype> getSampleToGenotype()
public com.google.common.collect.ImmutableList<String> getSampleNames()
public Object getPayload()
Copyright © 2016. All rights reserved.