DashBioUtils.decode_description
— Methoddecode_description(description)
Parse the first line of a FASTA file using the specifications of several different database headers (in _DATABASES). description
: The header line with the initial >
removed.
return`: A dictionary for which each key-value pair comprises a property specified by the database used and the value of that property given by the header. If the database is not recognized, the keys are given as 'desc-n' where n is the position of the property.
DashBioUtils.get_data
— Methodgetdata(datapath, pdbid, color; resetview=false, lc=true)
DashBioUtils.get_highlights
— Methodgethighlights(string, sep, atomindicator)
Helper function to set highlights using string
, sep
, atom_indicator
Example
a,b = DashBioUtils.NglParser.get_highlights("Hello.app", ".", "a")
DashBioUtils.read_fasta
— Methodreadfasta(datapathordatastring; isdatafile=true)
Read a file in FASTA format, either from a file or from a string of raw data.
datapath_or_datastring
: Either the path to the FASTA file (can be relative or absolute), or a string corresponding to the content of a FASTA file (including newline characters).
is_datafile
: Either true
(default) if passing the filepath to the data, or false
if passing a string of raw data.
return
: A list of protein objects, each containing a description (based on the header line) and the amino acid sequence with, optionally, all non-amino-acid letters removed.
DashBioUtils.read_xyz
— Methodreadxyz(datapathordatastring, isdatafile=true)
Read data in .xyz format, from either a file or a raw string. datapath_or_datastring
: Either the path to the XYZ file (can be relative or absolute), or a string corresponding to the content of an XYZ file (including newline characters). is_datafile
: Either True (default) if passing the filepath to the data, or False if passing a string of raw data. return
: A list of the atoms in the order that they appear on the file, stored in objects with keys "symbol", "x", "y", and "z".
DashBioUtils.single_split
— Methodsingle_split(string, sep)
Helper function to split string
into 2 sub string based on sep
Example
a,b = DashBioUtils.NglParser.single_split("hello.app",".")