Package picard.fingerprint

# Class Snp

java.lang.Object
picard.fingerprint.Snp

All Implemented Interfaces:
  `htsjdk.samtools.util.Locatable`, `Comparable<Snp>`

public class Snp extends Object implements Comparable<Snp>, htsjdk.samtools.util.Locatable
Class to represent a SNP in context of a haplotype block that is used in fingerprinting.

## Constructor Summary

Constructors
Constructor
Description
`Snp(String name, String chrom, int pos, byte allele1, byte allele2, double maf, List<String> fingerprintPanels)`

## Method Summary

Modifier and Type
Method
Description
`int`
`compareTo(Snp that)`
`boolean`
`equals(Object o)`
`Snp`
`flip()`
Returns a new SNP object with the alleles swapped and MAF corrected.
`byte`
`getAllele1()`
`byte`
`getAllele2()`
`List<htsjdk.variant.variantcontext.Allele>`
`getAlleles()`
`String`
`getAlleleString()`
`String`
`getChrom()`
`String`
`getContig()`
`int`
`getEnd()`
`List<String>`
`getFingerprintPanels()`
`DiploidGenotype`
`getHeterogyzousGenotype()`
`DiploidGenotype`
`getHomozygousAllele1Genotype()`
`DiploidGenotype`
`getHomozygousAllele2Genotype()`
`double`
`getMaf()`
`String`
`getName()`
`int`
`getPos()`
`int`
`getStart()`
`int`
`hashCode()`
`String`
`toString()`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface htsjdk.samtools.util.Locatable

`contains, contigsMatch, getLengthOnReference, overlaps, withinDistanceOf`

## Constructor Details

### Snp

public Snp(String name, String chrom, int pos, byte allele1, byte allele2, double maf, List<String> fingerprintPanels)

## Method Details

### flip

public Snp flip()
Returns a new SNP object with the alleles swapped and MAF corrected.

### getName

public String getName()

### getChrom

public String getChrom()

### getPos

public int getPos()

### getAllele1

public byte getAllele1()

### getAllele2

public byte getAllele2()

### getAlleles

public List<htsjdk.variant.variantcontext.Allele> getAlleles()

### getMaf

public double getMaf()

### getFingerprintPanels

public List<String> getFingerprintPanels()

### getHomozygousAllele1Genotype

public DiploidGenotype getHomozygousAllele1Genotype()

### getHeterogyzousGenotype

public DiploidGenotype getHeterogyzousGenotype()

### getHomozygousAllele2Genotype

public DiploidGenotype getHomozygousAllele2Genotype()

### getAlleleString

public String getAlleleString()

### compareTo

public int compareTo(Snp that)

Specified by:
  `compareTo` in interface `Comparable<Snp>`

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### getContig

public String getContig()

Specified by:
  `getContig` in interface `htsjdk.samtools.util.Locatable`

### getStart

public int getStart()

Specified by:
  `getStart` in interface `htsjdk.samtools.util.Locatable`

### getEnd

public int getEnd()

Specified by:
  `getEnd` in interface `htsjdk.samtools.util.Locatable`