tka.external_models package

Submodules

tka.external_models.moshkov module

tka.external_models.moshkov.load_assay_metadata() DataFrame[source]
tka.external_models.moshkov.predict_from_ge(df: List[str], gene_id: str, checkpoint_dir: str) DataFrame[source]

Make predictions from a df of standard scaled gene expressions and a trained model checkpoint.

Args:
df (pd.DataFrame): a pd.DataFrame with the columns being L1000 features (977 features)

and the index column being the identification column

checkpoint_dir (str): Directory containing the trained checkpoint. gene_id (str): type of identifier present in the header row -

one of “affyID”, “entrezID” or “ensemblID”

Returns:

pd.DataFrame: Predictions with df’s first column as indices and assays as columns.

tka.external_models.moshkov.predict_from_mobc(df_real: DataFrame, checkpoint_dir: str) DataFrame[source]

Make predictions from a dataframe of batch effect corrected morphology profiles from CellProfiler and a trained model checkpoint.

Args:
df_real (pd.DataFrame): a pd.DataFrame with the columns being CellProfiler features (1746 features)

and the index column being the identification column

checkpoint_dir (str): Directory containing the trained checkpoint.

Returns:

pd.DataFrame: Predictions with df_real’s first column as indices and assays as columns.

tka.external_models.moshkov.predict_from_smiles(smiles_list: List[str], checkpoint_dir: str) DataFrame[source]

Make predictions from a list of SMILES strings using a trained checkpoint.

Args:

smiles_list (List[str]): List of SMILES strings for which to make predictions. checkpoint_dir (str): Directory containing the trained checkpoint.

Returns:

pd.DataFrame: Predictions with SMILES as indices and assays as columns.

Module contents