public final class GenomeVariantNormalizer extends Object
GenomeVariant
s.Constructor and Description |
---|
GenomeVariantNormalizer() |
Modifier and Type | Method and Description |
---|---|
static GenomeVariant |
normalizeDeletion(TranscriptModel transcript,
GenomeVariant change,
TranscriptPosition txPos)
Transform a deletion
GenomeVariant into its HGVS-normalized representation. |
static GenomeVariant |
normalizeGenomeChange(TranscriptModel transcript,
GenomeVariant change,
TranscriptPosition txPos)
Transform a
GenomeVariant to its HGVS-normalized representation. |
static GenomeVariant |
normalizeInsertion(TranscriptModel transcript,
GenomeVariant change,
TranscriptPosition txPos)
Transform an insertion
GenomeVariant to its HGVS-normalized representation. |
public static GenomeVariant normalizeGenomeChange(TranscriptModel transcript, GenomeVariant change, TranscriptPosition txPos)
GenomeVariant
to its HGVS-normalized representation.transcript
- the transcript with the sequence that should be usedchange
- the genome change for which we want to return the HGVS-normalized representation fortxPos
- the corresponding position on the transcriptGenomeVariant
public static GenomeVariant normalizeInsertion(TranscriptModel transcript, GenomeVariant change, TranscriptPosition txPos)
GenomeVariant
to its HGVS-normalized representation.
The algorithm works as follows. String alt = change.getAlt()
is inserted into
transcript.sequence
at the position int pos = txPos.getPos()
. Then,
pos
is incremented as long as pos + alt.length() < transcript.sequence.length()
and
transcript.sequence[pos] = transcript.sequence[pos + alt.length()]
. The last pos
fulfilling this condition is then used to construct the resulting GenomeVariant
.
If necessary, the strand of change
is set to the same as transcript
.transcript
- the transcript with the sequence that should be usedchange
- the genome change for which we want to return the HGVS-normalized representation fortxPos
- the corresponding position on the transcriptGenomeVariant
public static GenomeVariant normalizeDeletion(TranscriptModel transcript, GenomeVariant change, TranscriptPosition txPos)
GenomeVariant
into its HGVS-normalized representation.
This simply works by shifting the interval to the left as long as the first deleted character equals the
character after the deleetion.
Note that this function should only be called if the change's deletion interval does not span a splice
site.transcript
- the transcript with the sequence that should be usedchange
- the genome change for which we want to return the HGVS-normalized representation fortxPos
- the corresponding position on the transcriptGenomeVariant
Copyright © 2016. All rights reserved.