Skip to content

Commit

Permalink
ensure circularity info is keep in all situation
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanMainguy committed Nov 18, 2024
1 parent 0e1a143 commit 361db0c
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions ppanggolin/annotate/annotate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1034,15 +1034,22 @@ def check_chevrons_in_start_and_stop(
dbxref_metadata
)

if contig is not None and (
if (
"IS_CIRCULAR" in attributes
and attributes["IS_CIRCULAR"] == "true"
):
logging.getLogger("PPanGGOLiN").debug(
f"Contig {contig.name} is circular."
)
contig.is_circular = True
assert contig.name == fields_gff[gff_seqname]
contig_name = fields_gff[gff_seqname]

if contig is not None:
logging.getLogger("PPanGGOLiN").debug(
f"Contig {contig.name} is circular."
)
contig.is_circular = True
assert contig.name == contig_name
else:
# contig object has not been initialized yet.
# let's keep the circularity info in the circular_contigs list
circular_contigs.append(contig_name)

elif fields_gff[gff_type] == "CDS" or "RNA" in fields_gff[gff_type]:

Expand Down

0 comments on commit 361db0c

Please sign in to comment.