BH12.12/UT Prot/PLBSP SPARQL snipet

提供:TogoWiki

移動: 案内, 検索

目次

PDB Ligand (PDB側のLigand情報)

Select all three letter id (pdbo:chem_comp.id) about each chemical compound name (pdbo:chem_comp.name).

PREFIX pdbo: <http://rdf.wwpdb.org/schema/pdbx-v40.owl#> 
SELECT DISTINCT ?subject ?object 
WHERE {
 ?subject pdbo:chem_comp.name ?object
}

fileSelect the wwPDB entry with the three letter id (pdbo:chem_comp.id) 'MAN'.

PREFIX pdbo: <http://rdf.wwpdb.org/schema/pdbx-v40.owl#> 
SELECT DISTINCT * WHERE {
 <http://rdf.wwpdb.org/cc/MAN/chem_comp/MAN> ?property ?object
}

Select the wwPDB entry with the three letter id (pdbo:chem_comp.id) '1PA' and SMILES method (pdbo:pdbx_chem_comp_descriptor.descriptor).

PREFIX pdbo: <http://rdf.wwpdb.org/schema/pdbx-v40.owl#> 
SELECT DISTINCT * WHERE {
 <http://rdf.wwpdb.org/cc/1PA/chem_comp/1PA> pdbo:referenced_by_pdbx_chem_comp_descriptor ?object.
 ?object pdbo:pdbx_chem_comp_descriptor.descriptor ?smiles
}

Select SMILES formulas (pdbo:pdbx_chem_comp_descriptor.descriptor) with the compound name (pdbo:chem_comp.name) '4-(carboxymethyl)-L-phenylalanine' from wwPDB.

PREFIX pdbo: <http://rdf.wwpdb.org/schema/pdbx-v40.owl#> 
SELECT DISTINCT ?chem_com_id ?method ?smiles WHERE {
 ?chem_com_id pdbo:chem_comp.name "4-(carboxymethyl)-L-phenylalanine".
 ?chem_com_id pdbo:referenced_by_pdbx_chem_comp_descriptor ?method.
 ?method pdbo:pdbx_chem_comp_descriptor.descriptor ?smiles
}

Select three letter id with atom type symbol 'ZN' from wwPDB.

PREFIX pdbo: <http://rdf.wwpdb.org/schema/pdbx-v40.owl#> 
SELECT DISTINCT ?chem_comp_id ?atom_type_symbol WHERE {
 ?s pdbo:chem_comp_atom.type_symbol ?atom_type_symbol
 FILTER regex(?atom_type_symbol, "ZN").
 ?s pdbo:chem_comp_atom.pdbx_component_comp_id ?chem_comp_id
}

Select all aromatic compound with three leter id from wwPDB.

PREFIX pdbo: <http://rdf.wwpdb.org/schema/pdbx-v40.owl#> 
SELECT DISTINCT ?aromatic_flag ?chem_comp_id 
WHERE
{
 ?s pdbo:chem_comp_atom.pdbx_aromatic_flag ?aromatic_flag .
 ?s2 pdbo:referenced_by_chem_comp_atom ?s .
 ?s2 pdbo:chem_comp.three_letter_code ?chem_comp_id
 FILTER regex(?aromatic_flag, "Y")
}

Select all coordinates missing entries about model and ideal PDB files using each flags (pdbo:chem_comp.pdbx_model_coordinates_missing_flag, pdbo:chem_comp.pdbx_ideal_coordinates_missing_flag).

PREFIX pdbo: <http://rdf.wwpdb.org/schema/pdbx-v40.owl#> 
SELECT DISTINCT * WHERE
{
 ?s pdbo:chem_comp.pdbx_model_coordinates_missing_flag ?model.
 FILTER regex(?model, "Y")
 ?s pdbo:chem_comp.pdbx_ideal_coordinates_missing_flag ?ideal
 FILTER regex(?ideal, "Y")
}

『BR』を含むPDB中のPDBIDの数をカウントする

PREFIX pdbo: <http://rdf.wwpdb.org/schema/pdbx-v40.owl#> 
SELECT DISTINCT ((COUNT(?pdbid) AS ?cnt - 1) AS ?count)
WHERE {

 ?pdbid pdbo:has_chem_compCategory ?pdb2cc_id .
 ?pdb2cc_id pdbo:has_chem_comp ?cc_id .
 ?cc_id pdbo:chem_comp.id "BR";
        pdbo:chem_comp.name ?cc_name .
}

