Description of the API¶
Description of the main package functionality¶
Functions:
|
For continuous predictee: clf_for_CDA=LinearRegression() |
|
df_sub10000 = downsampleRun(range(500, 10000, 500), dfTas=dfTas_AZ_breast, pref=’’, mid=’AZ_breast’) |
|
Get pairs that overlap with sensitivity-mutations-targets data |
|
|
|
Excludes pairs of points with missing data method: {‘pearson’, ‘kendall’, ‘spearman’, ‘cosine’} |
|
Sensitivity data and CDA drug distance dfC, dfS, Z = getDistanceAndSensitivityData(df_drug_sensitivity_GDSC1) |
|
|
|
Drug targeting mutated genes |
|
Reshape dfTa, add tissue and synergy information |
|
{‘IC50’, ‘LNIC50’, ‘H’} |
|
|
|
|
|
|
|
|
|
|
|
|
|
-
getCDAdrugDistance
(df_drugs_celllines, method='pearson')[source]¶ Excludes pairs of points with missing data method: {‘pearson’, ‘kendall’, ‘spearman’, ‘cosine’}
-
getDistanceAndSensitivityData
(df, method='pearson', sensitivity_metric='LNIC50', drug='DRUG', lower=True)[source]¶ Sensitivity data and CDA drug distance dfC, dfS, Z = getDistanceAndSensitivityData(df_drug_sensitivity_GDSC1)
-
prepDfTa
(df_drug_sensitivity, se_models_mutations, se_drug_targets, dname, lower=True)[source]¶ Drug targeting mutated genes
-
filter_synergy_pairs_list
(df, dfTa, pref='Synergy pairs')[source]¶ Get pairs that overlap with sensitivity-mutations-targets data
Usage: dfKS = filter_synergy_pairs_list(df_drug_synergy_Narayan, dfTa)
-
prepDfTas
(dfTa, dfKS, se_tissue_annotation, tissue=None)[source]¶ Reshape dfTa, add tissue and synergy information
-
makeCDAformattedData
(tissue, se_drug_synergy, se_tissue_annotation, df_drug_sensitivity, se_models_mutations, se_drug_targets, dataset, sensitivityMethod='cosine', sensitivity_metric='LNIC50', returnMore=False, lower=True)[source]¶
-
prepareFromDCforCDA
(df_DC, study, tissue, se_models_mutations, sample=None, random_state=None, sensitivity_measure='AUC', synergy='SYNERGY_ZIP', returnMore=False)[source]¶
-
prepareFromAZforCDA
(dir, se_tissue_annotation, se_models_mutations, se_drug_targets, fname='oi_combinations_synergy_scores_final.txt', sensitivity_measure='LNIC50')[source]¶ {‘IC50’, ‘LNIC50’, ‘H’}
-
fit_validate_predict
(inData, inSynergy, extData=None, extSynergy=None, cv=None, max_iter=10000, clf=None, **kwargs)[source]¶
Description of the auxiliary package functionality¶
Functions:
|
similar to the StandardScaler: from sklearn.preprocessing import StandardScaler StandardScaler().fit(df).transform(df) |
|
|
|
A.k.a. |
|
|
|
Tables in uniProt: [‘accToKeyword’, ‘accToTaxon’, ‘author’, ‘bigFiles’, ‘citation’, ‘citationRc’, ‘citationRp’, ‘comment’, ‘commentType’, ‘commentVal’, ‘commonName’, ‘description’, ‘displayId’, ‘extDb’, ‘extDbRef’, ‘feature’, ‘featureClass’, ‘featureId’, ‘featureType’, ‘gene’, ‘geneLogic’, ‘history’, ‘info’, ‘keyword’, ‘organelle’, ‘otherAcc’, ‘pathogenHost’, ‘protein’, ‘proteinEvidence’, ‘proteinEvidenceType’, ‘rcType’, ‘rcVal’, ‘reference’, ‘referenceAuthors’, ‘tableDescriptions’, ‘tableList’, ‘taxon’, ‘varAcc’, ‘varProtein’] |
|
Takes a dataframe where index has 3 levels (MODEL, DRUG1, DRUG2), and there are two columns, first with ground truth scores, second with predicted scores. |
-
encodeNames
(df)[source]¶ A.k.a. One-hot encoding [‘MODEL’, ‘DRUG1’, ‘DRUG2’] should be present either in index levels or in the columns. The idea is from the AstraZeneca DREAM challenge second-best winning method for drug synergy prediction.
-
ro_normalized
(df)[source]¶ Takes a dataframe where index has 3 levels (MODEL, DRUG1, DRUG2), and there are two columns, first with ground truth scores, second with predicted scores.
Output is the average pearson correlation coefficient for each drug pair weighted by the number of models for which a pair was measured against.
See definitions in: https://www.synapse.org/#!Synapse:syn4231880/wiki/235660
-
getGeneToProteinNameAssociation
(host='genome-mysql.cse.ucsc.edu', database='uniProt', user='genomep', password='password')[source]¶ Tables in uniProt: [‘accToKeyword’, ‘accToTaxon’, ‘author’, ‘bigFiles’, ‘citation’, ‘citationRc’, ‘citationRp’, ‘comment’, ‘commentType’, ‘commentVal’, ‘commonName’, ‘description’, ‘displayId’, ‘extDb’, ‘extDbRef’, ‘feature’, ‘featureClass’, ‘featureId’, ‘featureType’, ‘gene’, ‘geneLogic’, ‘history’, ‘info’, ‘keyword’, ‘organelle’, ‘otherAcc’, ‘pathogenHost’, ‘protein’, ‘proteinEvidence’, ‘proteinEvidenceType’, ‘rcType’, ‘rcVal’, ‘reference’, ‘referenceAuthors’, ‘tableDescriptions’, ‘tableList’, ‘taxon’, ‘varAcc’, ‘varProtein’]
To see all columns in a table: fetchMySQL(“SHOW COLUMNS FROM my_table;”)
- Usage:
assoc = getGeneToProteinNameAssociation()