schrodinger.application.bioluminate.antibody.io.csv_reader module

Utilities to read and validate data from a CSV file containing antibody sequence information.

class schrodinger.application.bioluminate.antibody.io.csv_reader.Headers(value)

Bases: enum.Enum

Column headers for all modeling modes.

NAME = 'NAME'
LC = 'LC'
HC = 'HC'
HC1 = 'HC1'
LC1 = 'LC1'
HC2 = 'HC2'
LC2 = 'LC2'
EXTRA_COLS = 1
schrodinger.application.bioluminate.antibody.io.csv_reader.get_valid_header_groups_string() str

Return a human-readable string containing all groups of valid headers defined in each validator e.g. “[Name, HC], [Name, HC, LC]”

class schrodinger.application.bioluminate.antibody.io.csv_reader.ModelingMode(value)

Bases: enum.Enum

General modes of antibody modeling that can be performed.

SINGLE_DOMAIN = 1
MONOSPECIFIC = 2
BISPECIFIC = 3
class schrodinger.application.bioluminate.antibody.io.csv_reader.DataViolation(value)

Bases: enum.Enum

Different kinds of invalid data that can exist in a given CSV file.

NAME = 'invalid name'
HC_SEQ = 'invalid heavy chain sequence'
LC_SEQ = 'invalid light chain sequence'
NUM_COLS = 'invalid number of columns'
HEADERS = 'invalid headers'
exception schrodinger.application.bioluminate.antibody.io.csv_reader.BaseInvalidAntibodyCSVError(csv_file: str)

Bases: Exception

Base class for exceptions relating to invalid antibody csv files. Subclasses should define the message to display.

__init__(csv_file: str)
args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception schrodinger.application.bioluminate.antibody.io.csv_reader.InvalidFileTypeError(csv_file: str)

Bases: schrodinger.application.bioluminate.antibody.io.csv_reader.BaseInvalidAntibodyCSVError

Exception to raise when the antibody csv file is the incorrect file type.

__init__(csv_file: str)
args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception schrodinger.application.bioluminate.antibody.io.csv_reader.InvalidCSVFormattingError(csv_file: str)

Bases: schrodinger.application.bioluminate.antibody.io.csv_reader.BaseInvalidAntibodyCSVError

Exception to raise when the antibody csv file is not formatted with valid headers.

__init__(csv_file: str)
args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception schrodinger.application.bioluminate.antibody.io.csv_reader.InvalidCSVLengthError(csv_file: str)

Bases: schrodinger.application.bioluminate.antibody.io.csv_reader.BaseInvalidAntibodyCSVError

__init__(csv_file: str)
args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception schrodinger.application.bioluminate.antibody.io.csv_reader.InvalidRowError(data_violations: List[schrodinger.application.bioluminate.antibody.io.csv_reader.DataViolation], row_num: int)

Bases: Exception

Exception to raise when a particular row is invalid.

__init__(data_violations: List[schrodinger.application.bioluminate.antibody.io.csv_reader.DataViolation], row_num: int)
property data_violations: List[schrodinger.application.bioluminate.antibody.io.csv_reader.DataViolation]
args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

schrodinger.application.bioluminate.antibody.io.csv_reader.get_reader(csv_file: str) Optional[Generator[schrodinger.application.bioluminate.antibody.io.csv_reader._AntibodyCSVReader, None, None]]

A context manager that returns an antibody CSV reader equipped with the appropriate validator class given the supplied CSV file. Raises an error if the given file does not meet the standards for proper parsing.

Parameters

csv_file – A CSV file with antibody sequences.