Skip to content

Commit

Permalink
try again to fix/ignore bad records in compare
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Palmer committed Apr 11, 2023
1 parent ce48682 commit 2894cc1
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions funannotate/compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -1540,10 +1540,13 @@ def addlink2(x):
df = pd.read_csv(orthologs, sep="\t", header=None)
orthtable = []
for row in df.itertuples():
if ", " in row[3]:
t = row[3].split(", ") # convert Eggnog to list
if isinstance(row[3], str):
if ", " in row[3]:
t = row[3].split(", ") # convert Eggnog to list
else:
t = [row[3]]
else:
t = [row[3]]
t = ["None"]
if t[0] == "None":
t = ["None"]
else:
Expand All @@ -1552,10 +1555,13 @@ def addlink2(x):
value = "; ".join(t)
except TypeError:
value = "None found"
if ", " in row[4]:
r = row[4].split(", ") # convert BUSCO to list
if isinstance(row[3], str):
if ", " in row[4]:
r = row[4].split(", ") # convert BUSCO to list
else:
r = [row[4]]
else:
r = [row[4]]
r = ["None"]
if r[0] == "None":
r = ["None"]
else:
Expand Down

0 comments on commit 2894cc1

Please sign in to comment.