Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/circular window #33

Merged
merged 17 commits into from
Jan 10, 2024
Merged

Feature/circular window #33

merged 17 commits into from
Jan 10, 2024

Conversation

bkm
Copy link
Contributor

@bkm bkm commented Jan 9, 2024

  • import the files of metagenlab_lib code into zdb (in webapp.lib, the zdb folder was not intended to contain code)
  • add support for circular contigs in the genomic region viewer
  • several bugfixes introduced in format_pathway and format_module

@bkm bkm requested review from njohner and tpillone January 9, 2024 11:38
Copy link
Contributor

@njohner njohner left a comment

Choose a reason for hiding this comment

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

LGTM, just a few remarks:

I've made these changes locally and could commit and push them to your branch if you want.

Also what is the plan on the metagenlab_libs side? Are we deleting from that repo the code we moved over?

And last thing. I get a whole bunch of warnings from pandas of the form

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  df_seqids_circled.start_pos -= diff
/home/njohner/bin/zDB/webapp/chlamdb/views.py:1787: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

We should probably have a look.

Ah and we should discuss PEP8 😅 . I'll run another round of auto-PEP8 anyway, as the code from metagenlab_libs is not conform at all. But starting from then, I'd find it nice if new code that comes in conforms to the standards. It's pretty easy, you just need to install some plugin for whatever editor you use that will tell you if it's not.

webapp/chlamdb/views.py Outdated Show resolved Hide resolved
webapp/chlamdb/views.py Outdated Show resolved Hide resolved
webapp/chlamdb/views.py Outdated Show resolved Hide resolved
webapp/chlamdb/views.py Outdated Show resolved Hide resolved
@bkm
Copy link
Contributor Author

bkm commented Jan 9, 2024

I think I adressed most issues. Maybe have a look at the final diff : some issues you raised were already solved. Thanks for the remark about PEP8, I'll find a vim plugin.

I used the git merge command. And indeed, the commits were a bit hard to follow, sorry about that. I need to get used to working with several people on the same project again.

About metagenlab_libs, we need to check with Trestan. As for now, the repo is not needed for zdb anymore, so we could indeed delete the legacy code.

As for the warnings, I did not have time to look into them yet. I'll do that the upcoming days.

bkm added 2 commits January 9, 2024 19:46
Had to uptade the code to reflect the changes in db_utils
@njohner
Copy link
Contributor

njohner commented Jan 10, 2024

Yes I saw that some remarks were for outdated code. I got used to reviewing on a per commit basis, but that only makes sense on a clean history. I didn't really want to look at the whole diff, because of the merge commits and because of moving the metagenlab_libs over.
So anyway, feel free to merge, as it's a rather big PR, merging it rapidly will avoid too much rebase mess...

@bkm bkm merged commit a037015 into master Jan 10, 2024
@bkm bkm deleted the feature/circular_window branch January 10, 2024 09:02
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.

2 participants