problem with get method

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lilly07
    New Member
    • Jul 2008
    • 89

    problem with get method

    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.

    Code:
    #!usr/bin/perl -w
    use LWP::Simple;
    
    my $url = 'http://www.ncbi.nlm.nih.gov/sites/entrez?db=nucest&cmd=search&term=';
    
    while(<>) {
    	chomp $_;
    	@v = split(/\t/,$_);
    	$id = $v[0]; #EST id
    	$myURL = $url.$id;
    	$record = get($myURL);
    	print $record;
    
    }
    perl extract.pl estid.txt >> extracteddata.t xt
    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.
  • KevinADC
    Recognized Expert Specialist
    • Jan 2007
    • 4092

    #2
    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):



    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.

    Comment

    • lilly07
      New Member
      • Jul 2008
      • 89

      #3
      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

      Comment

      Working...