Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

gates

  • gates(sequence: string): number[][]
  • Generates gates 2D Visualization of DNA from any sequence

    remarks

    Gates MA. A simple way to look at DNA. J Theor Biol. 1986;119(3):319-328. doi:10.1016/s0022-5193(86)80144-8

    Example Usage

    gates('ATGC')
    // returns [[0, 0, 0, 1, 0], [0, -1, 0, 0, 0]]

    In Gates’s method, DNA sequences are converted into 2D walks in which Ts, As, Cs, and Gs are up, down, left, and right, respectively. This gives each sequence a “shape.” However, there is degeneracy, meaning that a visualization is not necessarily unique. For example, TGAC is a square (up, right, down, and left), but so is GTCA (right, up, left, down).

    For more information visit: https://squiggle.readthedocs.io/en/latest/methods.html#gates

    Parameters

    • sequence: string

      sequence of DNA or RNA

    Returns number[][]

    coordinates for 2D visualization of DNA based on the Gates algorithm

gc_content

  • gc_content(sequence: string, gap: number): number[][]
  • Parameters

    • sequence: string
    • gap: number

    Returns number[][]

qi

  • qi(sequence: string): number[][]
  • Generates qi 2D Visualization of DNA from any sequence

    remarks

    Qi, Z., & Qi, X. (2007). Novel 2D graphical representation of DNA sequence based on dual nucleotides. Chemical Physics Letters, 440(1–3), 139–144. doi:10.1016/j.cplett.2007.03.107.

    Example Usage

    qi('ATGC')
    // returns [[0, 1, 2], [8, 7, 11]]

    Similar to Randic, Qi maps each 2-mer in the sequence to a unique y-value. Because there are more 2-mer combinations than lone bases, Qi graphs look like randic graphs with a larger range of y-values.

    Qi Assignment Key:

    AA = 12
    AC = 4
    GT = 6
    AG = 0
    CC = 13
    CA = 5
    CG = 10
    TT = 15
    GG = 14
    GC = 11
    AT = 8
    GA = 1
    TG = 7
    TA = 9
    TC = 3
    CT = 2

    For more information visit: https://squiggle.readthedocs.io/en/latest/methods.html#randic-and-qi

    Parameters

    • sequence: string

      sequence of DNA or RNA (lowercase and mixed cases are valid)

    Returns number[][]

    coordinates for 2D visualization of DNA based on the Qi algorithm

randic

  • randic(sequence: string): number[][]
  • Generates randic 2D Visualization of DNA from any sequence

    remarks

    Randić, M., Vračko, M., Lerš, N., & Plavšić, D. (2003). Novel 2-D graphical representation of DNA sequences and their numerical characterization. Chemical Physics Letters, 368(1–2), 1–6. doi:10.1016/s0009-2614(02)01784-0.

    Example Usage

    randic('ATGC')
    // returns [[0, 1, 2, 3], [3, 2, 1, 0]]

    Similar to tabalture, the Randic method assigns each base a different y-value.

    Specifically:

    A = 3
    T = 2
    G = 1
    C = 0

    *This visualization method isn't well suited to long sequences

    For more information visit: https://squiggle.readthedocs.io/en/latest/methods.html#randic-and-qi

    Parameters

    • sequence: string

      sequence of DNA or RNA (lowercase and mixed cases are valid)

    Returns number[][]

    coordinates for 2D visualization of DNA based on the Randic algorithm