『BR』を含むPDB中のPDBIDのリスト

PREFIX pdbo: <http://rdf.wwpdb.org/schema/pdbx-v40.owl#> 
SELECT DISTINCT ?pdb
WHERE {
 ?pdbid pdbo:has_chem_compCategory ?pdb2cc_id .
 ?pdb2cc_id pdbo:has_chem_comp ?cc_id .
 ?cc_id pdbo:chem_comp.id "BR";
        pdbo:chem_comp.name ?cc_name .

 ?pdbid pdbo:has_structCategory ?struct .
 ?struct pdbo:has_struct ?struct_entity .
 ?struct_entity pdbo:struct.entry_id ?pdb .
}


『AS』を含む化合物の三桁IDのリスト

※一文字の元素記号(ヨウ素Iなど)を含む化合物を取得しようとすると部分マッチした元素記号(ニッケルNI,イリジウムIR、…など)がヒットしてしまいます。

 PREFIX pdbo: <http://rdf.wwpdb.org/schema/pdbx-v40.owl#> 
 SELECT DISTINCT ?hetid ?formula
 WHERE {
 ?s pdbo:has_chem_comp ?chemcomp.
 ?chemcomp pdbo:chem_comp.formula ?formula.
 ?chemcomp pdbo:chem_comp.id ?hetid.

 FILTER regex(?formula, "AS")
 }

PDB(タンパク質)側の検索

PDBID『3FUJ』が持つヘリックスごとの残基長さ

PREFIX pdbo: <http://rdf.wwpdb.org/schema/pdbx-v40.owl#>
SELECT DISTINCT * WHERE {
 <http://rdf.wwpdb.org/pdb/3FUJ> pdbo:has_struct_confCategory ?o .
 ?o ?p2 ?o2.
 ?o2 pdbo:struct_conf.pdbx_PDB_helix_length ?o3.
}

PDBID 3FUJ のヘリックスID P6 が持つレコード一覧 (ヘリックスの開始・終了残基と残基番号、チェインID)

PREFIX pdbo: <http://rdf.wwpdb.org/schema/pdbx-v40.owl#>
SELECT distinct * WHERE {
 <http://rdf.wwpdb.org/pdb/3FUJ/struct_conf/HELX_P6> ?p ?o
}

PDBID 3A0B の各ヘリックスの開始残基と終了残基のチェインIDの一覧

PREFIX pdbo: <http://rdf.wwpdb.org/schema/pdbx-v40.owl#>

SELECT DISTINCT ?h_id ?beg ?end WHERE {
 <http://rdf.wwpdb.org/pdb/3A0B> pdbo:has_struct_confCategory ?o .
 ?o ?p ?h_id .
 ?h_id pdbo:struct_conf.beg_label_asym_id ?beg.
 ?h_id pdbo:struct_conf.end_label_asym_id ?end.
}

PDBID 3A0B の各ヘリックスの開始残基と終了残基のチェインID が異なるものを表示 (テスト用:普通は出力が無い)

PREFIX pdbo: <http://rdf.wwpdb.org/schema/pdbx-v40.owl#>

SELECT DISTINCT ?h_id ?beg ?end WHERE {
 <http://rdf.wwpdb.org/pdb/3A0B> pdbo:has_struct_confCategory ?o .
 ?o ?p ?h_id .
 ?h_id pdbo:struct_conf.beg_label_asym_id ?beg.
 ?h_id pdbo:struct_conf.end_label_asym_id ?end.

 MINUS
  {
     ?h_id pdbo:struct_conf.beg_label_asym_id ?beg.
     ?h_id pdbo:struct_conf.end_label_asym_id ?end.
     FILTER regex(?beg, ?end)
  }
}

PDBID 3A0B のチェインID C の各ヘリックスの残基長

PREFIX pdbo: <http://rdf.wwpdb.org/schema/pdbx-v40.owl#>

SELECT DISTINCT ?beg ?end ?h_leng WHERE {
 <http://rdf.wwpdb.org/pdb/3A0B> pdbo:has_struct_confCategory ?o .
 ?o ?p ?h_id .
 ?h_id pdbo:struct_conf.pdbx_PDB_helix_length ?h_leng.
 ?h_id pdbo:struct_conf.beg_label_asym_id ?beg.
 ?h_id pdbo:struct_conf.end_label_asym_id ?end.

 FILTER regex(?beg, "C")

 MINUS{
  ?h_id pdbo:struct_conf.beg_label_asym_id ?beg.
  FILTER regex(?beg, "CA")
 }
}

PDBID 3A0B のチェインID C の各ヘリックスのヘリックスID と 残基長

PREFIX pdbo: <http://rdf.wwpdb.org/schema/pdbx-v40.owl#>

SELECT DISTINCT * 
WHERE {
  <http://rdf.wwpdb.org/pdb/3A0B> pdbo:has_struct_confCategory ?o .
  ?o ?p ?h_id .
 ?h_id pdbo:struct_conf.pdbx_PDB_helix_length ?h_leng;
       pdbo:struct_conf.beg_label_asym_id ?beg;
       pdbo:struct_conf.end_label_asym_id ?end.

 FILTER regex(?beg, "C")

 MINUS{
  ?h_id pdbo:struct_conf.beg_label_asym_id ?beg.
  FILTER regex(?beg, "CA")
 }
}

PDBID 3A0BのチェインID ごとのヘリックスの残基長一覧

PREFIX pdbo: <http://rdf.wwpdb.org/schema/pdbx-v40.owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT DISTINCT ?beg (SUM(xsd:int(?h_leng)) AS ?sum_leng)
WHERE {
 <http://rdf.wwpdb.org/pdb/3A0B> pdbo:has_struct_confCategory ?o .
 ?o ?p ?h_id .
 ?h_id pdbo:struct_conf.pdbx_PDB_helix_length ?h_leng;
       pdbo:struct_conf.beg_label_asym_id ?beg;
       pdbo:struct_conf.end_label_asym_id ?end.
}

PDBID 3FUJのチェインごとのβシートの長さを取得

PREFIX pdbo: <http://rdf.wwpdb.org/schema/pdbx-v40.owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT DISTINCT ?beg_ch ?end_ch (SUM(xsd:int(?end_nsq) - xsd:int(?beg_nsq) + 1 AS ?length) AS ? sum_lengt)
WHERE {
 <http://rdf.wwpdb.org/pdb/3A0B> pdbo:has_struct_sheet_rangeCategory ?o .
 ?o ?p ?s_id .
 ?s_id pdbo:struct_sheet_range.beg_label_seq_id ?beg_nsq;
       pdbo:struct_sheet_range.end_label_seq_id ?end_nsq;
       pdbo:struct_sheet_range.beg_label_asym_id ?beg_ch;
       pdbo:struct_sheet_range.end_label_asym_id ?end_ch.
}

PDBID 3A0Bのチェインごとのβシートの長さの和

PREFIX pdbo: <http://rdf.wwpdb.org/schema/pdbx-v40.owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT DISTINCT ?beg (SUM(xsd:int(?h_leng)) AS ?sum_leng)
WHERE {
 <http://rdf.wwpdb.org/pdb/3A0B> pdbo:has_struct_confCategory ?o .
 ?o ?p ?h_id .
 ?h_id pdbo:struct_conf.pdbx_PDB_helix_length ?h_leng;
       pdbo:struct_conf.beg_label_asym_id ?beg;
       pdbo:struct_conf.end_label_asym_id ?end.
}

PDBID 3A0Bに含まれる各ベータストランドの長さ

PREFIX pdbo: <http://rdf.wwpdb.org/schema/pdbx-v40.owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT DISTINCT ?s_id (xsd:int(?end_nsq) - xsd:int(?beg_nsq) + 1 AS ?length) ?beg_ch ?end_ch
WHERE {
 <http://rdf.wwpdb.org/pdb/3A0B> pdbo:has_struct_sheet_rangeCategory ?o .
 ?o ?p ?s_id .
 ?s_id pdbo:struct_sheet_range.beg_label_seq_id ?beg_nsq;
       pdbo:struct_sheet_range.end_label_seq_id ?end_nsq;
       pdbo:struct_sheet_range.beg_label_asym_id ?beg_ch;
       pdbo:struct_sheet_range.end_label_asym_id ?end_ch.
}

PDBID 3A0Bのチェインごとのβシートの長さの合計

