提供:TogoWiki
(版間での差分)
|
|
106行: |
106行: |
| </pre> | | </pre> |
| | | |
- | [http://evolve.bio.titech.ac.jp/sparql?default-graph-uri=&query=PREFIX+rdfs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0APREFIX+srs%3A+%3Chttp%3A%2F%2Ftrace.ncbi.nlm.nih.gov%2FTraces%2Fsra%2Fsra.cgi%3Fsample%3D%3E%0D%0APREFIX+envo%3A+%3Chttp%3A%2F%2Fpurl.bioontology.org%2Fontology%2FENVO%2F%3E%0D%0APREFIX+gaz%3A+%3Chttp%3A%2F%2Fpurl.org%2Fobo%2Fowl%2FGAZ%23%3E%0D%0APREFIX+fma%3A+%3Chttp%3A%2F%2Fsig.uw.edu%2Ffma%23%3E%0D%0APREFIX+dc%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E%0D%0APREFIX+ncbitaxon%3A+%3Chttp%3A%2F%2Fpurl.org%2Fobo%2Fowl%2FNCBITaxon%23%3E%0D%0APREFIX+meo%3A+%3Chttp%3A%2F%2Fpurl.jp%2Fbio%2F11%2Fmeo%2F%3E%0D%0APREFIX+rdf%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0D%0APREFIX+owl%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23%3E%0D%0A%0D%0ASELECT+DISTINCT%0D%0A%3FSRS_label+%3FSRS_title+%3Fenv_material_list+%3Fenv_feature_list+%3Fbiome_list+%0D%0AWHERE{%0D%0A%09{%0D%0A%09%09SELECT+%3FSRS_ID+%28GROUP_CONCAT%28%3FMaterial_label+%3B+SEPARATOR+%3D+%22+%2C+%22%29AS+%3Fenv_material_list%29%0D%0A%09%09WHERE{%0D%0A%09%09%09%3FSRS_ID%09meo%3AenvironmentalMaterial|meo%3AenvironmentalFeature|meo%3Abiome%09[%0D%0A%09%09%09%09dc%3Aidentifier%09meo%3AMEO_0000054%3B%0D%0A%09%09%09%09rdfs%3Alabel%09%22feces%22+%3B%09%0D%0A%09%09%09]+.%0D%0A%09%09%09OPTIONAL{%0D%0A%09%09%09%09%3FSRS_ID%09+meo%3AenvironmentalMaterial%09[%0D%0A%09%09%09%09%09dc%3Aidentifier%09%3FenvironmentalMaterial%3B%0D%0A%09%09%09%09%09rdfs%3Alabel%09%3FMaterial_label+%3B%0D%0A%09%09%09%09]+.%0D%0A%09%09%09}%0D%0A%09%09}%0D%0A%09}%0D%0A%09{%0D%0A%09%09SELECT+%3FSRS_ID+%28GROUP_CONCAT%28%3FFeature_label+%3B+SEPARATOR+%3D+%22+%2C+%22%29AS+%3Fenv_feature_list%29%0D%0A%09%09WHERE{%0D%0A%09%09%09%3FSRS_ID%09meo%3AenvironmentalMaterial|meo%3AenvironmentalFeature|meo%3Abiome%09[%0D%0A%09%09%09%09dc%3Aidentifier%09meo%3AMEO_0000054%3B%0D%0A%09%09%09%09rdfs%3Alabel%09%22feces%22+%3B%09%0D%0A%09%09%09]+.%0D%0A%09%09%09OPTIONAL{%0D%0A%09%09%09%09%3FSRS_ID%09+meo%3AenvironmentalFeature%09[%0D%0A%09%09%09%09%09dc%3Aidentifier%09%3FenvironmentalFeature%3B%0D%0A%09%09%09%09%09rdfs%3Alabel%09%3FFeature_label+%3B%0D%0A%09%09%09%09]+.%0D%0A%09%09%09}%0D%0A%09%09}%0D%0A%09}%0D%0A%09{%0D%0A%09%09SELECT+%3FSRS_ID+%28GROUP_CONCAT%28%3Fbiome_label+%3B+SEPARATOR+%3D+%22+%2C+%22%29AS+%3Fbiome_list%29%0D%0A%09%09WHERE{%0D%0A%09%09%09%3FSRS_ID%09meo%3AenvironmentalMaterial|meo%3AenvironmentalFeature|meo%3Abiome%09[%0D%0A%09%09%09%09dc%3Aidentifier%09meo%3AMEO_0000054%3B%0D%0A%09%09%09%09rdfs%3Alabel%09%22feces%22+%3B%09%0D%0A%09%09%09]+.%0D%0A%09%09%09OPTIONAL{%0D%0A%09%09%09%09%3FSRS_ID%09+meo%3Abiome%09[%0D%0A%09%09%09%09%09dc%3Aidentifier%09%3Fbiome%3B%0D%0A%09%09%09%09%09rdfs%3Alabel%09%3Fbiome_label%3B%0D%0A%09%09%09%09]+.%0D%0A%09%09%09}%0D%0A%09%09}%0D%0A%09}%0D%0A%09OPTIONAL{%0D%0A%09%09%3FSRS_ID%09srs%3ATITLE%09%3FSRS_title.%0D%0A%09}%0D%0A%09OPTIONAL{%0D%0A%09%09%3FSRS_ID%09rdfs%3Alabel%09%3FSRS_label.%0D%0A%09}%0D%0A}+ORDER+BY+%3FSRS_label&format=text%2Fhtml&timeout=0&debug=on 実行結果] | + | [http://p.tl/gssQ 実行結果] |
2013年5月27日 (月) 03:25時点における最新版
metagenome sample list / meta16S sample list
- スタンザ概要--------------------------
- ある環境から採取されたメタゲノムサンプルのリスト
- ある環境から採取されたメタ16Sサンプルのリスト
- 入力----------------------------------
- MEO_ID
- 出力----------------------------------
変数名 | 説明 | URI or literal |
?SRS_title | SRS ID名 | literal |
?SRS_label | SRSのタイトル | literal |
?env_material_list | SRSのenvironmental materialの列挙 | literal |
?env_feature_list | SRSのenvironmental featureの列挙 | literal |
?biome_list | SRSのbiomeの列挙 | literal |
- 使用グラフ----------------------------
- meo_sample.ttl.Changed3
-
- メモ----------------------------------
- 一つのメタゲノムサンプルに対して複数のFeature / Material / biomeタームが対応付いている時に、総当りで検索結果が返ってきてしまうのを防ぐため、以下のような3つのサブクエリをもつSPARQL文となった。
- 全てのサンプルにFeature, Material, biomeタームやSRSのタイトルが対応付いているとは限らないので、OPTIONALで取得した。
- メタゲノムサンプルなのかメタ16Sサンプルなのか の区別は後回し(ヒトメタゲノム関連論文からのメタデータ抽出の後)
- SPARQL query--------------------------
例:メタデータにMEO_0000054(feces)を持つメタゲノムデータのリスト
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX srs: <http://trace.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?sample=>
PREFIX envo: <http://purl.bioontology.org/ontology/ENVO/>
PREFIX gaz: <http://purl.org/obo/owl/GAZ#>
PREFIX fma: <http://sig.uw.edu/fma#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX ncbitaxon: <http://purl.org/obo/owl/NCBITaxon#>
PREFIX meo: <http://purl.jp/bio/11/meo/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
SELECT DISTINCT
?SRS_label ?SRS_title ?env_material_list ?env_feature_list ?biome_list
WHERE{
{
SELECT ?SRS_ID (GROUP_CONCAT(?Material_label ; SEPARATOR = " , ")AS ?env_material_list)
WHERE{
?SRS_ID meo:environmentalMaterial|meo:environmentalFeature|meo:biome [
dc:identifier meo:MEO_0000054;
rdfs:label "feces" ;
] .
OPTIONAL{
?SRS_ID meo:environmentalMaterial [
dc:identifier ?environmentalMaterial;
rdfs:label ?Material_label ;
] .
}
}
}
{
SELECT ?SRS_ID (GROUP_CONCAT(?Feature_label ; SEPARATOR = " , ")AS ?env_feature_list)
WHERE{
?SRS_ID meo:environmentalMaterial|meo:environmentalFeature|meo:biome [
dc:identifier meo:MEO_0000054;
rdfs:label "feces" ;
] .
OPTIONAL{
?SRS_ID meo:environmentalFeature [
dc:identifier ?environmentalFeature;
rdfs:label ?Feature_label ;
] .
}
}
}
{
SELECT ?SRS_ID (GROUP_CONCAT(?biome_label ; SEPARATOR = " , ")AS ?biome_list)
WHERE{
?SRS_ID meo:environmentalMaterial|meo:environmentalFeature|meo:biome [
dc:identifier meo:MEO_0000054;
rdfs:label "feces" ;
] .
OPTIONAL{
?SRS_ID meo:biome [
dc:identifier ?biome;
rdfs:label ?biome_label;
] .
}
}
}
OPTIONAL{
?SRS_ID srs:TITLE ?SRS_title.
}
OPTIONAL{
?SRS_ID rdfs:label ?SRS_label.
}
} ORDER BY ?SRS_label
実行結果