Options
All
  • Public
  • Public/Protected
  • All
Menu

Specialized class that allows to translate and transcript RNA sequences

Hierarchy

  • RNATranslator

Index

Methods

findSeqStartAndStop

  • findSeqStartAndStop(rna: string, start?: boolean, stop?: boolean): string
  • Given a RNA string, this method will chop the RNA string into the First Start and the First STOP codon's available in the string Given AGAUGCUGCUGCAGU the string returned will be AUGCUGCUGCAGU or Given AGAUGGUAUAGCUGCUGCAGU the string returned will be AUGGUAUAG Given the case without any Start or STOP codons, the string will be unmodified. NEW The parameters start and stop have been added which in turn will let you decide whether you want to include full starts or full stops, notice however that the sequence will be different if you put starts=true & stops=true, for example:

    findSeqStartAndStop("AAAAUGACGAUG", true); // starts = [3, 9] -> AUGACGAUG
    findSeqStartAndStop("CGAUGCGUAUGCGCG", true) // starts = [2,8] -> AUGCGUAUGCGCG
    findSeqStartAndStop("AAAAUGACGAUG", false); // starts = [] -> AAAAUGACGAUG
    findSeqStartAndStop("CGAUGCGUAUGCGCG", false) // starts = [] -> CGAUGCGUAUGCGCG
    

    Parameters

    • rna: string
    • Default value start: boolean = false
    • Default value stop: boolean = false

    Returns string

    Choped string containing the rna sequence ready to translate or transcript

findStarts

  • findStarts(rna: string): number[]
  • This method returns an array of positions where start sequences are this method could be useful if you need to identify if ther are any repeated start codons in a sequence or if you need to translate a sequence from different start codons.

    Parameters

    • rna: string

    Returns number[]

    Returns an array with the indexes of the start sequences ("AUG");

findStops

  • findStops(rna: string): number[]
  • This method will find any stop codons in a RNA string,

    Parameters

    • rna: string

    Returns number[]

    Returns an array with the indexes of the Stop codons ('UAA','UAG','UGA')

matchOpositeRnaBase

  • matchOpositeRnaBase(b: RNA): RNA

matchRnaBase

  • matchRnaBase(b: any): RNA

rnaToCodonArray

  • rnaToCodonArray(rna: string, starts?: boolean, stops?: boolean): Codon[]
  • Given a RNA string, this method will convert any codons available in the string however this method will try to translate a sequence from the first start codon and the first STOP codon Given AGAUGCUGCUGCAGU the string used for the translation will be AUGCUGCUGCAGU or Given AGAUGGUAUAGCUGCUGCAGU the string for translation will be AUGGUAUAG

    Parameters

    • rna: string
    • Optional starts: boolean
    • Optional stops: boolean

    Returns Codon[]

    Codon array that can be used to transcribe into an AA sequence

rnaToString

  • rnaToString(rna: RNA[]): string

transRNAtoAA

  • transRNAtoAA(rna: string, starts?: boolean, stops?: boolean): string
  • This method is a quite tricky to implement, while some schools will say you have to read all the chain with it's multiple stop codons, some will tell you there's only one start and stop codon the new approach here is to let you decide whether you want to include all starts or all stops or both.

    Parameters

    • rna: string
    • Optional starts: boolean
    • Optional stops: boolean

    Returns string

    The string returned is a complementary sequence of the provided in the parameter

    UACGAU
    
    Tyr-Asp
    

transRNAtoDNA

  • transRNAtoDNA(rna: string): string
  • Parameters

    • rna: string

    Returns string

    The string returned is a complementary sequence of the provided.

    UACGAU
    
    ATGCTA
    

transRNAtoRNA

  • transRNAtoRNA(rna: string): string
  • Parameters

    • rna: string

    Returns string

    The string returned is a complementary sequence of the provided in the parameter

    UACGAU
    
    AUGCUA
    

Generated using TypeDoc