PREFIX pdbo: <http://rdf.wwpdb.org/schema/pdbx-v40.owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT DISTINCT ?s_id ?beg_ch ?end_ch 
(SUM(xsd:int(?end_nsq) - xsd:int(?beg_nsq) + 1 AS ?length) AS ?sum_lengt)
WHERE {
 <http://rdf.wwpdb.org/pdb/3A0B> pdbo:has_struct_sheet_rangeCategory ?o .
 ?o ?p ?s_id .
 ?s_id pdbo:struct_sheet_range.beg_label_seq_id ?beg_nsq;
       pdbo:struct_sheet_range.end_label_seq_id ?end_nsq;
       pdbo:struct_sheet_range.beg_label_asym_id ?beg_ch;
       pdbo:struct_sheet_range.end_label_asym_id ?end_ch.
}

PDBID 148L チェイン毎の配列長

PREFIX pdbo: <http://rdf.wwpdb.org/schema/pdbx-v40.owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT ?strand_id
(REPLACE(REPLACE(?one_letter_codes, "\n", "") , "[^A-Z].*[^A-Z]", "") AS ?one_letter)
(STRLEN(REPLACE(REPLACE(?one_letter_codes, "\n", "") , "[^A-Z].*[^A-Z]", "")) AS ?seq_length)
WHERE{
 <http://rdf.wwpdb.org/pdb/148L> pdbo:has_entity_polyCategory ?o .
 ?o pdbo:has_entity_poly ?o2 .
 ?o2 pdbo:entity_poly.pdbx_seq_one_letter_code ?one_letter_codes;
 pdbo:entity_poly.pdbx_strand_id ?strand_id.
}

PDBID 1abr の共有結合情報を、残基番号、icode、残基名、原子名のペアと距離情報を組み付けて取得

PREFIX pdbo: <http://rdf.wwpdb.org/schema/pdbx-v40.owl#>

SELECT DISTINCT * WHERE {

<http://rdf.wwpdb.org/pdb/1ABR> pdbo:has_struct_connCategory ?conncat .
?conncat pdbo:has_struct_conn ?connect.
?connect pdbo:struct_conn.ptnr1_auth_asym_id ?chain1;
    pdbo:struct_conn.ptnr1_auth_comp_id ?res1;

    pdbo:struct_conn.ptnr1_auth_seq_id ?seq1;
    pdbo:struct_conn.ptnr1_label_atom_id ?atom1;
    pdbo:struct_conn.ptnr2_auth_asym_id ?chain2;

    pdbo:struct_conn.ptnr2_auth_comp_id ?res2;
    pdbo:struct_conn.ptnr2_auth_seq_id ?seq2;
    pdbo:struct_conn.ptnr2_label_atom_id ?atom2;
    pdbo:struct_conn.pdbx_dist_value ?dist.

    OPTIONAL {
       ?connect pdbo:struct_conn.pdbx_ptnr1_PDB_ins_code ?ins1;
                pdbo:struct_conn.pdbx_ptnr2_PDB_ins_code ?ins2.
    } .
}

Protein Ligand Binding Site Pairの検索

PAIRID 102D_166_489_0 のエントリーを取得

PREFIX pdbo: <http://rdf.wwpdb.org/schema/pdbx-v40.owl#>

SELECT DISTINCT * WHERE {
 <http://www.bi.a.u-tokyo.ac.jp/rdf/102D_166_489_0> ?p ?o .
 ?o ?p2 ?o2 .
} LIMIT 1000

PAIRIDからPDBID, エントリーとリテラルを選択

PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
PREFIX pdbo:<http://rdf.wwpdb.org/schema/pdbx-v40.owl#>
PREFIX bilab:<http://www.bi.a.u-tokyo.ac.jp/owl#>
PREFIX ddi:<http://purl.org/ddi/owl#>

SELECT DISTINCT ?PDBID ?PAIRID ?entry ?literal
WHERE {
 ?PAIRID rdf:type bilab:PAIRID;
         ddi:distance_to_atom ?distance .

 { ?PAIRID bilab:has_interact_atom_site ?blank_side_p .
   ?blank_side_p ?entry ?literal . }
 UNION
 { ?PAIRID bilab:has_interact_chem_comp_atom ?blank_side_c .
   ?blank_side_c ?entry ?literal . }

 ?blank_side_p2 pdbo:has_atom_site ?blank_side_p;
                rdfs:label ?PDBID .
}
LIMIT 100

