converting drugbank to TSV using XSLT and xsltstream http://lindenb.github.io/jvarkit/XsltStream.html
e.g:
java -jar dist/xsltstream.jar \
-n '{http://www.drugbank.ca}drug' \
-t drugbank2tsv.xsl \
/path/to/full_database.xml
converting drugbank to TSV using XSLT and xsltstream http://lindenb.github.io/jvarkit/XsltStream.html
e.g:
java -jar dist/xsltstream.jar \
-n '{http://www.drugbank.ca}drug' \
-t drugbank2tsv.xsl \
/path/to/full_database.xml
| /* | |
| Author: Pierre Lindenbaum @yokofakun | |
| related: | |
| http://bionics.it/posts/parsing-drugbank-xml-or-any-large-xml-file-in-streaming-mode-in-go | |
| */ | |
| import ca.drugbank.*; | |
| import java.util.*; | |
| import java.util.stream.*; |
| # -*- coding: utf-8 -*- | |
| """ | |
| Animated 3D sinc function | |
| """ | |
| from pyqtgraph.Qt import QtCore, QtGui | |
| import pyqtgraph.opengl as gl | |
| import pyqtgraph as pg | |
| import numpy as np | |
| import sys |
| SELECT node.title,timestamp,node_revisions.body | |
| FROM node | |
| LEFT JOIN node_revisions ON node.vid=node_revisions.vid | |
| INTO OUTFILE '/tmp/nodes.csv' | |
| FIELDS TERMINATED BY ',' | |
| ENCLOSED BY '"' | |
| LINES TERMINATED BY '\n'; |
| defmodule ATGCCount do | |
| def count(sequence), do: cnt(String.to_char_list(sequence),0,0) | |
| def cnt([65|t],at,gc), do: cnt(t,at+1,gc) | |
| def cnt([84|t],at,gc), do: cnt(t,at+1,gc) | |
| def cnt([71|t],at,gc), do: cnt(t,at,gc+1) | |
| def cnt([67|t],at,gc), do: cnt(t,at,gc+1) | |
| def cnt([62|_],at,gc), do: {at,gc} | |
| def cnt([],at,gc), do: {at,gc} | |
| # def cnt(_,0,0), do: {0,0} | |
| def cnt([_|t], at, gc), do: cnt(t,at,gc) |
| --- | |
| - name: Create directory to put elixir in | |
| sudo: 'yes' | |
| shell: "mkdir -p /opt/elixir/v0.15.0" | |
| - name: Install unzip | |
| apt: name=unzip state=present update_cache=true | |
| - name: Unzip elixir release | |
| sudo: 'yes' |
| #!/usr/bin/env julia | |
| function gc_count(fasta::String) | |
| file = open(fasta, "r") | |
| lines = readall(file) | |
| gc = at = 0 | |
| for c in lines.data | |
| if (c == 'G') || (c == 'C') | |
| gc += 1 |
| use std::io::fs::File; | |
| enum ReadState { | |
| Normal, | |
| Newline, | |
| Skipline, | |
| } | |
| fn main() { | |
| let mut at = 0i; |