public class DynamicBitStorage extends Object implements BitStorage
The cache is designed to support multiple scopes, but currently scope must be passed in at construction.
It is not clear that site or taxa optimization is needed. The code should be highly parallelizable as long as the gets are not for adjacent sites.
Constructor and Description |
---|
DynamicBitStorage(GenotypeCallTable genotype,
WHICH_ALLELE allele,
byte[] prefAllele) |
Modifier and Type | Method and Description |
---|---|
BitSet |
allelePresenceForAllSites(int taxon)
Returns sequence of true/false values indicating whether taxon at each
site matches a specific allele.
|
BitSet |
allelePresenceForAllTaxa(int site)
Returns sequence of true/false values indicating whether site at each
taxon matches a specific allele.
|
long[] |
allelePresenceForSitesBlock(int taxon,
int startBlock,
int endBlock)
Returns sequence of true/false values indicating whether taxon at sites
(in given blocks, 64 sites per block including start block but excluding
end block) matches a specific allele.
|
static DynamicBitStorage |
getUnknownInstance(GenotypeCallTable genotype) |
BitSet |
haplotypeAllelePresenceForAllSites(int taxon,
boolean firstParent)
Returns sequence of true/false values indicating whether taxon at each
site for given parent matches a specific allele (based on frequency).
|
BitSet |
haplotypeAllelePresenceForAllTaxa(int site,
boolean firstParent)
Returns sequence of true/false values indicating whether site at each
taxon for given parent matches a specific allele (based on frequency).
|
long[] |
haplotypeAllelePresenceForSitesBlock(int taxon,
boolean firstParent,
int startBlock,
int endBlock)
Returns sequence of true/false values indicating whether taxon at sites
(in given blocks, 64 sites per block including start block but excluding
end block) for given parent matches a specific allele (based on
frequency).
|
public DynamicBitStorage(GenotypeCallTable genotype, WHICH_ALLELE allele, byte[] prefAllele)
public BitSet allelePresenceForAllSites(int taxon)
BitStorage
allelePresenceForAllSites
in interface BitStorage
taxon
- taxonpublic BitSet allelePresenceForAllTaxa(int site)
BitStorage
allelePresenceForAllTaxa
in interface BitStorage
site
- sitepublic long[] allelePresenceForSitesBlock(int taxon, int startBlock, int endBlock)
BitStorage
allelePresenceForSitesBlock
in interface BitStorage
taxon
- taxonstartBlock
- starting blockendBlock
- end blockpublic BitSet haplotypeAllelePresenceForAllSites(int taxon, boolean firstParent)
BitStorage
haplotypeAllelePresenceForAllSites
in interface BitStorage
taxon
- taxonfirstParent
- true for first parent (false for second parent)public BitSet haplotypeAllelePresenceForAllTaxa(int site, boolean firstParent)
BitStorage
haplotypeAllelePresenceForAllTaxa
in interface BitStorage
site
- sitefirstParent
- true for first parent (false for second parent)public long[] haplotypeAllelePresenceForSitesBlock(int taxon, boolean firstParent, int startBlock, int endBlock)
BitStorage
haplotypeAllelePresenceForSitesBlock
in interface BitStorage
taxon
- taxonfirstParent
- true for first parent (false for second parent)startBlock
- starting blockendBlock
- end blockpublic static DynamicBitStorage getUnknownInstance(GenotypeCallTable genotype)
Copyright © 2018. All rights reserved.