Skip to content

Commit

Permalink
Merge pull request #14 from jkobject/recordlist
Browse files Browse the repository at this point in the history
Fix type check for organism
  • Loading branch information
jkobject authored Jan 9, 2025
2 parents 02347ea + 99718ca commit 39af532
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scdataloader/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,9 +611,9 @@ def populate_my_ontology(
)
source = bt.PublicSource.filter(name="ensembl", organism=organism_clade).last()
records = [
i[0] if type(i) is list else i
for i in [
bt.Organism.from_source(ontology_id=i, source=source) for i in names
organism_or_organismlist if isinstance(organism_or_organismlist, bt.Organism) else organism_or_organismlist[0]
for organism_or_organismlist in [
bt.Organism.from_source(ontology_id=name, source=source) for name in names
]
]
ln.save(records)
Expand Down

0 comments on commit 39af532

Please sign in to comment.