#!/usr/bin/perl -w

use strict;

my $entrada;

open(GO,"< tablaseleccionados.txt") or die "tablaseleccionados.txt no existe\n";

while ($entrada = <GO>){
    chomp($entrada);

    my($go, @fb)= split("\t", $entrada);

    my $num_genes = scalar (@fb);

   $go =~ s/:/_/;

    open(MULTIPLES, "> sets/$go") or die "No se puede crear sets/$go\n";
    
    foreach my $fbgns (@fb){
	print MULTIPLES "$fbgns\n";
    }
    close (MULTIPLES);
}

close (GO);

