This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select STR(?size) as ?cycle_size COUNT(?a) as ?frequency | |
from <http://bio2rdf.org/narf:rna_cycles> | |
where{ | |
?a a <http://bio2rdf.org/narf_vocabulary:cycle>. | |
?a <http://bio2rdf.org/narf_vocabulary:has_attribute> ?c. | |
?a <http://bio2rdf.org/narf_vocabulary:has_attribute> ?d. | |
?d a <http://bio2rdf.org/narf_vocabulary:cycle_size>. | |
?d <http://bio2rdf.org/narf_vocabulary:has_value> ?size. | |
?c a <http://bio2rdf.org/narf_vocabulary:cycle_profile_level_2> . | |
?c <http://bio2rdf.org/narf_vocabulary:has_md5hash> ?ahash . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select STR(?size) as ?cycle_size COUNT(?a) as ?frequency | |
from <http://bio2rdf.org/narf:rna_cycles> | |
where{ | |
?a a <http://bio2rdf.org/narf_vocabulary:cycle>. | |
?a <http://bio2rdf.org/narf_vocabulary:has_attribute> ?c. | |
?a <http://bio2rdf.org/narf_vocabulary:has_attribute> ?d. | |
?d a <http://bio2rdf.org/narf_vocabulary:cycle_size>. | |
?d <http://bio2rdf.org/narf_vocabulary:has_value> ?size. | |
?c a <http://bio2rdf.org/narf_vocabulary:cycle_profile_level_2> . | |
?c <http://bio2rdf.org/narf_vocabulary:has_md5hash> ?ahash . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select STR(?ahash) AS ?level2profile COUNT(distinct ?a) | |
from <http://bio2rdf.org/narf:rna_cycles> | |
where{ | |
?a a <http://bio2rdf.org/narf_vocabulary:cycle>. | |
?a <http://bio2rdf.org/narf_vocabulary:has_attribute> ?c. | |
?c a <http://bio2rdf.org/narf_vocabulary:cycle_profile_level_2> . | |
?c <http://bio2rdf.org/narf_vocabulary:has_md5hash> ?ahash . | |
?a <http://bio2rdf.org/narf_vocabulary:has_part> ?ap. | |
?lh <http://bio2rdf.org/lighood_vocabulary:has_member> ?ap. | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select distinct STR(?ahash) AS ?s COUNT(?s) | |
from <http://bio2rdf.org/narf:rna_cycles> | |
where{ | |
?a a <http://bio2rdf.org/narf_vocabulary:cycle>. | |
?a <http://bio2rdf.org/narf_vocabulary:has_attribute> ?c. | |
?c a <http://bio2rdf.org/narf_vocabulary:cycle_profile_level_2> . | |
?c <http://bio2rdf.org/narf_vocabulary:has_md5hash> ?ahash . | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected String execute(Sequence aSequence, String[] commands) | |
throws InvalidSequenceException, IOException { | |
String returnMe = ""; | |
if (aSequence.getLength() == 0) { | |
throw new InvalidSequenceException( | |
"The sequence provided to execute RNAFold was empty!"); | |
} | |
String[] cmdArr = new String[commands.length + 1]; | |
System.arraycopy(new String[] { "RNAfold" }, 0, cmdArr, 0, 1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function write_predicate_object_counts($fh, $pred_obj_counts){ | |
GLOBAL $dataset_uri; | |
GLOBAL $options; | |
if($pred_obj_counts !== null){ | |
foreach($pred_obj_counts as $pred => $count){ | |
#create a resource for the property partition | |
$partition_res = "http://bio2rdf.org/dataset_resource:".md5($options['url']).md5($options['url'].$pred.$count."predicate_object_count"); | |
#add the dataset type |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function write_predicate_object_counts($fh, $pred_obj_counts){ | |
GLOBAL $options; | |
if($pred_obj_counts !== null){ | |
foreach($pred_obj_counts as $pred => $count){ | |
fwrite($fh, Quad("http://bio2rdf.org/dataset_resource:".md5($options['url']), "http://bio2rdf.org/dataset_vocabulary:has_predicate_object_count", "http://bio2rdf.org/dataset_resource:".md5($options['url'].$pred.$count."predicate_object_count"))); | |
fwrite($fh, Quad("http://bio2rdf.org/dataset_resource:".md5($options['url'].$pred.$count."predicate_object_count"), "http://bio2rdf.org/dataset_vocabulary:has_predicate", $pred)); | |
fwrite($fh, QuadLiteral("http://bio2rdf.org/dataset_resource:".md5($options['url'].$pred.$count."predicate_object_count"), "http://bio2rdf.org/dataset_vocabulary:has_count", $count)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function get_void_dataset_uri(){ | |
GLOBAL $cmd_pre; | |
GLOBAL $cmd_post; | |
$q = "select ?x where {?w <http://rdfs.org/ns/void#inDataset> ?x.}LIMIT 1"; | |
$cmd = $cmd_pre.$q.$cmd_post; | |
$out = ""; | |
try{ | |
$out = execute_isql_command($cmd); | |
}catch(Exception $e){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function write_type_counts($fh, $type_counts){ | |
GLOBAL $options; | |
GLOBAL $dataset_uri; | |
if($type_counts !== null){ | |
foreach($type_counts as $type => $count){ | |
#now create a resource for the class partition | |
$partition_res = "http://bio2rdf.org/dataset_resource:".md5($options['url']).md5($options['url'].$type.$count."type_count"); | |
fwrite($fh, Quad($partition_res, "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", "http://rdfs.org/ns/void#Dataset")); | |
fwrite($fh, Quad($partition_res, "http://rdfs.org/ns/void#class", $type)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Bio.PDB import * | |
import sys | |
p = PDBParser(PERMISSIVE=1) | |
ligand_id = "ADE" | |
radius = 5.4 | |
pdbl = PDBList() | |
structure_id = "1Y26" | |
pdbl.retrieve_pdb_file(structure_id, pdir="/tmp") | |
filename = "1y26.pdb" | |
#see for more details: http://biopython.org/DIST/docs/tutorial/Tutorial.html#htoc153 |