public final class TranscriptSequenceDecorator extends Object
TranscriptModel
that helps with operations on its sequenceConstructor and Description |
---|
TranscriptSequenceDecorator(TranscriptModel transcript) |
Modifier and Type | Method and Description |
---|---|
static String |
codonWithUpdatedBase(String transcriptCodon,
int frameShift,
char targetNC)
Update the base given by
frameShift in the given codon string transcriptCodon to
targetNC and return updated codon. |
String |
getCodonAt(TranscriptPosition txPos,
CDSPosition cdsPos)
Returns the codon (String of length 3) for a change at a given position
|
String |
getCodonsStartingFrom(TranscriptPosition txPos,
CDSPosition cdsPos)
Returns all codons (String of length 3 *
len ) starting from the affected one by the change at
txPos /cdsPos . |
String |
getCodonsStartingFrom(TranscriptPosition txPos,
CDSPosition cdsPos,
int count)
Returns a number of codons (String of length 3 *
len ) starting from the affected one by the change
at txPos /cdsPos . |
TranscriptModel |
getTranscript() |
static String |
nucleotidesWithInsertion(String transcriptNTs,
int frameShift,
String insertion)
Insert the string in
insertion at the position given by frameShift in the given codon
string transcriptCodon to targetNC and return the updated nucleic string. |
public TranscriptSequenceDecorator(TranscriptModel transcript)
public TranscriptModel getTranscript()
TranscriptModel
public static String codonWithUpdatedBase(String transcriptCodon, int frameShift, char targetNC)
frameShift
in the given codon string transcriptCodon
to
targetNC
and return updated codon.transcriptCodon
- the wild type codon nucleotide string from the codonframeShift
- the frame within the codontargetNC
- the target nucleotidepublic static String nucleotidesWithInsertion(String transcriptNTs, int frameShift, String insertion)
insertion
at the position given by frameShift
in the given codon
string transcriptCodon
to targetNC
and return the updated nucleic string.transcriptNTs
- the wild type nucleotide string from the codonframeShift
- the frame within the codoninsertion
- the String with the nucleotidespublic String getCodonAt(TranscriptPosition txPos, CDSPosition cdsPos) throws InvalidCodonException
txPos
- transcript position of the changecdsPos
- CDS position of the changeInvalidCodonException
- if the requested codon is not accessiblepublic String getCodonsStartingFrom(TranscriptPosition txPos, CDSPosition cdsPos, int count)
len
) starting from the affected one by the change
at txPos
/cdsPos
.
If there is not a sufficient number of nucleotides in the transcript string then return fewer, only up to the
end.txPos
- transcript position of the changecdsPos
- CDS position of the changecount
- number of codons to returnpublic String getCodonsStartingFrom(TranscriptPosition txPos, CDSPosition cdsPos)
len
) starting from the affected one by the change at
txPos
/cdsPos
.txPos
- transcript position of the changecdsPos
- CDS position of the changeCopyright © 2016. All rights reserved.