aa position table - #18
Conversation
Summary of ChangesHello @Alex-Davydov, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request delivers a new capability to export Kabat CDR3 amino acid positions, providing more detailed data for specific analysis needs. This feature is seamlessly integrated into the existing workflow and user interface. Concurrently, the project's dependencies have undergone a significant update to ensure stability, performance, and compatibility with the latest ecosystem standards. Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new feature to export a table of amino acid positions for Kabat CDR3. The changes span across the model, UI, a Python script, and workflow templates to support this new functionality. The implementation is mostly correct, but I've found a critical bug in the main workflow that prevents the new export from being generated, as well as a leftover debug statement. I've also included a suggestion to improve code style in one of the workflow templates for better readability.
| if cdr3PositionsPf != undefined { | ||
| exports.kabatCdr3AaPositions = cdr3PositionsPf | ||
| } |
There was a problem hiding this comment.
The variable cdr3PositionsPf is used here but it's never assigned a value, so this block will never execute and the kabatCdr3AaPositions export will be missing.
To fix this, you should create a pframe from cdr3PositionsRaw and assign it to cdr3PositionsPf after cdr3PositionsRaw is created, for example on line 1073:
cdr3PositionsPf = pframes.fromSpecAndDataMap(cdr3PositionsRaw)
| numberingExec = numberingExec.arg("--out_tsv").arg("numbered.tsv").saveFile("numbered.tsv") | ||
| if exportCdr3Positions { | ||
| numberingExec = numberingExec. | ||
| arg("--out_cdr3_positions_tsv").arg("cdr3_positions.tsv"). | ||
| saveFile("cdr3_positions.tsv") | ||
| } | ||
| numberingExec = numberingExec. | ||
| arg("--out_tsv").arg("numbered.tsv"). | ||
| saveFile("numbered.tsv"). | ||
| printErrStreamToStdout(). | ||
| cache(24 * 60 * 60 * 1000). | ||
| run() |
There was a problem hiding this comment.
For better readability and to maintain a fluent interface style, you could restructure this part to keep the command-building chain more contiguous. This also makes it easier to add more conditional arguments in the future.
if exportCdr3Positions {
numberingExec = numberingExec.
arg("--out_cdr3_positions_tsv", "cdr3_positions.tsv").
saveFile("cdr3_positions.tsv")
}
numberingExec = numberingExec.
arg("--out_tsv", "numbered.tsv").
saveFile("numbered.tsv").
printErrStreamToStdout().
cache(24 * 60 * 60 * 1000).
run()
| }, | ||
| domain: json.decode(canonical.encode(clonotypeKeyDomain)) | ||
| } | ||
| ll.print("__THE_LOG__ newClonotypeKeySpec: " + json.encode(newClonotypeKeySpec)) |
No description provided.