Skip to content

Instantly share code, notes, and snippets.

Takatomo Fujisawa tfuji

Block or report user

Report or block tfuji

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View json2ld-context.json
"@context": [
"@vocab": "",
"tgv": "",
"dcterms": "",
"m2r": "",
"faldo": "",
"obo": "",
tfuji / es_msearch_test.rb
Last active Oct 30, 2019
View es_msearch_test.rb
#!/usr/bin/env ruby
require 'elasticsearch'
require 'json'
require 'pp'
#client ={log: true, hosts: { host: 'localhost'}})
client ={hosts: { host: 'localhost', port: 9291 }})
q ='water'
from = 0
size = 20
View load_sample.rb
#!/usr/bin/env ruby
# ruby load_sample.rb biosample/annotated_json dev
require 'elasticsearch'
require 'json'
require 'pp'
#client ={log: true, hosts: { host: 'localhost', user: 'user', password: 'password' }})
client ={log: true, hosts: { host: 'localhost'}})
View ncbi_biosample_attributes_extend2ttl.rb
#!/usr/bin/env ruby
require 'nokogiri'
#require 'erb'
require 'pp'
require 'json'
#require 'thor'
# 1. wget -O ncbi_biosample_attributes.xml
# 2. %ruby ncbi_biosample_attributes_extend2ttl.rb ncbi_biosample_attributes.xml > biosample_attributes_extend.ttl
View fetch_context.rb
#require 'open-uri'
require 'rdf/raptor'
require 'json'
require 'json/ld'
require 'pp'
require "faraday"
require 'faraday_middleware'
require 'fileutils'
require 'systemu'
View ft_rfam.json
This file has been truncated, but you can view the full file.
"RF00001": {
"AC": "RF00001",
"ID": "5S_rRNA",
"DE": "5S ribosomal RNA",
"feature": "rRNA",
"qualifiers": [
"product": "5S ribosomal RNA"
tfuji / parse_st.rb
Created Mar 14, 2016
INSDC structured comment parser
View parse_st.rb
#!/usr/bin/env ruby
require 'rubygems'
require 'bio'
def parse_st_comment comment
tagset_id = nil
tag_name = tag_value = ''
st = { |h,k| h[k] = {} }
comment.split("\n").each do |line|
tfuji / biosample2ttl.rb
Created Feb 20, 2015
biosample2ttl.rb v0.2
View biosample2ttl.rb
#!/usr/bin/env ruby
require 'nokogiri'
require 'erb'
#require 'uri'
#require 'pp'
class BioSampleSet
include Enumerable
tfuji / genome_reports2ttl.rb
Last active Aug 29, 2015
View genome_reports2ttl.rb
#!/usr/bin/env ruby
# convert genome_reprots to RDF
# *
# *
require 'date'
View refseq2rdf.rb
#!/usr/bin/env ruby-1.9
require 'rubygems'
require 'bio'
require 'json'
require 'securerandom'
# [TODO] true to combine the result with the EdgeDB
$edgedb = true
You can’t perform that action at this time.