## ----设置,echo = false --------------------------------------------------------------------------------------------------------------------------------------------------- suppressMessages({ suppressPackageStartupMessages({ library(pogos) library(S4Vectors) library(DT) library(ggplot2) }) }) ## ----LKCC ------------------------------------------------------------------------------------------------------------- iric = iriccle()iric ## -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------drp = drprofset()drp ## ---- lkpl090,图。---------------------------------------------------- lklll,图。---------------------------------------- plot(drp) ## ----lkk,echo = false --------------------------------------------------------------------------------------------------------------------数据(Cell_lines_v1)datatable(as.data.frame(cell_lines_v1),options = listMenu = c(3,5,5,10,50,100)))## --lkccc,echo = false --------------------------------------------------------------------------------------------------- data(compounds_v1) datatable(as.data.frame(compounds_v1), options=list(lengthMenu=c(3,5,10,50,100))) ## ---lkccc2,echo = false ------------------------------------------------------------------------------------------------------------------------------------------------- data(datasets_v1) datatable(as.data.frame(datasets_v1)## ---- doch,无花果= true --------------------------------------------------------------------------------------------------------------库(OntoProc)cc = getchebionto()库(Ontologyplot)tome_plot(cc,c,c,“ chebi:134109”,“ chebi:61115“,” Chebi:75603“,” Chebi:37699“,” Chebi:68481“,“ Chebi:71178”),Fontsize = 24,Shape =“ Rect =“ Rect”)## ------------------------------------------------------------------------------------------------------------------------------------------------------ tone_plot(CC,C(“ Chebi:134109”,“ Chebi:61115”,“ Chebi:75603”,“ Chebi:37699”,“ Chebi:68481”,“ Chebi:71178”,“ Chebi:52172”,“ Chebi:64310”,“ Chebi:63632”,“ Chebi:45863”),Fontsize = 28,Shape =“ Rect”)## ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ clo = getCellLineOnto() smoc = c("CLO:0000517", "CLO:0000560", "CLO:0000563", "CLO:0001072", "CLO:0001088", "CLO:0001138", "CLO:0007606") onto_plot(clo, smoc) ## ----lkoo--------------------------------------------------------------------- library(ontoProc) clo = getCellLineOnto() minds = which(clo$name %in% c("143B cell", "1321N1 cell", "184B5 cell")) tags = clo$id[minds] clo$name[ unlist(clo$parent[tags]) ] ## ----lkefo, fig=TRUE---------------------------------------------------------- ee = getEFOOnto() onto_plot(ee, c("UBERON:0000474", "UBERON:0000079", "UBERON:0000990", "UBERON:0000995", "UBERON:0003982", "UBERON:0000310", "UBERON:0002107", "UBERON:0001264", "UBERON:0002113", "UBERON:0001007", "UBERON:0002530", "UBERON:6007435", "UBERON:0004122", "UBERON:0001008")) ## ----lkcom-------------------------------------------------------------------- chl = getChebiOnto() allch = chl$name mm = allch[match(tolower(compounds_v1[,2]), tolower(allch), nomatch=0)] round(length(mm)/nrow(compounds_v1),2) # not high datatable(data.frame(id=names(mm), comp=as.character(mm))) ## ----srchsym, eval=FALSE------------------------------------------------------ # notin = setdiff(compounds_v1$name, mm) # library(parallel) # options(mc.cores=2) # allch = tolower(allch) # notin = tolower(notin) # lk50 = mclapply(notin[1:50], function(x) { cat(x); # order(adist(x, allch))[1:5]}) # names(lk50) = notin[1:50] # aa = do.call(cbind, lk50[1:50]) # ttt = t(apply(aa,2,function(x) allch[x])[1:3,]) ## ----lkcomb,cache=TRUE-------------------------------------------------------- library(rjson) library(httr) xx = GET("https://pharmacodb.pmgenomics.ca/api/v1/intersections/2/895/1?indent=true") ans = fromJSON(readBin(xx$content, what="character")) doses1 = sapply(ans[[1]]$dose_responses, function(x) x[[1]]) resp1 = sapply(ans[[1]]$dose_responses, function(x) x[[2]]) ## ----lkbar, fig=TRUE---------------------------------------------------------- library(ggplot2) plot(DRTraceSet(dataset="CCLE"))