use LWP::Simple;
use HTML::Parser;
my $query = shift(@ARGV);
#print "$query\n";
die "waste fellow dnt know hw to write a program" unless (open(OUT,">test12.txt"));
$content = get("http://amigo.geneontology.org/cgi-bin/amigo/search.cgi?query=$query;search_constraint=gp;action=query;view=query/");
die "Couldnt get the website!" unless defined $content;
print OUT "$content";
close (OUT);
print "At the whileloop";
open (IN, "/home/vivek/Desktop/test12.txt");
while(my $line = )
{
chomp $line;
$line =~ s/^[\s\t]+|[\s\t]+$//;
#$string = "GO:";
if ($line =~ s/(.+)(term\=GO\:)(\d+)(\"\>.+)/$1$2$3$4/g)
{
print $1;
$page = get("http://amigo.geneontology.org/cgi-bin/amigo/term-details.cgi?term=GO:$3");
HTML::Parser->new(text_h => [\my @accum, "text"])->parse($page);
print map $_->[0], @accum;
#print $page;
}
}
close(IN);
####
ATP binding
Term Information
- Accession
- GO:0005524
- Ontology
- molecular function
- Synonyms