in reply to Re^3: i need help to download text data from ensemble for a project
in thread i need help to download text data from ensemble for a project

This node falls below the community's threshold of quality. You may see it by logging in.
  • Comment on Re^4: i need help to download text data from ensemble for a project

Replies are listed 'Best First'.
Re^5: i need help to download text data from ensemble for a project
by Anonymous Monk on Feb 28, 2012 at 13:47 UTC

    Ok, so I go to http://www.ensembl.org/ to check the TOS and I see

    Fetch only the data you want from our public database, using the Perl API

    So here you go

    #!/usr/bin/perl -- use strict; use warnings; use autodie qw/ system /; my $ensemblUrl = '......r='; ## rearrange like this my $start_range = 4953971; my $end_range = 5753970; my $range_increment = $end_range - $start_range; for my $times ( 0 .. 10 ){ my $range = $start_range.'-'.$end_range; my $rangefile = "$range.txt"; system qw/ wget -c /, '-O', $rangefile, $ensemblUrl.$range ; $start_range = $end_range ; $end_range = $start_range + $range_increment; }

      Bah! Forget it! As Marshalls points out this would violate the TOS, and that is not nice. Don't use this code.