BH16.12/FALDO

提供:TogoWiki

移動: 案内, 検索

目次

JBrowse/Trackに組込むサンプルSPARQL

CyanoBase

#DEFINE sql:select-option "order"
prefix rdf:    <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix rdfs:   <http://www.w3.org/2000/01/rdf-schema#>
prefix xsd:    <http://www.w3.org/2001/XMLSchema#>
prefix obo:    <http://purl.obolibrary.org/obo/>
prefix faldo:  <http://biohackathon.org/resource/faldo#>
prefix idorg:  <http://rdf.identifiers.org/database/>
PREFIX insdc: <http://ddbj.nig.ac.jp/ontologies/nucleotide/>

SELECT
IF(?fstart < ?fend , ?fstart, ?fend) as ?start,IF(?fstart < ?fend , ?fend, ?fstart) as ?end
,IF( ?faldo_type = faldo:ForwardStrandPosition,1, IF( ?faldo_type = faldo:ReverseStrandPosition,-1,0)) as ?strand
,str(?obj_type) as ?type,
str(?label) as ?name,
str(?obj_name) as ?description
, str(?obj) as ?uniqueID
FROM <http://genome.microbedb.jp/resources/cyanobase/genbank>
WHERE {
#values ?entry { <http://identifiers.org/insdc/CACA01000081.1>}
#values ?seq_base { "{ref}" }
#values ?seq_base { "CACA01000081" }
values ?faldo_type { faldo:ForwardStrandPosition faldo:ReverseStrandPosition faldo:BothStrandsPosition }
?entry insdc:sequence_version ?seq_version.
BIND(STRBEFORE(?seq_version,".") as ?seq_acc).

filter(?seq_acc = "CACA01000081")
#filter(?seq_acc = "{ref}")

?entry insdc:sequence ?seq.
?obj obo:so_part_of+  ?seq .
?obj rdf:type ?obj_type .
?obj faldo:location ?faldo .
?faldo faldo:begin/rdf:type ?faldo_type .
?faldo faldo:begin/faldo:position ?fstart .
?faldo faldo:end/faldo:position ?fend .
?obj obo:so_part_of ?parent . filter( ?obj_type = obo:SO_0000704 || ?parent != ?seq )

optional {?obj insdc:locus_tag ?label .}
optional {?obj insdc:product ?obj_name .}

#filter ( !(?start > {end} || ?end < {start}) )
}

MBGD

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX mbgdr: <http://mbgd.genome.ad.jp/rdf/resource/>
PREFIX org: <http://mbgd.genome.ad.jp/rdf/resource/organism/>
PREFIX orth: <http://purl.jp/bio/11/orth#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX faldo: <http://biohackathon.org/resource/faldo#>

SELECT
IF(?fstart < ?fend , ?fstart, ?fend) as ?start,IF(?fstart < ?fend , ?fend, ?fstart) as ?end
,IF( ?faldo_type = faldo:ForwardStrandPosition,1, IF( ?faldo_type = faldo:ReverseStrandPosition,-1,0)) as ?strand
,?gene_id as ?uniqueID, ?cluster_id, ?label as ?name, ?description, ?url, ?reference
,?p, ?o
WHERE {
    values ?faldo_type { faldo:ForwardStrandPosition faldo:ReverseStrandPosition faldo:BothStrandsPosition }
    ?group a orth:OrthologGroup ;
           orth:inDataset mbgdr:default ;
           dct:identifier ?cluster_id ;
           orth:member/orth:gene ?gene .
    #?group ?p ?o.
    ?group rdfs:label ?label.
    ?group <http://purl.org/dc/terms/description> ?description.
    ?group <http://xmlns.com/foaf/0.1/page> ?url.
    ?gene orth:organism org:syn ;
          dct:identifier ?gene_id .
    ?gene faldo:location ?region.
    filter(?gene_id = "syn:NDHK2")
    ?region faldo:begin ?begin.
    ?region faldo:end ?end.
    ?begin faldo:position ?fstart.
    ?begin a ?faldo_type.
    ?begin faldo:reference ?reference.
    ?end faldo:position ?fend.
    ?reference ?p ?o.

}
ORDER BY ?gene_id

limit 100

DDBJ-PDBj/chain

BH16.12/LinkDB > PDB chain IDから塩基配列の座標を取得する


課題

  • Sequence IDに相当する faldo:referenceのObjectおよびrdfs:labelはそれぞれ異なるので、RDFでつなぐ必要がある
  • exon-intronなどのsubfeatureをもつ真核遺伝子のグリフ表現をSPARQL ep.経由で表示可能かの確認
  • 配列のリビジョン、アノテーションのリフトオーバーを行なうためのFALDO2FALDO

藤澤

/mw/BH16.12/FALDO」より作成