Skip to content

Commit

Permalink
update docs, rework GUI, update logo
Browse files Browse the repository at this point in the history
  • Loading branch information
Bribak committed Feb 17, 2025
1 parent d1ff321 commit 77bbfa3
Show file tree
Hide file tree
Showing 15 changed files with 41,803 additions and 42,520 deletions.
192 changes: 96 additions & 96 deletions 00_core.ipynb

Large diffs are not rendered by default.

33,786 changes: 16,889 additions & 16,897 deletions 01_glycan_data.ipynb

Large diffs are not rendered by default.

1,482 changes: 843 additions & 639 deletions 02_ml.ipynb

Large diffs are not rendered by default.

10,123 changes: 5,106 additions & 5,017 deletions 03_motif.ipynb

Large diffs are not rendered by default.

1,250 changes: 584 additions & 666 deletions 04_network.ipynb

Large diffs are not rendered by default.

35,264 changes: 17,548 additions & 17,716 deletions 05_examples.ipynb

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Added setuptools to required_installs to support pip installation beyond `pip 25.0` (94646ad)
- Added pyproject.toml to support pip installation beyond `pip 25.0` (94646ad)
- Added CITATION.bib to allow for even easier citation of glycowork (a64f694)
- Reworked user interface of the `glycoworkGUI`

### Changed 🔄
- Bumped minimum supported Python version to 3.9 (3.8 is no longer supported, see https://devguide.python.org/versions/) (4960c5c)
Expand Down Expand Up @@ -99,7 +100,7 @@
- Supported triple-branch reordering in `find_isomorphs` and `choose_correct_isoform` (918d18f)
- Improved `find_isomorphs` to swap neighboring branches with different levels of nesting (41bb1a1, 034b6ad)
- `choose_correct_isoform` can now also be used with a single glycan sequence, in which case it internally calls `find_isomorphs` to generate material for choosing (918d18f)
- `choose_correct_isoform` can now correctly handle more complex sequences than before (41bb1a1, 034b6ad)
- `choose_correct_isoform` can now correctly handle more complex sequences than before (41bb1a1, 034b6ad, d1ff321)
- `canonicalize_iupac` now can handle modifications such as Neu5,9Ac2 / Neu4,5Ac2 or multiple ones like in (6S)(4S)Gal, even if in the wrong order (034b6ad)
- `canonicalize_iupac` now can handle even more typos (e.g., 'aa1-3' in specifying a linkage) (a64f694, 241141b)
- `canonicalize_iupac` now can handle even more inconsistencies (e.g., mix of short-hand and expanded linkages)
Expand Down Expand Up @@ -220,7 +221,7 @@

#### models
##### Changed 🔄
- In `prep_model`, the `hidden_dim` argument can now also be used to modify the protein embedding size of a newly defined LectinOracle model
- In `prep_model`, the `hidden_dim` argument can now also be used to modify the protein embedding size of a newly defined LectinOracle model (d1ff321)

### network
#### evolution
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## How to get started

Before anything else, please install the git hooks that run automatic scripts during each commit and merge to strip the notebooks of superfluous metadata (and avoid merge conflicts). After cloning the repository, run the following command inside it:
Before anything else, please install `nbdev2` and install the git hooks that run automatic scripts during each commit and merge to strip the notebooks of superfluous metadata (and avoid merge conflicts). After cloning the repository, run the following command inside it:
```
nbdev_install_hooks
```
Expand All @@ -21,7 +21,7 @@ nbdev_install_hooks

## PR submission guidelines

* Before submitting a PR, run these commands locally, that will run all tests and return any errors that may have occurred:
* Before submitting a PR, run these commands locally (note that you will have to have `glycowork[all]` installed, to cover all tests), that will run all tests and return any errors that may have occurred:

```
nbdev_prepare
Expand Down
40 changes: 21 additions & 19 deletions README.md

Large diffs are not rendered by default.

585 changes: 440 additions & 145 deletions bin/glycoworkGUI.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion glycowork/ml/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def prep_model(model_type: Literal["SweetNet", "LectinOracle", "LectinOracle_fle
model.load_state_dict(torch.load("SweetNet_v1_4.pt", map_location = device, weights_only = True))
model = model.to(device)
elif model_type == 'LectinOracle':
model = LectinOracle(len(libr), num_classes = num_classes, input_size_prot = 10*hidden_dim)
model = LectinOracle(len(libr), num_classes = num_classes, input_size_prot = int(10*hidden_dim))
model = model.apply(lambda module: init_weights(module, mode = 'xavier'))
if trained:
if not Path("LectinOracle_v1_4.pt").exists():
Expand Down
4 changes: 2 additions & 2 deletions glycowork/motif/processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from collections import defaultdict
from itertools import permutations, combinations
from typing import Dict, List, Set, Union, Optional, Callable, Tuple, Generator
from glycowork.glycan_data.loader import (unwrap, multireplace, count_nested_brackets,
from glycowork.glycan_data.loader import (unwrap, multireplace,
find_nth, find_nth_reverse, lib, HexOS, HexNAcOS,
linkages, Hex, HexNAc, dHex, Sia, HexA, Pen)

Expand Down Expand Up @@ -293,7 +293,7 @@ def kill_noncanonical(glycans):
if current_count > paren_counts[-2]: # Compare with parent branch
kill_list.add(g)
current_count = paren_counts[-2] # Return to parent branch's count
paren_counts.pop() # Remove current branch level
paren_counts.pop() # Remove current branch level
return [g for g in glycans if g not in kill_list]

# Handle neighboring branches
Expand Down
Binary file modified glycowork_badge_wo_bg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,424 changes: 187 additions & 1,237 deletions index.ipynb

Large diffs are not rendered by default.

162 changes: 81 additions & 81 deletions index_files/figure-commonmark/cell-3-output-1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 77bbfa3

Please sign in to comment.