PAIRID:102D_165_489_0のエントリーを表示

PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
PREFIX pdbo:<http://rdf.wwpdb.org/schema/pdbx-v40.owl#>
PREFIX bilab:<http://www.bi.a.u-tokyo.ac.jp/owl#>
PREFIX ddi:<http://purl.org/ddi/owl#>

SELECT DISTINCT ?PAIRID ?entry ?literal  
WHERE {
 <http://www.bi.a.u-tokyo.ac.jp/rdf/102D_165_489_0> ddi:distance_to_atom ?distance ;
                                                    rdfs:label ?PAIRID ;
                                                    bilab:has_interact_atom_site ?blank_side_p ;
                                                    bilab:has_interact_chem_comp_atom ? blank_side_c .

 {?blank_side_p ?entry ?literal .} UNION {?blank_side_c ?entry ?literal .}
}
LIMIT 100

リガンド結合部位データベースとPDBの統合検索(ただし1個のグラフにぶち込んでいます)

PAIRIDとPDBIDの組み付けリストの200000行目から100000行分のデータを生成

(実験用サーバでは10万行の出力が限界だったので, OFFSET関数で区切って出力するシェルスクリプトをrubyで書いた)

PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
PREFIX pdbo:<http://rdf.wwpdb.org/schema/pdbx-v40.owl#>
PREFIX bilab:<http://www.bi.a.u-tokyo.ac.jp/owl#>

CONSTRUCT{ 
 ?PAIRID pdbo:link_to_pdb ?PDBID .
}

WHERE {
 ?PAIRID rdf:type bilab:PAIRID .

 ?PAIRID bilab:has_interact_atom_site ?blank_side_p .

 ?blank_side_p2 pdbo:has_atom_site ?blank_side_p;
                rdfs:label ?PDBID .
}
LIMIT  100000
OFFSET 200000

PAIRIDが持つPDBIDへのリンクからPDBが持つLigandのIDと名称を取得

PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
PREFIX pdbo:<http://rdf.wwpdb.org/schema/pdbx-v40.owl#>
PREFIX bilab:<http://www.bi.a.u-tokyo.ac.jp/owl#>
PREFIX ddi:<http://purl.org/ddi/owl#>

SELECT DISTINCT ?pairid_label ?p_id ?p_description ?ligand_id ?ligand_name     
WHERE {
 ?pairid rdf:type bilab:PAIRID .
 ?pairid pdbo:link_to_pdb ?pdbid ;
         ddi:distance_to_atom ?distance ;
         rdfs:label ?pairid_label ;
         bilab:has_interact_atom_site ?blank_side_p ;
         bilab:has_interact_chem_comp_atom ?blank_side_c .

         ?blank_side_c pdbo:chem_comp.name ?ligand_name.

 ?pdbid pdbo:has_structCategory ?struct .
 ?struct pdbo:has_struct ?struct_entity .
 ?struct_entity pdbo:struct.entry_id ?p_id ;
                pdbo:struct.title ?p_title ;
                pdbo:struct.pdbx_descriptor ?p_description .

 ?pdbid pdbo:has_chem_compCategory ?pdb2cc_id .
 ?pdb2cc_id pdbo:has_chem_comp ?cc_id .
 ?cc_id pdbo:chem_comp.id ?ligand_id ; 
        pdbo:chem_comp.name ?ligand_name .

} 
LIMIT 1000

PAIRID:102D_166_489_0のタンパク質とリガンドの組み合わせを取得

PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
PREFIX pdbo:<http://rdf.wwpdb.org/schema/pdbx-v40.owl#>
PREFIX bilab:<http://www.bi.a.u-tokyo.ac.jp/owl#>

