473,406 Members | 2,633 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

problem with get method

89
Hi
I am using the following script to extract the data from NCBI database. I have a set of EST ids in a word document and I am extracting the data using the following code.

Expand|Select|Wrap|Line Numbers
  1. #!usr/bin/perl -w
  2. use LWP::Simple;
  3.  
  4. my $url = 'http://www.ncbi.nlm.nih.gov/sites/entrez?db=nucest&cmd=search&term=';
  5.  
  6. while(<>) {
  7.     chomp $_;
  8.     @v = split(/\t/,$_);
  9.     $id = $v[0]; #EST id
  10.     $myURL = $url.$id;
  11.     $record = get($myURL);
  12.     print $record;
  13.  
  14. }
  15.  
perl extract.pl estid.txt >> extracteddata.txt
I am able to exract the data using the above code. The problem is for example if I have 5 ids in estid.txt, then every time I run the above command the downloaded data differs and for example sometimes it downloads 5 set of data and sometimes 4 set of data... Why is it varying and what could be the problem and how to resolve it as I can not afford to miss any data. All ids are valid. Thanks.
Feb 24 '09 #1
2 1777
KevinADC
4,059 Expert 2GB
We can not help with data retrieval problems. I suggest you switch to LWP::UserAgent and LWP::Debug:

use LWP::UserAgent;
use LWP::Debug qw(+);

And see if debug reports anything that might help you determine the problem. You will need to read the documentation for both modules. And in the future please reply to your threads when people help you with your question(s):

http://bytes.com/topic/perl/answers/864111-perl-regex

Might not be a problem with others but when I take the time to help someone I do expect that person to acknowledge the help I gave them, barring unforseen circumstances of course.
Feb 24 '09 #2
lilly07
89
Thanks for your suggestions Kevin.

Sorry Kevin as I didn't respond to your response for the thread you had mentioned and I take this opportunity to thank everyone in this forum which is of great help for us to learn new techniques everyday as a new self learner. As I got diverted into some other problem, it just slipped out of my mind and I will make sure that it doesnot happen next time. Thanks again for your time and help.
Regards
Feb 25 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

16
by: cody | last post by:
I have to write an algorithm with must ensure that objects are put in buckets (which are always 4 in size). The objects have two properties: A and B. It is not allowed that in a bucket are objects...
4
by: Leslaw Bieniasz | last post by:
Cracow, 20.09.2004 Hello, I need to implement a library containing a hierarchy of classes together with some binary operations on objects. To fix attention, let me assume that it is a...
28
by: Jon Davis | last post by:
If I have a class with a virtual method, and a child class that overrides the virtual method, and then I create an instance of the child class AS A base class... BaseClass bc = new ChildClass();...
0
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not conform to any standard style of coding I have seen....
6
by: Ammar | last post by:
Dear All, I'm facing a small problem. I have a portal web site, that contains articles, for each article, the end user can send a comment about the article. The problem is: I the comment length...
16
by: Dany | last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by...
6
by: TPJ | last post by:
Help me please, because I really don't get it. I think it's some stupid mistake I make, but I just can't find it. I have been thinking about it for three days so far and I still haven't found any...
10
by: Markus Svilans | last post by:
Hi, I have a weird problem in a virtual method. The original method code raises an access violation when it is run. The solution to the problem is to declare a dummy integer inside the virtual...
4
by: amidzic.branko | last post by:
I'm trying to solve a problem using inheritance and polymorphism in python 2.4.2 I think it's easier to explain the problem using simple example: class shortList:
7
xNephilimx
by: xNephilimx | last post by:
lHi guys! I'm having a little problem that's getting on my nerves, I couldn't find a solution, I also tryed googling it and I found nothing... (my field of expertise is in AS 2 and 3, but I still...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.