public class HaplotypeMap extends Object
Constructor | Description |
---|---|
HaplotypeMap(htsjdk.samtools.SAMFileHeader header) |
Constructs an empty HaplotypeMap using the provided SAMFileHeader's sequence dictionary.
|
HaplotypeMap(File file) |
Constructs a HaplotypeMap from the provided file.
|
Modifier and Type | Method | Description |
---|---|---|
void |
addHaplotype(HaplotypeBlock haplotypeBlock) |
Adds a HaplotypeBlock to the map and updates all the relevant caches/indices.
|
Set<Snp> |
getAllSnps() |
Returns an unmodifiable collection of all SNPs in all Haplotype blocks.
|
HaplotypeBlock |
getHaplotype(String snpName) |
Queries a HaplotypeBlock by Snp name.
|
HaplotypeBlock |
getHaplotype(String chrom,
int pos) |
Queries a HaplotypeBlock by Snp chromosome and position.
|
HaplotypeBlock |
getHaplotype(Snp snp) |
Queries a HaplotypeBlock by Snp object.
|
List<HaplotypeBlock> |
getHaplotypes() |
Returns an unmodifiable collection of all the haplotype blocks in the map.
|
htsjdk.samtools.SAMFileHeader |
getHeader() |
|
htsjdk.samtools.util.IntervalList |
getIntervalList() |
Returns an IntervalList with an entry for every SNP in every Haplotype in the map.
|
Snp |
getSnp(String chrom,
int pos) |
Queries a Snp by chromosome and position.
|
HaplotypeMap |
withoutChromosomes(Set<String> chroms) |
Returns a copy of this haplotype map that excludes haplotypes on the chromosomes provided.
|
void |
writeToFile(File file) |
Writes out a HaplotypeMap file with the contents of this map.
|
public HaplotypeMap(File file)
public HaplotypeMap(htsjdk.samtools.SAMFileHeader header)
public void addHaplotype(HaplotypeBlock haplotypeBlock)
public HaplotypeBlock getHaplotype(Snp snp)
public HaplotypeBlock getHaplotype(String snpName)
public HaplotypeBlock getHaplotype(String chrom, int pos)
public List<HaplotypeBlock> getHaplotypes()
public Snp getSnp(String chrom, int pos)
public Set<Snp> getAllSnps()
public htsjdk.samtools.util.IntervalList getIntervalList()
public HaplotypeMap withoutChromosomes(Set<String> chroms)
chroms
- a set of zero or more chromosome namespublic void writeToFile(File file)
public htsjdk.samtools.SAMFileHeader getHeader()