valerius.utilities¶
Utility functions for reading in data.
-
valerius.utilities.
open
(path)[source]¶ Opens a sequence file and returns a processed
Sequence
.If the file is a FASTA file this will be detected and parsed accordingly.
- Parameters
path (str) – the location of the sequence file.
- Return type
Sequence
-
valerius.utilities.
split_string
(string)[source]¶ Takes a raw string and splits it into individual raw sequences.
- Parameters
string (str) – the string to split.
- Return type
list
-
valerius.utilities.
get_sequence_class
(string)[source]¶ Looks at a string sequence and tries to guess what kind of sequence it is before returning the appropriate class.
- Parameters
string (str) – the string sequence to inspect.
- Return type
class
-
valerius.utilities.
from_string
(string)[source]¶ Takes a filestring and turns it into a
Sequence
, parsing from FASTA if required.- Parameters
string (str) – the string to convert.
- Return type
Sequence