Comments (1)
Get data from KEGG API, and write a script to generate the same format files.
curl http://rest.kegg.jp/link/pathway/ko -o pathway-KO.raw.list
sed 's/ko://g;s/path://g' pathway-KO.raw.list | grep map > pathway-KO.list
curl http://rest.kegg.jp/link/module/ko -o module-KO.raw.list
sed 's/ko://g;s/md://g' module-KO.raw.list > module-KO.list
curl http://rest.kegg.jp/list/module | sed 's/^md://g' > module.desc.list
curl http://rest.kegg.jp/list/pathway | sed 's/^path://g' > pathway.desc.list
perl handle.pl pathway-KO.list pathway.desc.list > path_stat_KO.xls
perl handle.pl module-KO.list module.desc.list > module_stat_KO.xls
handle.pl
script
#!/usr/bin/perl -w
use strict;
use warnings;
@ARGV == 2 || die "perl $0 pathway-KO.list pathway.desc.list > path_stat_KO.v2.xls\n";
my ($rlist, $desc) = @ARGV;
my %ID2KOs;
open IN, $rlist || die $!;
while(<IN>){
chomp;
my ($KO, $ID) = split /\t/;
push @{$ID2KOs{$ID}}, $KO;
}
close IN;
print "id\tK_num\tKOs\tDescription\n";
open DESC, $desc || die $!;
while(<DESC>){
chomp;
my ($ID, $detail) = split /\t/;
$ID2KOs{$ID} || warn "No KOs in $ID\n";
$ID2KOs{$ID} || next;
print "$ID\t", scalar(@{$ID2KOs{$ID}}), "\t", join(",", @{$ID2KOs{$ID}}), "\t", $detail, "\n";
}
close DESC;
from reporterscore.
Related Issues (7)
- What if the P value is caculated from other statistical method HOT 4
- How can I confirm the type of the pathway ?怎么根据repoterScore正负判断通路的富集在哪一个分组呢?原来KO的差异分析有判断enrich direction的,这个跟原来的KO的关系如何呢?
- An error occurred while running the sample file (运行示例数据时报错了 HOT 4
- 关于 引用 的问题,是引用Bäckhed et al., 2015, 还是直接写这个github的网址? HOT 1
- 数据库构建出现问题
- 关于reporter-score正负号问题
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reporterscore.