Package htsjdk.variant.vcf
Class VCFPercentEncodedTextTransformer
java.lang.Object
htsjdk.variant.vcf.VCFPercentEncodedTextTransformer
- All Implemented Interfaces:
VCFTextTransformer
Text transformer for attribute values embedded in VCF. VCF version 4.3 supports percent-encoding
of characters that have special meaning in VCF.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static String
decodePercentEncodedChars
(String rawText) Transform input strings containing embedded percent=encoded characters.decodeText
(String rawPart) Transform a single string, replacing % encoded values with their corresponding text.decodeText
(List<String> rawParts) Transform a list of strings, replacing % encoded values with their corresponding text in each string.
-
Constructor Details
-
VCFPercentEncodedTextTransformer
public VCFPercentEncodedTextTransformer()
-
-
Method Details
-
decodeText
Transform a single string, replacing % encoded values with their corresponding text.- Specified by:
decodeText
in interfaceVCFTextTransformer
- Parameters:
rawPart
- the raw string to be decoded- Returns:
- the decoded string
- Throws:
TribbleException
- if the the encoding is uninterpretable
-
decodeText
Transform a list of strings, replacing % encoded values with their corresponding text in each string.- Specified by:
decodeText
in interfaceVCFTextTransformer
- Parameters:
rawParts
- a list of raw strings- Returns:
- a list of decoded strings
- Throws:
TribbleException
- if the the encoding is uninterpretable
-
decodePercentEncodedChars
Transform input strings containing embedded percent=encoded characters. For example, when given the string '%3D%41' will return the string '=A'.- Parameters:
rawText
- a string containing zero or more embedded encodings- Returns:
- a string with all encoded characters replaced with the corresponding character
- Throws:
TribbleException
- if the the encoding is uninterpretable
-