Dear Elisabeth:
You are a savior!! Yes; I'm pouring over that e-mail too. Insanely informative.
This script worked for a small subset. For some reason, if I have a file that has > 40,000 blastx Identifiers, it kicks back this error:
Failed, got 500 Server closed connection without sending any data back for http://www.uniprot.org/uploadlists/
So, I have to split my $list input file that I am putting into this script into chunks of ~20k identifiers. No problem, but in order to avoid writing a script for each file name (and getting carpal tunnel after a week bc I will have to write > 2,000 file names into the my $list = line) I have dedicated my day to figuring out a way to have this script read all of the split files at once (kept in 1 directory) and naming them differently once its done finding the KOs. Something like spl_1KO.txt; spl_2KO.txt (so I can cat them all later by name and have one complete set for that sample).
I have found numerous websites on looping perl scripts, and have imagined how far this computer can be thrown out the window today by trying multiple subsets of these functions:
for f in file_*.txt; do script.pl "$f" > "${f/file_/output_}";
my @files = <*.txt>; for $file (@files) {
but each of these return word salads or errors or it runs indefinitely. I know in my infinite naive-ness of perl, I cannot figure out how to do this. Any help in this dark rabbit hole of a paradox I'm in would be super duper awesome!!
Sincerely, Joany
UniProt provides ID mappings in a single text file (you can download it from here: ftp://ftp.uniprot.org/pub/databases/uniprot/current_release/knowledgebase/idmapping/).