schrodinger.application.msv.gui.custom_family module¶
- exception schrodinger.application.msv.gui.custom_family.MissingAnnotationsError¶
Bases:
Exception
- __init__(*args, **kwargs)¶
- args¶
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- class schrodinger.application.msv.gui.custom_family.CustomFamily(title: str, aln: schrodinger.protein.alignment.ProteinAlignment, annotation: schrodinger.models.jsonable.CustomAnnotation, file_path: Optional[str] = None)¶
Bases:
tuple
Information about a custom family read from a custom family FASTA file.
- Variables
title – The name of the custom annotation
aln – The reference alignment for the family. If this family contains a custom annotations, it will be set for all residues of all sequences.
annotation – Information about the custom annotation. Will be None if the FASTA file didn’t contain any custom annotation values.
file_path – file path of the loaded custom fasta
- title: str¶
Alias for field number 0
- aln: schrodinger.protein.alignment.ProteinAlignment¶
Alias for field number 1
- annotation: schrodinger.models.jsonable.CustomAnnotation¶
Alias for field number 2
- file_path: str¶
Alias for field number 3
- __contains__(key, /)¶
Return key in self.
- __len__()¶
Return len(self).
- count(value, /)¶
Return number of occurrences of value.
- index(value, start=0, stop=9223372036854775807, /)¶
Return first index of value.
Raises ValueError if the value is not present.
- class schrodinger.application.msv.gui.custom_family.CustomFamilyFastaReader¶
Bases:
schrodinger.application.msv.seqio.FastaAlignmentReader
Reads in custom family FASTA files. These files should be formatted as follow:
The first line should start with “>Title: ” and specify the family name, e.g. “>Title: My Family Name”. If this line is not given, the filename will be used for the title.
The second line should start with “>Annotation:” and contain a comma and arrow (“=>” or “->”) delimited list of annotation descriptions (i.e. tool tip values). E.g. “>Annotation: A => Domain alpha, B => Domain beta”. This information may be split into multiple lines if needed, e.g.
>Annotation: A => Domain alpha, B => Domain beta" >Annotation: G => Domain gamma"
The third line should include the annotation sequence, properly aligned with the following sequences.
The annotation description and values are required.
The remaining lines of the file should be in standard FASTA format and contain the reference alignment for the family.
Note that the colons after “Title” and “Annotation” are optional and that “Annotations” (with an “s”) will be accepted in place of “Annotation”.
- classmethod read(file_name, AlnClass=<class 'schrodinger.protein.alignment.ProteinAlignment'>)¶
Loads a sequence file in FASTA format, creates sequences and appends them to alignment. Splits sequence name from the FASTA header.
- Parameters
file_name (str) – name of input FASTA file
AlnClass (type) – The class of the alignment object to return
- Returns
Read alignment.
- Return type
AlnClass
- classmethod readFromText(lines, AlnClass=<class 'schrodinger.protein.alignment.ProteinAlignment'>, default_title='Custom Family')¶
See parent class for method documentation.
- Parameters
default_title (str) – The title to use if
lines
does not contain a “>Title:” line.
- classmethod parseSSA(seq)¶
Parse a SSA sequence into a list of SSA values that can be assigned to residues’
secondary_structure
property- Parameters
seq (str) – the “sequence” from the FASTA file which encodes the SSA values
- Returns
a list of the SSA values. The SSA values come from schrodinger.structure. Returns None if any of the elements was invalid
- Type
list(int) or NoneType
- classmethod readFromStringList(strings, AlnClass=<class 'schrodinger.protein.alignment.ProteinAlignment'>)¶
Return an alignment object created from an iterable of sequence strings
- Parameters
strings (Iterable of strings) – Sequences as iterable of strings (1D codes)
AlnClass (type) – The class of the alignment object to return
- Returns
The alignment
- Return type
AlnClass