squiggle

  • squiggle(sequence: string): number[][]
  • Generates squiggle 2D Visualization of DNA from any sequence

    remarks

    Lee, B. D. (2018). Squiggle: a user-friendly two-dimensional DNA sequence visualization tool. Bioinformatics. doi:10.1093/bioinformatics/bty807.

    Example Usage

    squiggle('ATGC')
    // returns [[0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4], [0, 0.5, 0, -0.5, -1, -0.5, 0, -0.5, 0]]

    Squiggle’s DNA visualization method is based on the UCSC .2bit format and the Qi et. al Huffman coding method. In essence, a DNA sequence is first converted into binary using the 2bit encoding scheme that maps T to 00, C to 01, A to 10, and G to 11. The bits can be mapped as end to end vectors.

    For more information visit: https://squiggle.readthedocs.io/en/latest/methods.html#squiggle

    Parameters

    • sequence: string

      sequence of DNA or RNA (lowercase and mixed cases are valid)

    Returns number[][]

    coordinates for 2D visualization of DNA based on the Squiggle algorithm

yau

  • yau(sequence: string): number[][]
  • Generates yau 2D Visualization of DNA from any sequence

    remarks

    Yau, S. S., Wang, J., Niknejad, A., Lu, C., Jin, N., & Ho, Y. K. (2003). DNA sequence representation without degeneracy. Nucleic acids research, 31(12), 3078-80.

    Example Usage

    yau('ATGC')
    // returns [[0, 0.5, 1, 1 + 3 ** 0.5 / 2, 1 + 2 * (3 ** 0.5 / 2)], [0, -(3 ** 0.5 / 2), 0, -0.5, 0]]

    Yau et. al’s method uses unit vectors with upward vectors indicating pyrimidine bases (C and T) and downward vectors indicating purine bases (A and G). Similar to Squiggle, this method has no degeneracy.

    The unit vectors are based on 30 and 60 degree values on the unit circle.

    Specifically:

    A = (0.5, -3**0.5/2) // ** represents exponents in js
    T = (0.5, 3**0.5/2)
    C = (3**0.5/2, 0.5)
    G = (3**0.5/2, -0.5)

    *Warning: The x-coordinate is not equivalent to the base position

    For more information visit: https://squiggle.readthedocs.io/en/latest/methods.html#yau

    Parameters

    • sequence: string

      sequence of DNA or RNA (lowercase and mixed cases are valid)

    Returns number[][]

    coordinates for 2D visualization of DNA based on the Yau algorithm

yau_bp

  • yau_bp(sequence: string): number[][]
  • Generates yau-bp 2D Visualization of DNA from any sequence

    remarks

    Lee, B. D. (2018). Squiggle: a user-friendly two-dimensional DNA sequence visualization tool. Bioinformatics*. doi:10.1093/bioinformatics/bty807. Yau, S. S., Wang, J., Niknejad, A., Lu, C., Jin, N., & Ho, Y. K. (2003). DNA sequence representation without degeneracy. *Nucleic acids research, 31(12), 3078-80.

    Example Usage

    yau_bp('ATGC')
    // returns [[0, 1, 2, 3, 4], [0, -1, 0, -0.5, 0]]

    Unique to DNAViz is the Yau-BP method, a slight modification of Yau’s method that ensures that the x axis is equivalent to the base position. It preserves that salient feature of the method, which is the purine/pyrimidine split.

    For more information visit: https://squiggle.readthedocs.io/en/latest/methods.html#yau-bp

    Parameters

    • sequence: string

      sequence of DNA or RNA (lowercase and mixed cases are valid)

    Returns number[][]

    coordinates for 2D visualization of DNA based on the Yau-BP algorithm

yau_int

  • yau_int(sequence: string): number[][]
  • Generates integer-valued 2D Visualization of DNA from any sequence

    Parameters

    • sequence: string

      DNA or RNA sequence (lowercase and mixed cases are valid)

    Returns number[][]

    coordinates for 2D visualization of DNA based on the Yau-Int algorithm

    Example Usage

    yau_int('ATGC')
    // returns [[0, 1, 2, 3, 4], [0, -2, 0, -1, 0]]

    This produces identically shaped visualizations to yau and yau_bp but with coordinates that can be represented as integers. Additionally, this method is defined for ambiguous bases.

Legend

  • Function

Generated using TypeDoc