## ----包括=假-----------------------------------------------图书馆(生物陶瓷)knitr :: Opts_chunk $ set(eval = false)## ----设置,包括=假-------------------------------------------------------#knitr :: Opts_chunk $ set(echo = true)## ---- eval = false ----------------------------------------------------#库(sparql)#endpoint =“https://opensparql.sbgenomics.com/bigdata/namespace/tcga_metadata_kb/sparql”#query =“#weix rdfs: #weix tcga: ##选择截然不同?案例?示例?file_name?path?xs_label?subtype_label#{#?case一个tcga:case。#?案例tcga:hasdiseasetype?sulties_type。#?疾病_TYPE RDFS:标签'肺腺癌'。##?案例TCGA:哈希主义学Diagnosis?HD。#?HD RDFS:标签'肺腺癌混合亚型'。##?案例tcga:hasfollowup?power_up。#?power_up tcga:hasdaystolastfollowup?days_to_last_follow_up。#过滤器(?day_to_last_follow_up> 550)##?power_up tcga:hasvitalstatus?vital_status。#?vital_status rdfs:label?vital_status_label。#过滤器(?Vital_status_Label ='Alive')##?案例TCGA:Hasdrugtherapy?Drug_therapy。 # ?drug_therapy tcga:hasPharmaceuticalTherapyType ?pt_type . # ?pt_type rdfs:label ?pt_type_label . # filter(?pt_type_label='Chemotherapy') # # ?case tcga:hasSample ?sample . # ?sample tcga:hasSampleType ?st . # ?st rdfs:label ?st_label # filter(?st_label='Primary Tumor') # # ?sample tcga:hasFile ?file . # ?file rdfs:label ?file_name . # # ?file tcga:hasStoragePath ?path. # # ?file tcga:hasExperimentalStrategy ?xs. # ?xs rdfs:label ?xs_label . # filter(?xs_label='WXS') # # ?file tcga:hasDataSubtype ?subtype . # ?subtype rdfs:label ?subtype_label # # } # # " # qd <- SPARQL(endpoint,query) # df <- qd$results # head(df) ## ------------------------------------------------------------------------ # # ## api(api_url=base,auth_token=auth_token,path='action/files/get_ids', method='POST',query=None,data=filelist) # df.path <- df[,"path"] # df.path ## ------------------------------------------------------------------------ # library(sevenbridges) # a = Auth(platform = "cgc", username = "tengfei") # ## get id (only works for CGC platform) # ids = a$get_id_from_path(df.path) # ## copy file from id to project with controlled access # (p = a$project(id = "tengfei/control-test")) # a$copyFile(ids, p$id)