schrodinger.application.bioluminate.anarci.anarci_adapter module¶
- class schrodinger.application.bioluminate.anarci.anarci_adapter.AnarciType¶
Bases:
Enum- TCR_A = 'A'¶
- TCR_B = 'B'¶
- TCR_G = 'G'¶
- TCR_D = 'D'¶
- ANTIBODY_H = 'H'¶
- ANTIBODY_K = 'K'¶
- ANTIBODY_L = 'L'¶
- class schrodinger.application.bioluminate.anarci.anarci_adapter.ResInfo(number: int, ins_code: str, res_name: str)¶
Bases:
objectClass describing the position of a residue in the current numbering scheme, as well as its single-letter code
- number: int¶
- ins_code: str¶
- res_name: str¶
- static from_anarci_tuple(numbering_tuple: Tuple[Tuple[int, str], str])¶
Create a ResInfo instance from the numbering tuple returned from ANARCI :rtype: ResInfo
- property number_with_ins_code¶
- __init__(number: int, ins_code: str, res_name: str) None¶
- class schrodinger.application.bioluminate.anarci.anarci_adapter.DomainNumbering(domain_data: List[Tuple[List[Tuple[Tuple[int, str], str]], int, int]])¶
Bases:
object- Class representing the numbering information for a single domain from an
ANARCI run
- __init__(domain_data: List[Tuple[List[Tuple[Tuple[int, str], str]], int, int]])¶
- start_index: int¶
- end_index: int¶
- class schrodinger.application.bioluminate.anarci.anarci_adapter.ChainNumbering(seq_data: List[List[Tuple[List[Tuple[Tuple[int, str], str]], int, int]]])¶
Bases:
list,Generic[T]Class representing the numbering information for any domains in a given single chain from an ANARCI run
- __init__(seq_data: List[List[Tuple[List[Tuple[Tuple[int, str], str]], int, int]]])¶
- class schrodinger.application.bioluminate.anarci.anarci_adapter.DomainAlignment(id: str, description: str, evalue: float, bitscore: float, bias: float, query_start: int, query_end: int, species: str, chain_type: AnarciType, scheme: AntibodyCDRScheme, query_name: str)¶
Bases:
object- Class representing the alignment information for a single domain from an
ANARCI run
- id: str¶
- description: str¶
- evalue: float¶
- bitscore: float¶
- bias: float¶
- query_start: int¶
- query_end: int¶
- species: str¶
- chain_type: AnarciType¶
- scheme: AntibodyCDRScheme¶
- query_name: str¶
- __init__(id: str, description: str, evalue: float, bitscore: float, bias: float, query_start: int, query_end: int, species: str, chain_type: AnarciType, scheme: AntibodyCDRScheme, query_name: str) None¶
- class schrodinger.application.bioluminate.anarci.anarci_adapter.ChainAlignment(seq_data: List[Dict[str, Union[str, float, int]]])¶
Bases:
list,Generic[T]Class representing the alignment information for any domains in a given single chain from an ANARCI run
- __init__(seq_data: List[Dict[str, Union[str, float, int]]])¶
- get_antibody_light_domains()¶
- get_antibody_heavy_domains()¶
- property antibody_light_domains¶
- property antibody_heavy_domains¶
- property has_antibody_light¶
- property has_antibody_heavy¶
- class schrodinger.application.bioluminate.anarci.anarci_adapter.HmmerHit(id: str, description: str, evalue: float, bitscore: float, bias: float, query_start: int, query_end: int)¶
Bases:
objectClass representing the HMMER data for a single HMM hit against a chain
- id: str¶
- description: str¶
- evalue: float¶
- bitscore: float¶
- bias: float¶
- query_start: int¶
- query_end: int¶
- __init__(id: str, description: str, evalue: float, bitscore: float, bias: float, query_start: int, query_end: int) None¶
- class schrodinger.application.bioluminate.anarci.anarci_adapter.ChainHitsTable(table: List[List[Union[str, float, int]]])¶
Bases:
list,Generic[T]Class representing the HMMER hit table for a single chain from an ANARCI run
- __init__(table: List[List[Union[str, float, int]]])¶
- class schrodinger.application.bioluminate.anarci.anarci_adapter.AnarciDomainResult(numbering: DomainNumbering, alignment_details: DomainAlignment)¶
Bases:
object- Class representing ANARCI results for a single domain. As the hits table
only exists at the chain level, domains do not have associated HMMER hit table information
- numbering: DomainNumbering¶
- alignment_details: DomainAlignment¶
- __init__(numbering: DomainNumbering, alignment_details: DomainAlignment) None¶
- class schrodinger.application.bioluminate.anarci.anarci_adapter.AnarciChainResult(numbering: ChainNumbering[DomainNumbering], alignment_details: ChainAlignment[DomainAlignment], hits: ChainHitsTable)¶
Bases:
objectClass representing all ANARCI results for a single chain
- numbering: ChainNumbering[DomainNumbering]¶
- alignment_details: ChainAlignment[DomainAlignment]¶
- hits: ChainHitsTable¶
- __len__()¶
- property has_antibody_light¶
- property has_antibody_heavy¶
- __init__(numbering: ChainNumbering[DomainNumbering], alignment_details: ChainAlignment[DomainAlignment], hits: ChainHitsTable) None¶
- class schrodinger.application.bioluminate.anarci.anarci_adapter.AnarciResults(anarci_results: Tuple[List[List[List[Tuple[List[Tuple[Tuple[int, str], str]], int, int]]]], List[List[Dict[str, Union[str, float, int]]]], List[List[List[Union[str, float, int]]]]])¶
Bases:
objectClass to handle results of an Anarci run. the return type from anarci is far too complicated to manage directly so this class organizes several layers of nested data into a human-readable API
- For reference, the type this class’s constructor expects is:
- List[List[List[List[Tuple[Tuple[int,str],str]]]],
List[List[Dict[str,str|int|float]], List[List[List[Union[str,float,int]]]]]
(This is type-hinted as a Tuple below, as List doesn’t allow mixed types)
- __init__(anarci_results: Tuple[List[List[List[Tuple[List[Tuple[Tuple[int, str], str]], int, int]]]], List[List[Dict[str, Union[str, float, int]]]], List[List[List[Union[str, float, int]]]]])¶
- numbering: List[ChainNumbering[DomainNumbering]]¶
- alignment_details: List[ChainAlignment[DomainAlignment]]¶
- hit_tables: List[ChainHitsTable[HmmerHit]]¶
- __len__()¶
- property has_antibody_light¶
- property has_antibody_heavy¶
- class schrodinger.application.bioluminate.anarci.anarci_adapter.InputSequence(name, sequence)¶
Bases:
tuple- name¶
Alias for field number 0
- sequence¶
Alias for field number 1
- schrodinger.application.bioluminate.anarci.anarci_adapter.get_best_domain_result(query_seq_str, name='Sequence', **kwargs) Optional[AnarciDomainResult]¶
- Wrapper for anarci which returns the best domain result from the run in a
structured AnarciDomainResult instance
- schrodinger.application.bioluminate.anarci.anarci_adapter.get_anarci_chain_result(query_seq_str: str, name='Sequence', **kwargs) AnarciChainResult¶
- Wrapper for anarci which returns the results from the run in a structured
AnarciChainResult instance
- schrodinger.application.bioluminate.anarci.anarci_adapter.get_anarci_results(sequences: List[InputSequence], scheme=AntibodyCDRScheme.IMGT, **kwargs) AnarciResults¶
- Wrapper for anarci which returns the results from the run in a structured
AnarciResults instance
- schrodinger.application.bioluminate.anarci.anarci_adapter.get_hmmerpath()¶
- schrodinger.application.bioluminate.anarci.anarci_adapter.is_antibody_light_type(chain_type: AnarciType) bool¶
- schrodinger.application.bioluminate.anarci.anarci_adapter.is_antibody_heavy_type(chain_type: AnarciType) bool¶
- schrodinger.application.bioluminate.anarci.anarci_adapter.is_antibody_type(chain_type: AnarciType) bool¶
- schrodinger.application.bioluminate.anarci.anarci_adapter.is_tcr_type(chain_type: AnarciType) bool¶
- schrodinger.application.bioluminate.anarci.anarci_adapter.get_domain_type_shorthand(chain_type: AnarciType) str¶
- schrodinger.application.bioluminate.anarci.anarci_adapter.get_antibody_type_char(anarci_type: AnarciType) str¶
- schrodinger.application.bioluminate.anarci.anarci_adapter.validate_chain_type(sequence: str, chain_type: AnarciType) None¶
Get the anarci type for the given sequence and check that it matches the expected chain type.
- Parameters:
sequence – The sequence to check
chain_type – The expected chain type
- Raises:
ValueError – If the sequence has no ANARCI result or if the ANARCI result does not match the expected chain type
- schrodinger.application.bioluminate.anarci.anarci_adapter.get_requested_seqs_by_chain_type(seqs: list[str], chain_types: set[AnarciType]) dict[AnarciType, list[str]]¶
Given a list of sequences and a set of chain types, return a dictionary with the sequences for each chain type.
- Parameters:
seqs – A list of sequences.
chain_types – A set of chain types to search for.
- Returns:
A dictionary with the sequences for each chain type.