pydna.myprimers
Provides a practical way to access a list of primer sequences in a text file.
The path of a text file can be specified in the pydna.ini file or by the ´pydna_primers´ environment variable.
The file is expected to contain sequences in FASTA, Genbank or EMBL formats or any format readable by the parse_primers function.
The primer list is expected to follow the convension below. The primer name is expected to begin with the number.
can have the format below for example:
>2_third_primer
tgagtagtcgtagtcgtcgtat
>1_second_primer
tgatcgtcatgctgactatactat
>0_first_primer
ctaggatcgtagatctagctg
...
The primerlist funtion returns a list of pydna.primer.Primer
objects
primerdict returns a dict where the key is the id of the object.
- class pydna.myprimers.PrimerList(initlist: ~typing.Iterable = None, path: (<class 'str'>, <class 'pathlib.Path'>) = None, *args, identifier: str = "p", **kwargs)[source]
Bases:
UserList
Read a text file with primers.
The primers can be of any format readable by the parse_primers function. Lines beginning with # are ignored. Path defaults to the path given by the pydna_primers environment variable.
The primer list does not accept new primers. Use the assign_numbers_to_new_primers method and paste the new primers at the top of the list.
The primer list remembers the numbers of accessed primers. The indices of accessed primers are stored in the .accessed property.
- property accessed
docstring.
- pydna.myprimers.check_primer_numbers(pl: list = None)[source]
Find primers whose number do not match position in list.