Help for this page

Select Code to Download


  1. or download this
     while (<FILE>){
        my @line = split (/\t/,$_); ## tab separated file
        my @tmp = split(/\./,$line[1]); ## chromosome name in field 2, as 
    +part of a dot separated string
        $chr{"$tmp[1]"} =  new Set::IntervalTree() unless (defined $chr{"$
    +tmp[1]"});
        $chr{"$tmp[1]"} -> insert($count,$line[2]-1,$line[3]+1); ## fields
    + 3 and 4 contain the coordinates, -1 and +1 to allow search for direc
    +t overlaps at start and end
    }
    
  2. or download this
    store (\%chr, "$file.coordinates") or die "Can't store %chr in file.co
    +ordinates!\n";
    
  3. or download this
        my $hashref;
        %chr = %{$hashref = retrieve("$file.coordinates")};