SELECT DISTINCT ?pdbid ?p_id ?p_title ?p_description ?ligand_id ?ligand_name  
WHERE {
 <http://www.bi.a.u-tokyo.ac.jp/rdf/102D_166_489_0> rdf:type bilab:PAIRID ;
                                                    pdbo:link_to_pdb ?pdbid .

 ?pdbid pdbo:has_structCategory ?struct .
 ?struct pdbo:has_struct ?struct_entity .
 ?struct_entity pdbo:struct.entry_id ?p_id ;
                pdbo:struct.title ?p_title ;
                pdbo:struct.pdbx_descriptor ?p_description .

 ?pdbid pdbo:has_chem_compCategory ?pdb2cc_id .
 ?pdb2cc_id pdbo:has_chem_comp ?cc_id .
 ?cc_id pdbo:chem_comp.id ?ligand_id ; 
        pdbo:chem_comp.name ?ligand_name .

} 
LIMIT 100

PDBID毎のHet Atomの一覧から残基をのぞいて選択

PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl:<http://www.w3.org/2002/07/owl#>
PREFIX bilab:<http://www.bi.a.u-tokyo.ac.jp/owl#>
PREFIX pdbo:<http://rdf.wwpdb.org/schema/pdbx-v40.owl#>
PREFIX pdbr:<http://rdf.wwpdb.org/pdb/>
PREFIX up:<http://purl.uniprot.org/core/>

SELECT DISTINCT ?p_id ?p_description ?ligand_id ?ligand_name     
WHERE {
 ?pdbid pdbo:has_structCategory ?struct .
 ?struct pdbo:has_struct ?struct_entity .
 ?struct_entity pdbo:struct.entry_id ?p_id ;
                pdbo:struct.title ?p_title ;
                pdbo:struct.pdbx_descriptor ?p_description .

 ?pdbid pdbo:has_chem_compCategory ?pdb2cc_id .
 ?pdb2cc_id pdbo:has_chem_comp ?cc_id .
 ?cc_id pdbo:chem_comp.id ?ligand_id ; 
        pdbo:chem_comp.name ?ligand_name .

 MINUS {
   ?cc_id pdbo:chem_comp.id ?ligand_id  .
    FILTER regex(?ligand_id, "ALA") .
}
 MINUS {
   ?cc_id pdbo:chem_comp.id ?ligand_id  .
    FILTER regex(?ligand_id, "VAL") .
}
 MINUS {
   ?cc_id pdbo:chem_comp.id ?ligand_id  .
    FILTER regex(?ligand_id, "LEU") .
}
 MINUS {
   ?cc_id pdbo:chem_comp.id ?ligand_id  .
   FILTER regex(?ligand_id, "ILE") .
}
 MINUS {
   ?cc_id pdbo:chem_comp.id ?ligand_id  .
   FILTER regex(?ligand_id, "PRO") .
}
 MINUS {
   ?cc_id pdbo:chem_comp.id ?ligand_id  .
   FILTER regex(?ligand_id, "PHE") .
}
 MINUS {
   ?cc_id pdbo:chem_comp.id ?ligand_id  .
   FILTER regex(?ligand_id, "TRP") .
}
 MINUS {
   ?cc_id pdbo:chem_comp.id ?ligand_id  .
   FILTER regex(?ligand_id, "CYS") .
}
 MINUS {
   ?cc_id pdbo:chem_comp.id ?ligand_id  .
   FILTER regex(?ligand_id, "GLY") .
}
 MINUS {
   ?cc_id pdbo:chem_comp.id ?ligand_id  .
   FILTER regex(?ligand_id, "SER") .
}
 MINUS {
   ?cc_id pdbo:chem_comp.id ?ligand_id  .
   FILTER regex(?ligand_id, "THR") .
}
 MINUS {
   ?cc_id pdbo:chem_comp.id ?ligand_id  .
   FILTER regex(?ligand_id, "TYR") .
 }
 MINUS {
   ?cc_id pdbo:chem_comp.id ?ligand_id  .
   FILTER regex(?ligand_id, "ASN") .
 }
 MINUS {
   ?cc_id pdbo:chem_comp.id ?ligand_id  .
   FILTER regex(?ligand_id, "GLN") .
}
 MINUS {
    ?cc_id pdbo:chem_comp.id ?ligand_id  .
     FILTER regex(?ligand_id, "ASP") .
 }
 MINUS {
    ?cc_id pdbo:chem_comp.id ?ligand_id  .
     FILTER regex(?ligand_id, "GLU") .
 }
 MINUS {
    ?cc_id pdbo:chem_comp.id ?ligand_id  .
      FILTER regex(?ligand_id, "LYS") .
 }
 MINUS {
    ?cc_id pdbo:chem_comp.id ?ligand_id  .
     FILTER regex(?ligand_id, "ARG") .
 }
 MINUS {
    ?cc_id pdbo:chem_comp.id ?ligand_id  .
     FILTER regex(?ligand_id, "HIS") .
 }
 MINUS {
    ?cc_id pdbo:chem_comp.id ?ligand_id  .
     FILTER regex(?ligand_id, "MET") .
 }
} 
LIMIT 5000

PDB Ligand ID『MAN』についてPDBとPLBSPから統合検索(PDB Ligand ID, PDBID, PLBSPID, Protein Atom Name, Protein Atom ID, Protein Chain ID, Residue Name, Residue Num, Ligand Atom Name, Ligand Atom ID, Ligand Chain ID, Distance)

PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl:<http://www.w3.org/2002/07/owl#>
PREFIX bilab:<http://www.bi.a.u-tokyo.ac.jp/owl#>
PREFIX pdbo:<http://rdf.wwpdb.org/schema/pdbx-v40.owl#>
PREFIX pdbr:<http://rdf.wwpdb.org/pdb/>
PREFIX up:<http://purl.uniprot.org/core/>
PREFIX ddi:<http://purl.org/ddi/owl#>

SELECT DISTINCT ?ligand_id ?p_id ?plbspid ?protein_atom_name ?protein_atom_id ?residue_name ?residue_num ?chain_id ?ligand_atom_name ?ligand_atom_id ?ligand_chain_id ?distance 
WHERE {

 ?pdbid pdbo:has_structCategory ?struct .
 ?struct pdbo:has_struct ?struct_entity .
 ?struct_entity pdbo:struct.entry_id ?p_id .

 ?pdbid pdbo:has_chem_compCategory ?pdb2cc_id .
 ?pdb2cc_id pdbo:has_chem_comp ?cc_id .
 ?cc_id pdbo:chem_comp.id ?ligand_id .
 FILTER CONTAINS(?ligand_id, "MAN") .

 ?pairid pdbo:link_to_pdb ?pdbid .
 ?pairid ddi:distance_to_atom ?distance;
         rdfs:label ?plbspid;
         bilab:has_interact_atom_site ?blank_side_p;
         bilab:has_interact_chem_comp_atom ?blank_side_c .

 ?blank_side_p pdbo:atom_site.label_atom_id ?protein_atom_id;
               pdbo:atom_site.type_symbol ?protein_atom_name; 
               pdbo:atom_site.label_asym_id ?chain_id;
               pdbo:atom_site.label_comp_id ?residue_name;
               pdbo:atom_site.label_seq_id ?residue_num .

 ?blank_side_c pdbo:atom_site.label_atom_id ?ligand_atom_id;
               pdbo:chem_comp_atom.type_symbol ?ligand_atom_name;
               pdbo:atom_site.label_asym_id ?ligand_chain_id.
} 
LIMIT 100

PLBSP-PDB統合検索 Ligand ID『STR』をpoly_entityについてしぼり込み, およびクエリの最適化.

PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl:<http://www.w3.org/2002/07/owl#>
PREFIX bilab:<http://www.bi.a.u-tokyo.ac.jp/owl#>
PREFIX pdbo:<http://rdf.wwpdb.org/schema/pdbx-v40.owl#>
PREFIX pdbr:<http://rdf.wwpdb.org/pdb/>
PREFIX up:<http://purl.uniprot.org/core/>
PREFIX ddi:<http://purl.org/ddi/owl#>

SELECT DISTINCT ?p_id ?plbspid ?protein_atom_name ?protein_atom_id ?residue_name ?residue_num ?chain_id ?ligand_atom_name   ?cc_name ?ligand_atom_id ?ligand_chain_id ?distance ?poly_entity

