Class NucleotideSeqDescription
- java.lang.Object
-
- de.charite.compbio.jannovar.hgvs.nts.NucleotideSeqDescription
-
- All Implemented Interfaces:
ConvertibleToHGVSString
public class NucleotideSeqDescription extends Object implements ConvertibleToHGVSString
Specification for a nucleotide sequence, e.g. deleted or inserted.This can be either just a count or a nucleotide sequence.
- Author:
- Manuel Holtgrewe
-
-
Field Summary
Fields Modifier and Type Field Description static int
INVALID_NT_COUNT
sentinel value for invalid nucleotide count
-
Constructor Summary
Constructors Constructor Description NucleotideSeqDescription()
Construct as reporting the empty string.NucleotideSeqDescription(int ntCount)
Construct with nucleotide string length andnull
string.NucleotideSeqDescription(String nts)
Construct with nucleotide string length.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getNucleotides()
Get nucleotidestring, only available ifhasNucleotides()
returnstrue
.int
hashCode()
boolean
hasNucleotides()
boolean
isBlank()
int
length()
String
toHGVSString()
Return HGVS representation in three-letter amino acid code.String
toHGVSString(AminoAcidCode code)
Return HGVS representation using the given amino acid code.String
toString()
-
-
-
Field Detail
-
INVALID_NT_COUNT
public static final int INVALID_NT_COUNT
sentinel value for invalid nucleotide count- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NucleotideSeqDescription
public NucleotideSeqDescription()
Construct as reporting the empty string.
-
NucleotideSeqDescription
public NucleotideSeqDescription(int ntCount)
Construct with nucleotide string length andnull
string.
-
NucleotideSeqDescription
public NucleotideSeqDescription(String nts)
Construct with nucleotide string length.
-
-
Method Detail
-
hasNucleotides
public boolean hasNucleotides()
- Returns:
true
if the nucleotide sequence was specified
-
getNucleotides
public String getNucleotides()
Get nucleotidestring, only available ifhasNucleotides()
returnstrue
.- Returns:
- String of nucleotides in 1-character encoding
-
isBlank
public boolean isBlank()
- Returns:
true
if nothing is to be printed.
-
length
public int length()
- Returns:
- length of amino acids
-
toHGVSString
public String toHGVSString()
Description copied from interface:ConvertibleToHGVSString
Return HGVS representation in three-letter amino acid code.- Specified by:
toHGVSString
in interfaceConvertibleToHGVSString
- Returns:
- HGVS representation, e.g. "133L" for an
ProteinPointLocation
-
toHGVSString
public String toHGVSString(AminoAcidCode code)
Description copied from interface:ConvertibleToHGVSString
Return HGVS representation using the given amino acid code.- Specified by:
toHGVSString
in interfaceConvertibleToHGVSString
- Parameters:
code
-AminoAcidCode
to use- Returns:
- HGVS representation, e.g. "133L" for an
ProteinPointLocation
-
-