pydna.parsers

Provides two functions, parse and parse_primers

pydna.parsers.extract_from_text(text)[source]

docstring.

pydna.parsers.embl_gb_fasta(text)[source]

Parse embl, genbank or fasta format from text.

Returns list of Bio.SeqRecord.SeqRecord

annotations[“molecule_type”] annotations[“topology”]

pydna.parsers.parse(data, ds=True)[source]

Return all DNA sequences found in data.

If no sequences are found, an empty list is returned. This is a greedy function, use carefully.

Parameters:
  • data (string or iterable) –

    The data parameter is a string containing:

    1. an absolute path to a local file. The file will be read in text mode and parsed for EMBL, FASTA and Genbank sequences. Can be a string or a Path object.

    2. a string containing one or more sequences in EMBL, GENBANK, or FASTA format. Mixed formats are allowed.

    3. data can be a list or other iterable where the elements are 1 or 2

  • ds (bool) – If True double stranded Dseqrecord objects are returned. If False single stranded Bio.SeqRecord [1] objects are returned.

Returns:

contains Dseqrecord or SeqRecord objects

Return type:

list

References

See also

read

pydna.parsers.parse_primers(data)[source]

docstring.