RiboKit : Primerize

PCR Assembly Primer Design

primerize.util Module

primerize.util.DNA2RNA(sequence)

Convert a DNA sequence input to RNA.

Parameters:

sequencestr: Input DNA sequence.

Returns:

str – String of RNA

primerize.util.RNA2DNA(sequence)

Convert a RNA sequence input to DNA.

Parameters:

sequencestr: Input RNA sequence.

Returns:

str – String of DNA

primerize.util.complement(sequence)

Convert a DNA sequence input to its complement strand.

Parameters:

sequencestr: Input DNA sequence.

Returns:

str – String of complement DNA strand.

Raises:

ValueError – For illegal sequence.

primerize.util.coord_to_num(coord)

Convert a 96-Well Coordinate string to number (1-based).

Parameters:

coordstr: Input WellPosition coordinate string, e.g. 'A01'.

Returns:

int or None if illegal input.

primerize.util.diff_bps(structures, offset=0, flag=True)

Find base-pairs that are not present in all secondary structure inputs. Each input secondary structure is compared to all the others.

Parameters:
  • structureslist(str): Input secondary structures.

  • offstint: (Optional) Index numbering offset for output numbers.

  • flagbool: (Optional) Overriding flag for excluding shared helices.

Returns:

list(list(tuple(int, int))) – List of helices, and each helix is a list of tuple of base-pairs with their seqpos.

primerize.util.get_mut_range(mut_start, mut_end, offset, sequence)

Validate and calculate mutation range based on input sequence and offset. If mutation range exceeds possible range, the maximum possible range is returned.

Parameters:
  • mut_startint: Lower limit of mutation range, should be based on offset.

  • mut_endint: Upper limit of mutation range, should be based on offset.

  • offsetint: Index numbering offset.

  • sequencestr: The sequence (length used).

Returns:

(which_muts, mut_start, mut_end)

  • which_muts - list(int): The final range of mutations.

  • mut_start - int: The valid mut_start.

  • mut_end - int: The valid mut_end.

primerize.util.get_mutation(nt, lib)

Mutate a single nucleotide.

Parameters:
  • ntstr: The nucleotide of interest.

  • lib

    int: The mutation library choice; choose from (1, 2, 3, 4):

    * 1 represents "A->U, U->A, C->G, G->C",
    * 2 represents "A->C, U->C, C->A, G->A",
    * 3 represents "A->G, U->G, C->U, G->U",
    * 4 represents "A->C, U->G, C->A, G->U",
    * 5 represents "A->C, U->G, C->G, G->C".
    

Returns:

str

Raises:

ValueError – For illegal lib input.

primerize.util.num_to_coord(num)

Convert a 96-Well Coordinate number (1-based) to string.

Parameters:

numint: Input WellPosition coordinate number, e.g. 96.

Returns:

str or None if illegal input.

primerize.util.reverse(sequence)

Convert a DNA sequence input to its reverse order.

Parameters:

sequencestr: Input DNA sequence.

Returns:

str – String of reverse DNA strand.

primerize.util.reverse_complement(sequence)

Convert a DNA sequence input to its reverse complement strand.

Parameters:

sequencestr: Input DNA sequence.

Returns:

str – String of reverse complement DNA strand.

primerize.util.str_to_bps(structure, offset=0)

Convert a dot-bracket secondary structure into base-pair tuples.

Parameters:
  • structurestr: Input secondary struture.

  • offsetint: (Optional) Index numbering offset for output numbers.

Returns:

list(list(tuple(int, int))) – List of helices, and each helix is a list of tuple of base-pairs with their seqpos.

primerize.util.valid_WC_pair(nt_1, nt_2)

Check if two nucleotides form a valid Watson-Crick base-pair.

Parameters:
  • nt_1str: Nucleotide.

  • nt_2str: Nucleotide.

Returns:

bool

Built with Sphinx using a RiboKit Theme . Hosted on GitHub Pages.

© Copyright 2008-2024 The Board of Trustees of the Leland Stanford Junior University. All Rights Reserved.

Last updated on Dec 13, 2024.