Skip to content

Instantly share code, notes, and snippets.

Toshiaki Katayama ktym

  • Database Center for Life Science
  • Japan
View GitHub Profile
View hint.graphql
"""
Example RDF/Turtle:
hnt:A0A024QYV7-Q00653
bp3:dataSource <http://identifiers.org/HINT> ;
bp3:displayName "A0A024QYV7-Q00653"^^xsd:string ;
bp3:evidence pint:evidence-pubmed_14743216-MI_0007-literature-curated , pint:evidence-pubmed_14743216-MI_0676-literature-curated ;
bp3:name "A0A024QYV7-Q00653"^^xsd:string ;
bp3:participant [
obo:BFO_0000051 uni:A0A024QYV7 ;
@ktym
ktym / dp.rb
Last active Jul 11, 2019
See https://github.com/ktym/dp for newer version.
View dp.rb
#!/usr/bin/env ruby
=begin
# Pairwise sequence alignment algorithms
Currently implements Needleman-Wunsch, Smith-Waterman
and Needleman-Wunsch-Gotoh algorithms based on
the Dynamic Programming (DP).
## Coordinates
View bwt.rb
#!/usr/bin/env ruby
#
# https://qiita.com/erukiti/items/f11f448d3f4d73fbc1f9
# https://research.preferred.jp/2012/11/burrows-wheeler-transform-lf-mapping/
#
class BWT
def initialize(str)
@str = str + '$'
View idorg-ontology-dblink.owl
View select_reads_on_uniq_path.rb
#!/usr/bin/env ruby
require 'json'
uniq = File.open("uniq_node.txt").map {|x| x.stip.to_i}
json = JSON.parse(ARGF.read)
json.each do |ary|
read_id = ary.shift
View select_uniq_path.rb
#!/usr/bin/env ruby
matrix = []
ARGF.each do |line|
ary = line.strip.split
matrix << ary
end
matrix.transpose.each do |row|
View Dockerfile
# Dockerfile for https://github.com/dbcls/sparqlist
FROM ubuntu:16.04
ARG node_version=v7.9.0
RUN apt-get -qq update && apt-get -qq install -y \
pkg-config \
sudo \
curl \
View jst-csv2nt.rb
#!/usr/bin/env ruby-2.3
=begin
# SPARQL endpoint
https://stirdf.jglobal.jst.go.jp/sparql
# SPARQL query
select *
where {
?term a skos:Concept ;
@ktym
ktym / ajacs55.md
Last active Aug 29, 2015
AJACS 55 Introduction of pathway databases
View ajacs55.md

パスウェイデータベースを使ってみる

Pathguide

まずは、様々なパスウェイデータベースの一覧を見てみましょう。

500 以上のデータベースが下記の分類でリストアップされています。

@ktym
ktym / lodconvert.rb
Last active Aug 29, 2015
RDF format converter
View lodconvert.rb
#!/usr/bin/env ruby
#
# % gem install linkeddata
# % lodconvert.rb -h
# % lodconvert.rb [-i input_format] [-o output_format] inputfile > outputfile
#
require 'rubygems'
require 'linkeddata'
require 'getoptlong'
You can’t perform that action at this time.