lib5c.parsers.primer_names module¶
Module providing helper functions for working with primer naming conventions, necessary for parsing certain primerfiles.
-
lib5c.parsers.primer_names.
dblalt_primer_parser
(name)[source]¶ The double alternating primer name parser.
- Parameters
name (str) – The name of the primer found in the appropriate column of the primer bedfile.
- Returns
This dict has the following structure:
{ 'region': str, 'number': int, 'orientation': "3'" or "5'", 'name': str }
These fields are parsed from the primer name.
- Return type
dict
Notes
You can write other name parsers to accommodate different primer naming conventions.
-
lib5c.parsers.primer_names.
default_bin_parser
(name)[source]¶ The default bin name parser.
- Parameters
name (str) – The name of the bin found in the appropriate column of the bin bedfile.
- Returns
This dict has the following structure:
{ 'region': str, 'index': int }
These fields are parsed from the bin name.
- Return type
dict
Notes
You can write other name parsers to accommodate different bin naming conventions.
-
lib5c.parsers.primer_names.
default_primer_parser
(name)[source]¶ The default primer name parser.
- Parameters
name (str) – The name of the primer found in the appropriate column of the primer bedfile.
- Returns
This dict has the following structure:
{ 'region': str, 'number': int, 'name': str }
These fields are parsed from the primer name.
- Return type
dict
Notes
You can write other name parsers to accommodate different primer naming conventions.
-
lib5c.parsers.primer_names.
guess_primer_name_parser
(name)[source]¶ Guesses the appropriate primer or bin name parser to use by looping through a list of possible parsers and testing if they work on a given primer name.
- Parameters
name (str) – The name of a primer to use for testing.
- Returns
The parser thought to be appropriate for this kind of primer name.
- Return type
function