内容

1选手

目前有三种方法可以找到您需要的CGC数据

2快速启动

2.1图形数据浏览

请阅读教程在这里

2.2SPARQL的例子

Seven Bridges的SPARQL控制台,可在https://opensparql.sbgenomics.com

请先阅读以下教程

让我在这里展示一个例子,您将需要R包“SPARQL”

库(SPARQL)端点= " https://opensparql.sbgenomics.com/bigdata/namespace/tcga_metadata_kb/sparql "查询= "前缀rdfs: < http://www.w3.org/2000/01/rdf-schema > tcga前缀:< https://www.sbgenomics.com/ontologies/2014/11/tcga >选择不同? ?样本? file_name ?路? xs_label ? subtype_label{?情况,tcga:情况。?病例tcga:hasDiseaseType ??疾病类型rdfs:标记“肺腺癌”。病例tcga:组织学诊断为hd。?hd rdfs:标签为“肺腺癌混合亚型”。?病例tcga:是否有随访?? day_up tcga: hasdaystolastfollow ?tcga:hasVitalStatus ?vital_status . filter(?days_to_last_follow_up>550) ??vital_status rdfs:label ?if (?vital_status_label='Alive') ? ?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)

您可以使用CGC API访问使用SPARQL查询找到的TCGA文件。要获得具有下载链接的文件,您需要使用SPARQL变量路径在你的查询。

## api(api_url=base,auth_token=auth_token,path='action/files/get_ids', method='POST',query=None,data=filelist) df。df.path <- df[,"path"] df.path

您可以直接将这些文件复制到项目中,请确定这些文件是否受访问控制

$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)

现在来看看更多的例子教程

2.3数据集API示例(未发布)