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
#!/usr/bin/env ruby | |
require 'nokogiri' | |
#require 'erb' | |
require 'pp' | |
require 'json' | |
#require 'thor' | |
# 1. wget https://www.ncbi.nlm.nih.gov/biosample/docs/attributes/?format=xml -O ncbi_biosample_attributes.xml | |
# 2. %ruby ncbi_biosample_attributes_extend2ttl.rb ncbi_biosample_attributes.xml > biosample_attributes_extend.ttl |
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
#require 'open-uri' | |
require 'rdf/raptor' | |
require 'json' | |
require 'json/ld' | |
require 'pp' | |
require "faraday" | |
require 'faraday_middleware' | |
require 'fileutils' | |
require 'systemu' |
This file has been truncated, but you can view the full file.
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
{ | |
"RF00001": { | |
"AC": "RF00001", | |
"ID": "5S_rRNA", | |
"DE": "5S ribosomal RNA", | |
"feature": "rRNA", | |
"qualifiers": [ | |
{ | |
"product": "5S ribosomal RNA" | |
}, |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'bio' | |
def parse_st_comment comment | |
tagset_id = nil | |
tag_name = tag_value = '' | |
st = Hash.new { |h,k| h[k] = {} } | |
comment.split("\n").each do |line| |
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
#!/usr/bin/env ruby | |
# | |
# convert genome_reprots to RDF | |
# * ftp://ftp.ncbi.nlm.nih.gov/genomes/GENOME_REPORTS/prokaryotes.txt | |
# * ftp://ftp.ncbi.nlm.nih.gov/genomes/GENOME_REPORTS/eukaryotes.txt | |
# | |
require 'date' | |
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
#!/usr/bin/env ruby-1.9 | |
require 'rubygems' | |
require 'bio' | |
require 'json' | |
require 'securerandom' | |
# [TODO] true to combine the result with the EdgeDB | |
if $DEBUG | |
$edgedb = true |
NewerOlder