WHERE 
{
 ?pdbid pdbo:has_chem_compCategory ?pdb2cc_id .
 ?pdb2cc_id pdbo:has_chem_comp ?cc_id .
 ?cc_id pdbo:chem_comp.id "STR";
        pdbo:chem_comp.name ?cc_name .
 
 ?pdbid pdbo:has_structCategory ?struct .
 ?struct pdbo:has_struct ?struct_entity .
 ?struct_entity pdbo:struct.entry_id ?p_id .
 ?pdbid pdbo:has_entity_polyCategory ?poly.
 ?poly pdbo:has_entity_poly ?poly2.
 ?ploy2 pdbo:entity_poly.type ?poly_entity.
 FILTER regex(?poly_entity, "polypeptide")

 ?pairid pdbo:link_to_pdb ?pdbid .
 ?pairid ddi:distance_to_atom ?distance;
         rdfs:label ?plbspid;
         bilab:has_interact_atom_site ?blank_side_p;
         bilab:has_interact_chem_comp_atom ?blank_side_c .
 
 ?blank_side_p pdbo:atom_site.label_atom_id ?protein_atom_id;
               pdbo:atom_site.type_symbol ?protein_atom_name; 
               pdbo:atom_site.label_asym_id ?chain_id;
               pdbo:atom_site.label_comp_id ?residue_name;
               pdbo:atom_site.label_seq_id ?residue_num .
 
 ?blank_side_c pdbo:atom_site.label_atom_id ?ligand_atom_id;
               pdbo:chem_comp_atom.type_symbol ?ligand_atom_name;
               pdbo:chem_comp.name ?cc_name;
               pdbo:atom_site.label_asym_id ?ligand_chain_id.
}
 
LIMIT 100
OFFSET 0

PLBSP-PDB統合検索 Ligand ID『STR』と結合し、二次構造がヘリックスである pairid の一覧

PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl:<http://www.w3.org/2002/07/owl#>
PREFIX bilab:<http://www.bi.a.u-tokyo.ac.jp/owl#>
PREFIX pdbo:<http://rdf.wwpdb.org/schema/pdbx-v40.owl#>
PREFIX pdbr:<http://rdf.wwpdb.org/pdb/>
PREFIX up:<http://purl.uniprot.org/core/>
PREFIX ddi:<http://purl.org/ddi/owl#>

SELECT DISTINCT ?p_id ?protein_atom_name ?protein_atom_id ?residue_name ?residue_num ?beg_seq ?end_seq ?ligand_atom_name  ?cc_name ?ligand_atom_id ?ligand_chain_id ?distance ?poly_entity ?beg_ch 
WHERE 
{
 ?pdbid pdbo:has_chem_compCategory ?pdb2cc_id .
 ?pdb2cc_id pdbo:has_chem_comp ?cc_id .
 ?cc_id pdbo:chem_comp.id "STR";
        pdbo:chem_comp.name ?cc_name .

 ?pdbid pdbo:has_structCategory ?struct .
 ?struct pdbo:has_struct ?struct_entity .
 ?struct_entity pdbo:struct.entry_id ?p_id .

 ?pdbid pdbo:has_struct_confCategory ?conf_cat.
 ?conf_cat ?p ?h_id .
 ?h_id pdbo:struct_conf.beg_auth_asym_id ?beg_ch;
        pdbo:struct_conf.beg_label_seq_id ?beg_seq;
        pdbo:struct_conf.end_label_seq_id ?end_seq.

 ?pdbid pdbo:has_entity_polyCategory ?poly.
 ?poly pdbo:has_entity_poly ?poly2.
 ?ploy2 pdbo:entity_poly.type ?poly_entity.
 FILTER regex(?poly_entity, "polypeptide")

 ?pairid pdbo:link_to_pdb ?pdbid .
 ?pairid ddi:distance_to_atom ?distance;
         rdfs:label ?plbspid;
         bilab:has_interact_atom_site ?blank_side_p;
         bilab:has_interact_chem_comp_atom ?blank_side_c .

 ?blank_side_p pdbo:atom_site.label_atom_id ?protein_atom_id;
               pdbo:atom_site.type_symbol ?protein_atom_name; 
               pdbo:atom_site.label_asym_id ?beg_ch;
               pdbo:atom_site.label_comp_id ?residue_name;
               pdbo:atom_site.label_seq_id ?residue_num .
  FILTER (?residue_num >= ?beg_seq)
  FILTER (?residue_num <= ?end_seq)

 ?blank_side_c pdbo:atom_site.label_atom_id ?ligand_atom_id;
               pdbo:chem_comp_atom.type_symbol ?ligand_atom_name;
               pdbo:chem_comp.name ?cc_name;
               pdbo:atom_site.label_asym_id ?ligand_chain_id.
} 
LIMIT 100
OFFSET 100


作成者:込山, 番野 (UT_Prot)