7
D-Horse • 110 wrote:
Hi, I think you could use the APIs in KEGG.For example to get the total numbers of genes in hsa00010.The code is written in Perl:
#!/usr/bin/env perl
use SOAP::Lite +trace => [qw(debug)];
my $serv = SOAP::Lite -> service("http://soap.genome.jp/KEGG.wsdl");
my $result = $serv->get_genes_by_pathway('path:hsa00010');
my $count = 0;
foreach (@{$result}){
print $_,"\n";
$count += 1;
}
print $count,"\n";
The answer is 65.
5
Prakki Rama • 2.4k wrote:
KEGG now operates with REST instead of SOAP. Could be done in a feasible way. But I did this:
wget -O http://rest.kegg.jp/link/pathway/hsa >HSA.txt ##Saving the file
cut -d " " -f 2 HSA.txt | cut -d ":" -f 2 | sort -u | wc -l ## counting the pathways in Human
283 (pathways in Human in KEGG at present)
~Prakki Datta
3
Joachim • 2.9k wrote:
Yes, this is the correct number of pathways for human in KEGG and it is also the right way to find them.
Many thanks. I've a further question: for a particular pathway like http://www.genome.jp/dbget-bin/www_bget?pathway+hsa00010, I wish to get the total no. of genes involved in that pathway. Is there an easy way to find it? Thanks in advance.
1
wchknudt • 50 wrote:
You are correct. The answer now is 260.
You can also use perl script to do this:
#!/usr/bin/env perl
use SOAP::Lite;
$wsdl = 'http://soap.genome.jp/KEGG.wsdl';
$results = SOAP::Lite
-> service($wsdl)
-> list_pathways("hsa");
my $file_name = "kegg_hsa_pathways.txt";
if (open (OUTFILE, '>'.$file_name))
{
foreach $path (@{$results}) {
print OUTFILE "$path->{entry_id}\t$path->{definition}\n";
}
close(OUTFILE);
print "Content writtent to $file_name!"
}
else{
die "Error: Error occur in writing to file\n";
}
0
Please log in to add an answer.
Use of this site constitutes acceptance of our User
Agreement
and Privacy
Policy.
Powered by Biostar
version 2.3.0
Traffic: 1595 users visited in the last hour