Skip to content

Commit

Permalink
added ploidy to catalog; closes popsim-consortium#1449
Browse files Browse the repository at this point in the history
  • Loading branch information
petrelharp committed Aug 14, 2024
1 parent e628ad0 commit cb7d71c
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions docs/_ext/speciescatalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def species_summary(self, species):
if stdpopsim.CiteReason.GEN_TIME in citation.reasons
],
),
("Ploidy", species.ploidy, None),
(
"Population size",
species.population_size,
Expand Down Expand Up @@ -296,8 +297,8 @@ def genetic_maps_table(self, species):
def chromosomes_table(self, species):

table = nodes.table()
tgroup = nodes.tgroup(cols=4)
for _ in range(4):
tgroup = nodes.tgroup(cols=5)
for _ in range(5):
colspec = nodes.colspec(colwidth=1)
tgroup.append(colspec)
table += tgroup
Expand All @@ -309,6 +310,10 @@ def chromosomes_table(self, species):
entry += nodes.paragraph(text="ID")
row += entry

entry = nodes.entry()
entry += nodes.paragraph(text="Ploidy")
row += entry

entry = nodes.entry()
entry += nodes.paragraph(text="Length")
row += entry
Expand All @@ -330,6 +335,10 @@ def chromosomes_table(self, species):
entry += nodes.paragraph(text=chrom.id)
row += entry

entry = nodes.entry()
entry += nodes.paragraph(text="{:d}".format(chrom.ploidy))
row += entry

entry = nodes.entry()
entry += nodes.paragraph(text="{:d}".format(chrom.length))
row += entry
Expand Down

0 comments on commit cb7d71c

Please sign in to comment.