primer_designer package¶
Submodules¶
primer_designer.designer module¶
- class primer_designer.designer.PrimerDesigner(folder=None, taxon_for_codon_usage=None, tm='55', min_amplength='100', max_amplength='500', gencode='universal', mode='primers', clustype='dna', amptype='dna_GTR', email=None)[source]¶
Bases: builtins.object
Class for designing primers from FASTA files.
It will send a FASTA alignment to primers4clades in order to design degenerate primers. Input data needed is an alignment in FASTA format containing at least 4 sequences. It is recommended that the beginning of each FASTA sequence description contains the taxon name between square brackets.
Parameters: - folder (str) – path of folder containing the FASTA file alignments
- taxon_for_codon_usage (str) – optional taxon name that will be inserted in the description of FASTA sequences between square brackets so that can be used by primer4clades to infer the codon table to use
- tm (str) – temperature
- min_amplength (str) – minimum amplicon length
- max_amplength (str) – maximum amplicon length
- gencode (str) – genetic code. See below for all available genetic codes
- clustype (str) – cluster distance metric: dna, protein.
- amptype (str) – substitution model used to estimate phylogenetic information
- email (str) – your email address so that primer4clades can send you email with detailed results
Example
>>> # The values shown are the default. Change them if needed. >>> from primer_designer import PrimerDesigner >>> pd = PrimerDesigner() >>> pd.folder = "alignments" # folder containing the FASTA file alignments >>> pd.tm = "55" # annealing temperature >>> pd.min_amplength = "250" # minimum amplicon length >>> pd.max_amplength = "500" # maximum amplicon length >>> pd.gencode = "universal" # see below for all available genetic codes >>> pd.mode = "primers" >>> pd.clustype = "dna" >>> pd.amptype = "dna_GTRG" # substitution model used to estimate phylogenetic information >>> pd.email = "youremail@email.com" # primer4clades will send you an email with very detailed results >>> pd.design_primers()
The best primer pairs will be printed to your screen. Detailed results will be saved as HTML files in your alignments folder. But it is recommended if you also get the results by email. primers4clades will send you one email for each alignment. The genetic code table (variable gencode) can be any of the following:
- universal for standard
- 2 for vertebrate mitochondrial
- 3 for yeast mitochondrial
- 4 for mold and protozoa mitochondrial
- 5 for invertebrate mitochondrial
- 6 for ciliate
- 9 for echinoderm and flatworm
- 10 for euplotid nuclear
- 11 for bacterial and plastid
- 12 for alternative yeast nuclear
- 13 for ascidian mitochondrial
- 14 for flatworm mitochondrial
- 15 for Blepharisma nuclear
- 16 for Chlorophycean mitochondrial
- 21 for Trematode mitochondrial
- 22 for Scenedesmus obliquus mitochondrial
- 23 for Thraustochytrium mitochondrial
The evolutionary substitution model can be any of the following (variable amptype):
- protein_WAGG for protein WAG+G
- protein_JTTG for protein JTT+G
- protein_Blosum62G for protein Blosum62+G
- protein_VTG for protein VT+G
- protein_DayhoffG for protein Dayhoff+G
- protein_MtREVG for protein MtREV+G
- dna_HKYG for dna HKY+G
- dna_GTRG for dna GTR+G
- dna_K80G for dna K80+G
- dna_TrNG for dna TrN+G
- dna_JC69G for dna JC69+G
- insert_taxon_in_new_fasta_file(aln)[source]¶
primer4clades infers the codon usage table from the taxon names in the sequences.
These names need to be enclosed by square brackets and be present in the description of the FASTA sequence. The position is not important. I will insert the names in the description in a new FASTA file.
Returns: Filename of modified FASTA file that includes the name of the taxon.
primer_designer.utils module¶
Module contents¶
- class primer_designer.PrimerDesigner(folder=None, taxon_for_codon_usage=None, tm='55', min_amplength='100', max_amplength='500', gencode='universal', mode='primers', clustype='dna', amptype='dna_GTR', email=None)¶
Bases: builtins.object
Class for designing primers from FASTA files.
It will send a FASTA alignment to primers4clades in order to design degenerate primers. Input data needed is an alignment in FASTA format containing at least 4 sequences. It is recommended that the beginning of each FASTA sequence description contains the taxon name between square brackets.
Parameters: - folder (str) – path of folder containing the FASTA file alignments
- taxon_for_codon_usage (str) – optional taxon name that will be inserted in the description of FASTA sequences between square brackets so that can be used by primer4clades to infer the codon table to use
- tm (str) – temperature
- min_amplength (str) – minimum amplicon length
- max_amplength (str) – maximum amplicon length
- gencode (str) – genetic code. See below for all available genetic codes
- clustype (str) – cluster distance metric: dna, protein.
- amptype (str) – substitution model used to estimate phylogenetic information
- email (str) – your email address so that primer4clades can send you email with detailed results
Example
>>> # The values shown are the default. Change them if needed. >>> from primer_designer import PrimerDesigner >>> pd = PrimerDesigner() >>> pd.folder = "alignments" # folder containing the FASTA file alignments >>> pd.tm = "55" # annealing temperature >>> pd.min_amplength = "250" # minimum amplicon length >>> pd.max_amplength = "500" # maximum amplicon length >>> pd.gencode = "universal" # see below for all available genetic codes >>> pd.mode = "primers" >>> pd.clustype = "dna" >>> pd.amptype = "dna_GTRG" # substitution model used to estimate phylogenetic information >>> pd.email = "youremail@email.com" # primer4clades will send you an email with very detailed results >>> pd.design_primers()
The best primer pairs will be printed to your screen. Detailed results will be saved as HTML files in your alignments folder. But it is recommended if you also get the results by email. primers4clades will send you one email for each alignment. The genetic code table (variable gencode) can be any of the following:
- universal for standard
- 2 for vertebrate mitochondrial
- 3 for yeast mitochondrial
- 4 for mold and protozoa mitochondrial
- 5 for invertebrate mitochondrial
- 6 for ciliate
- 9 for echinoderm and flatworm
- 10 for euplotid nuclear
- 11 for bacterial and plastid
- 12 for alternative yeast nuclear
- 13 for ascidian mitochondrial
- 14 for flatworm mitochondrial
- 15 for Blepharisma nuclear
- 16 for Chlorophycean mitochondrial
- 21 for Trematode mitochondrial
- 22 for Scenedesmus obliquus mitochondrial
- 23 for Thraustochytrium mitochondrial
The evolutionary substitution model can be any of the following (variable amptype):
- protein_WAGG for protein WAG+G
- protein_JTTG for protein JTT+G
- protein_Blosum62G for protein Blosum62+G
- protein_VTG for protein VT+G
- protein_DayhoffG for protein Dayhoff+G
- protein_MtREVG for protein MtREV+G
- dna_HKYG for dna HKY+G
- dna_GTRG for dna GTR+G
- dna_K80G for dna K80+G
- dna_TrNG for dna TrN+G
- dna_JC69G for dna JC69+G
- design_primers()¶
- insert_taxon_in_new_fasta_file(aln)¶
primer4clades infers the codon usage table from the taxon names in the sequences.
These names need to be enclosed by square brackets and be present in the description of the FASTA sequence. The position is not important. I will insert the names in the description in a new FASTA file.
Returns: Filename of modified FASTA file that includes the name of the taxon.
- process_response(aln, response_body)¶
- request_primers(aln)¶