Skip to content

Commit

Permalink
check that RGP exists before getting its spot in --projection
Browse files Browse the repository at this point in the history
  • Loading branch information
axbazin committed Sep 3, 2023
1 parent 1c30f0f commit ac77094
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ppanggolin/formats/writeFlat.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,10 +592,10 @@ def write_org_file(org: Organism, output: str, compress: bool = False):
if gene.RGP is not None:
rgp = gene.RGP.name
row.append(rgp)
if needSpots:
if gene.RGP.spot is not None:
spot = gene.RGP.spot.ID
row.append(spot)
if needSpots:
if gene.RGP is not None and gene.RGP.spot is not None:
spot = gene.RGP.spot.ID
row.append(spot)
if needModules:
if len(gene.family.modules) > 0:
modules = ','.join(["module_" + str(module.ID) for module in gene.family.modules])
Expand Down

0 comments on commit ac77094

Please sign in to comment.