Skip to content

Instantly share code, notes, and snippets.

@jctoledo
Created March 25, 2014 13:40
Show Gist options
  • Save jctoledo/9762002 to your computer and use it in GitHub Desktop.
Save jctoledo/9762002 to your computer and use it in GitHub Desktop.
get the total number of chains in my dataset
select count (distinct ?chain)
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.
?chainPosition a <http://bio2rdf.org/pdb_vocabulary:ChainPosition>.
?chainPosition <http://bio2rdf.org/pdb_vocabulary:isPartOf> ?chain.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment