Skip to content

Commit

Permalink
Some genomes don't have organelles
Browse files Browse the repository at this point in the history
  • Loading branch information
muffato committed Jun 4, 2024
1 parent fa18dcc commit dc0a3c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/generate_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ def get_assembly_info(accession: str) -> typing.Dict[str, typing.Union[str, int]
"bioproject": assembly_info["bioproject_accession"],
"level": assembly_info["assembly_level"].lower(),
"scaffold-count": assembly_report["assembly_stats"]["number_of_component_sequences"]
+ assembly_report["assembly_stats"]["number_of_organelles"],
+ assembly_report["assembly_stats"].get("number_of_organelles", 0),
"span": int(assembly_report["assembly_stats"]["total_sequence_length"])
+ sum(int(oi["total_seq_length"]) for oi in assembly_report["organelle_info"]),
+ sum(int(oi["total_seq_length"]) for oi in assembly_report.get("organelle_info", [])),
}
if "biosample" in assembly_info:
d["biosample"] = assembly_info["biosample"]["accession"]
Expand Down

0 comments on commit dc0a3c6

Please sign in to comment.