import matplotlib as mpl import matplotlib.pyplot as plt from crispy import CrispyPlot from cancer_proteomics.notebooks import DataImport RPATH = pkg_resources.resource_filename("cancer_proteomics", "plots/") # ### Imports # CMP samplesheet cmp = DataImport.read_cmp_samplesheet() cmp["CCLE_ID_SHORT"] = cmp["CCLE_ID"].apply( lambda v: v.split("_")[0] if str(v).lower() != 'nan' else np.nan) # Proteomics prot = DataImport.read_protein_matrix(map_protein=True) # Read proteomics BROAD (Proteins x Cell lines) prot_broad = DataImport.read_protein_matrix_broad() prot_broad = prot_broad.rename(columns=cmp.set_index("CCLE_ID")["model_id"]) # Read Transcriptomics gexp = DataImport.read_gene_matrix() # Read CRISPR crispr = DataImport.read_crispr_matrix() crispr = crispr.rename(columns=cmp.set_index("BROAD_ID")["model_id"]) # Read Methylation methy = DataImport.read_methylation_matrix()
LOG = logging.getLogger("cancer_proteomics") DPATH = pkg_resources.resource_filename("data", "/") PPIPATH = pkg_resources.resource_filename("data", "ppi/") TPATH = pkg_resources.resource_filename("tables", "/") RPATH = pkg_resources.resource_filename("cancer_proteomics", "plots/") # ### Imports # PPI ppi = PPI(ddir=PPIPATH).build_string_ppi(score_thres=900) # Read samplesheet ss = DataImport.read_samplesheet() # Read proteomics (Proteins x Cell lines) prot = DataImport.read_protein_matrix(map_protein=True, min_measurements=300) # Read Transcriptomics gexp = DataImport.read_gene_matrix() # Read CRISPR crispr = DataImport.read_crispr_matrix() crispr_institute = DataImport.read_crispr_institute()[crispr.columns] crispr_skew = crispr.apply(skew, axis=1, nan_policy="omit").astype(float) # Read Drug-response drespo = DataImport.read_drug_response(min_measurements=300) dtargets = DataImport.read_drug_target() drespo_skew = drespo.apply(skew, axis=1, nan_policy="omit").astype(float) # ### Gene expression dimension reduction