in reply to Re^2: (Failing) script to return an official ID
in thread (Failing) script to return an official ID

The code I posted, as I mentioned, was not a complete solution. The code assumed that every line in the genes file would have at least 3 columns and that every line in the hugo file would have at least 9 columns, since this is what your dummy input sample files had.

If your actual files have fewer columns, then you might get those warnings.

If your actual files have blank lines, then you might get those warnings.

It is impossible for me to know the structure of your input files without seeing more (small) examples. My guess is that you now need to check the format of your input. For example, you could check how many columns are in each line of the genes file by checking how many elements are in the array:

my $cols = scalar @genes;

Are you sure the code is looping infinitely? I could believe that the code would take a long time to run if your input files are really big (1 million lines, many columns per line).

Replies are listed 'Best First'.
Re^4: (Failing) script to return an official ID
by Anonymous Monk on Apr 13, 2008 at 18:07 UTC
    Yes, my dummy files were very simplified. Some lines may not have any alises at all, it ranges from between 0-35. That must be the problem.

    Not I'm not sure the code loops infinitely, I stopped after many -many lines!

    Thanks again.