pydna.amplicon

This module provides the Amplicon class for PCR simulation. This class is not meant to be use directly but is used by the amplify module

class pydna.amplicon.Amplicon(record, *args, template=None, forward_primer=None, reverse_primer=None, **kwargs)[source]

Bases: Dseqrecord

The Amplicon class holds information about a PCR reaction involving two primers and one template. This class is used by the Anneal class and is not meant to be instantiated directly.

Parameters:
  • forward_primer (SeqRecord(Biopython)) – SeqRecord object holding the forward (sense) primer

  • reverse_primer (SeqRecord(Biopython)) – SeqRecord object holding the reverse (antisense) primer

  • template (Dseqrecord) – Dseqrecord object holding the template (circular or linear)

classmethod from_SeqRecord(record, *args, path=None, **kwargs)[source]
reverse_complement()[source]

Reverse complement.

Examples

>>> from pydna.dseqrecord import Dseqrecord
>>> a=Dseqrecord("ggaatt")
>>> a
Dseqrecord(-6)
>>> a.seq
Dseq(-6)
ggaatt
ccttaa
>>> a.reverse_complement().seq
Dseq(-6)
aattcc
ttaagg
>>>
rc()

Reverse complement.

Examples

>>> from pydna.dseqrecord import Dseqrecord
>>> a=Dseqrecord("ggaatt")
>>> a
Dseqrecord(-6)
>>> a.seq
Dseq(-6)
ggaatt
ccttaa
>>> a.reverse_complement().seq
Dseq(-6)
aattcc
ttaagg
>>>
figure()[source]

This method returns a simple figure of the two primers binding to a part of the template.

5tacactcaccgtctatcattatc...cgactgtatcatctgatagcac3
                           ||||||||||||||||||||||
                          3gctgacatagtagactatcgtg5
5tacactcaccgtctatcattatc3
 |||||||||||||||||||||||
3atgtgagtggcagatagtaatag...gctgacatagtagactatcgtg5
Returns:

figure – A string containing a text representation of the primers annealing on the template (see example above).

Return type:

string

set_forward_primer_footprint(length)[source]
set_reverse_primer_footprint(length)[source]
program()[source]
dbd_program()[source]
primers()[source]