Dear all,
Sorry, this is still a mystery to me. Why do I have to use xml or whatever, but not just a simple script like one below:
It was discussed a few times, but why it should be so complicated?
#!/usr/bin/perl
use LWP::UserAgent;
my $ua = new LWP::UserAgent;
my $response = $ua->get('http://www.example.com/');
# my url has to be like:
# http://www.ncbi.nlm.nih.gov/protein/WP_005451061.1?report=fasta&log$=seqview&format=text
unless ($response->is_success) {
die $response->status_line;
}
my $content = $response->decoded_content();
if (utf8::is_utf8($content)) {
binmode STDOUT,':utf8';
} else {
binmode STDOUT,':raw';
}
print $content;
ref: http://www.microhowto.info/howto/fetch_the_content_of_a_given_url_in_perl_using_lwp_useragent.html
I have a lot of NCBI ids, like WP_005451061.1, many thousands.
I will have to find their respective UniProt ids, won't !?
http://www.ncbi.nlm.nih.gov/protein/WP_005451061.1?report=fasta&log$=seqview&format=text
Is it correct that there is no way to use the fasta-sequence encoded by the url above and I can reach it only manually? Thank you very much for your advice!
Sincerely yours,
Natalia
ncbi
protein