Skip to content

Instantly share code, notes, and snippets.

@jctoledo
Created March 25, 2014 14:04
Show Gist options
  • Save jctoledo/9762533 to your computer and use it in GitHub Desktop.
Save jctoledo/9762533 to your computer and use it in GitHub Desktop.
get the counts of backbones in my data
select ?a count (distinct ?backbone) as ?c
from <http://bio2rdf.org/rna_cycles_pdb>
where{
?a a <http://bio2rdf.org/pdb_vocabulary:Experiment>.
?mcb <http://bio2rdf.org/narf_vocabulary:derived_from> ?a.
?a <http://bio2rdf.org/pdb_vocabulary:hasPart> ?cse.
?cse a <http://bio2rdf.org/pdb_vocabulary:ChemicalSubstanceExtraction>.
?cse <http://bio2rdf.org/pdb_vocabulary:hasProduct> ?polymer.
?polymer a <http://bio2rdf.org/pdb_vocabulary:Polymer>.
?residue <http://bio2rdf.org/pdb_vocabulary:isPartOf> ?polymer.
?residue <http://bio2rdf.org/pdb_vocabulary:hasChainPosition> ?chainPosition.
?backbone a <http://bio2rdf.org/narf_vocabulary:phosphodiester_bond>.
?backbone <http://bio2rdf.org/narf_vocabulary:has_part> ?residue.
?chainPosition a <http://bio2rdf.org/pdb_vocabulary:ChainPosition>.
?chainPosition <http://bio2rdf.org/pdb_vocabulary:isPartOf> ?chain.
} ORDER BY DESC(?c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment