SPARQLthon26/CyanoBase

提供:TogoWiki

2016年12月13日 (火) 01:47時点におけるTfuji (トーク | 投稿記録)による版
(差分) ←前の版 | 最新版 (差分) | 次の版→ (差分)
移動: 案内, 検索

CyanoBase

NCBI assembly_reportsにおいてtaxonomy id = 1117以下のゲノムプロジェクトを取得するSPARQL

PREFIX asm: <http://www.ncbi.nlm.nih.gov/assembly/>

select 
*
#?predicate ?object
FROM <http://togogenome.org/graph/taxonomy>
FROM <http://togogenome.org/graph/assembly_report>
WHERE
{
#?assembly ?predicate ?object.
?assembly asm:refseq_category ?category;
 asm:asm_name ?name;
 asm:assembly_id ?id;
 asm:assembly_level ?level;
 asm:bioproject ?bioproject;
 asm:bioproject_accession ?bioproject_accession;
 asm:biosample_accession ?biosample_accession;
 asm:gbrs_paired_asm ?gbrs_paired_asm;
 asm:genome_rep ?rep;
 asm:infraspecific_name ?infraspecific_name;
 asm:isolate ?isolate;
 asm:organism_name ?organism_name;
 asm:paired_asm_comp ?paired_asm_comp;
 asm:release_date ?release_date;
 asm:release_type ?release_type;
 asm:species_taxid ?species_taxid;
 asm:submitter ?submitter;
 asm:tax_id ?tax_id;
 asm:taxon ?taxon;
 asm:version_status ?version_status;
 asm:wgs_master ?wgs_master;
 rdfs:seeAlso ?link.

values ?category {"representative genome"}.
values ?version_status {"latest"}.
#FILTER(?predicate != asm:sequnece)

FILTER(?taxon_root = <http://identifiers.org/taxonomy/1117>).
#FILTER(?taxon_root = <http://identifiers.org/taxonomy/1117>). #Cyanobacteria
#FILTER(?taxon_root = <http://identifiers.org/taxonomy/147537>). #Saccharomycotina
#FILTER(?taxon_root = <http://identifiers.org/taxonomy/147545>). #Eurotiomycetes
#FILTER(?taxon_root = <http://identifiers.org/taxonomy/451866>). #Taphrinomycotina
#FILTER(?taxon_root = <http://identifiers.org/taxonomy/3041>). #Chlorophyta
#FILTER(?taxon_root = <http://identifiers.org/taxonomy/2763>). #Rhodophyta
#FILTER(?taxon_root = <http://identifiers.org/taxonomy/33090>). #Viridiplantae

?lineage rdfs:subClassOf* ?taxon_root.
FILTER(?lineage = ?taxon).

#FILTER(?link = <http://www.ncbi.nlm.nih.gov/assembly/GCF_000009725.1>).
#FILTER(?taxon = <http://identifiers.org/taxonomy/1148>).

}
#LIMIT 1000
#ORDER BY ?predicate

SPARQL更新

  • OKBP先生による高速化+複数tax_root対応のSPARQL
DEFINE sql:select-option "order"

PREFIX asm: <http://www.ncbi.nlm.nih.gov/assembly/>
PREFIX tax: <http://identifiers.org/taxonomy/>

select  *
FROM <http://togogenome.org/graph/taxonomy>
FROM <http://togogenome.org/graph/assembly_report>
WHERE
{
values ?taxon_root { tax:1117 tax:147537 tax:147545 tax:451866 tax:3041 tax: 2763 tax:33090}
values ?category {"representative genome"}.
values ?version_status {"latest"}.

?taxon_root a <http://ddbj.nig.ac.jp/ontologies/taxonomy/Taxon> .
?taxon rdfs:subClassOf* ?taxon_root.
?assembly asm:taxon ?taxon;
 asm:refseq_category ?category;
 asm:asm_name ?name;
 asm:assembly_id ?id;
 asm:assembly_level ?level;
 asm:bioproject ?bioproject;
 asm:bioproject_accession ?bioproject_accession;
 asm:biosample_accession ?biosample_accession;
 asm:gbrs_paired_asm ?gbrs_paired_asm;
 asm:genome_rep ?rep;
 asm:infraspecific_name ?infraspecific_name;
 asm:isolate ?isolate;
 asm:organism_name ?organism_name;
 asm:paired_asm_comp ?paired_asm_comp;
 asm:release_date ?release_date;
 asm:release_type ?release_type;
 asm:species_taxid ?species_taxid;
 asm:submitter ?submitter;
 asm:tax_id ?tax_id;
 asm:taxon ?taxon;
 asm:version_status ?version_status;
 asm:wgs_master ?wgs_master;
 rdfs:seeAlso ?link.
}
  • 20141112版でrefseq_categoryの記述が変更していた "representative-genome" → "representative genome", "reference-genome" → "reference genome"
  • 20150203 asm:assembly_id → asm:assembly_accession に変更
個人用ツール