Fixing OG seqid-splitting error in 3_AssignOGs.py

This commit is contained in:
Auden Cote-L'Heureux 2024-05-02 14:17:45 -04:00 committed by GitHub
parent 4b934763da
commit 2b34d542a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -246,7 +246,7 @@ def update_fasta(args):
for line in keep:
try:
og_number = re.split('OG.{1}_', line.split('\t')[1])[1][:6]
og_prefix = line.split('\t')[1].split(og_number)[-1][-4:]
og_prefix = line.split('\t')[1].split(og_number)[-2][-4:]
og = og_prefix + og_number
keep_dict.update({ re.split('_OG.{1}_', line.split('\t')[0])[0] : re.split('_OG.{1}_', line.split('\t')[0])[0] + '_' + og_prefix + line.split('\t')[1].split('_')[-1] })