#################### # open file with results from POCUS database, parse it, # and retrieve gene-name and score. #################### my @results=(); sub get_pocus { my @disease_name_pocus = @_; print "Getting the genes and rankings from the POCUS analysis for:\n"; print "$disease_name_pocus[0]\n"; open (POCUS, "/home/jeroen/POCUS/results_100.out") || die "couldn't open the file: $!\n"; while () { push @results, [ split ]; } open (MARKER, ">marker.list.txt") || die $!; for (my $i = 0; $i < scalar @results; $i++) { if ($results[$i]->[0] eq $disease_name_pocus[0]) { if ($results[$i]->[1] ne $results[($i+1)]->[1]){ print MARKER "$results[$i]->[1]\t$results[$i]->[4]\n"; } } } } close(MARKER);