Skip to content

Update feature_tools.py#240

Open
dosumis wants to merge 21 commits into
masterfrom
genotypes
Open

Update feature_tools.py#240
dosumis wants to merge 21 commits into
masterfrom
genotypes

Conversation

@dosumis

@dosumis dosumis commented Jul 26, 2021

Copy link
Copy Markdown
Member

No description provided.

@dosumis dosumis marked this pull request as draft July 26, 2021 11:06

@dosumis dosumis left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested - see comments.

self.ew.commit()
return out

def add_genotype(self, genotype, add_feats=True, add_feature_details=False, commit=False):

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename arg to genotype_components


if commit:
self.ni.commit()
self.ew.commit()

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If either commit returns false, function returns false. Else return new ID.

@dosumis dosumis left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding test to see if this already exists.

genotype_name = ', '.join(feat_names)

# synonym (FlyBase IDs)
feat_IDs = [n.short_form for n in feats.values()] # list of FB IDs of features in genotype

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sort IDs.

# iri['iri'] is long form, iri['short_form'] is short form

# label
feat_names = [n.label for n in feats.values()] # list of labels of features in genotype

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sort alphanumerically

@Clare72

Clare72 commented Jan 20, 2022

Copy link
Copy Markdown
Contributor

related to #239

@Clare72 Clare72 marked this pull request as ready for review August 29, 2023 14:50
@Clare72

Clare72 commented Sep 1, 2023

Copy link
Copy Markdown
Contributor

Genotype addition/editing is working with features already in the kb.
Can't properly test adding new features as the csv generated by commit_via_csv isn't found by commit_csv (but it is generated, so I guess it would work).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants