Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
2a30479
first steps for glycan rendering
douweschulte Feb 18, 2025
7c763d0
Added actual structure rendering
douweschulte Feb 18, 2025
519f4f2
formatted
douweschulte Feb 18, 2025
615dd7d
removed trailing whitespace
douweschulte Feb 18, 2025
068b127
Remove test html file
douweschulte Feb 18, 2025
6f2e82b
Point fucoses correctly and added more render tests
douweschulte Feb 19, 2025
eb63cef
Small visual fixes and started on fragments rendering
douweschulte Feb 20, 2025
138041e
Fixes in the detected shape & colour and allowed control over the col…
douweschulte Feb 21, 2025
3b267a4
Finishesed rendering fragment symbols
douweschulte Feb 21, 2025
07d3504
Store more isomeric information for glycans to allow more precise ren…
douweschulte Feb 24, 2025
f257e32
Built footnotes and added more info in SVG
douweschulte Feb 24, 2025
7543133
Updated databases for failing tests
douweschulte Feb 24, 2025
90c2437
Fixed width of fragment images
douweschulte Feb 25, 2025
6eaaa17
Better root text alignment and removed debug output
douweschulte Feb 25, 2025
d5abe7d
Updated text positioning system
douweschulte Feb 26, 2025
e2f6d28
Organised code a bit better
douweschulte Feb 26, 2025
8887fd9
Allow left to right rendering
douweschulte Feb 26, 2025
fa20282
fmt
douweschulte Feb 26, 2025
de1383a
Split up the big file and restructured to allow bitmap rendering in t…
douweschulte Feb 27, 2025
ef08670
Start on rendering to bitmaps
douweschulte Feb 28, 2025
28a6fc9
Mostly worked out all issues in butmap rendering
douweschulte Mar 3, 2025
0560c58
Allow full peptide symbol and cleaned up code
douweschulte Mar 4, 2025
46b2f9e
Small issues found when using the api
douweschulte Mar 4, 2025
e3a2efc
Added GlycanRoot::Line and expanded documentation
douweschulte Mar 5, 2025
acf9714
Fix test
douweschulte Mar 5, 2025
e03490c
Update fragments to make it easier to render glycan fragments + fixed…
douweschulte Mar 6, 2025
8483b3d
Updated glycans to keep track of branch index and branch mass index p…
douweschulte Mar 7, 2025
5aa02a6
Fixes some small bugs in rendering
douweschulte Mar 12, 2025
60c7161
Fixed failing doctest
douweschulte Mar 12, 2025
3921971
Feature gated glycan rendering and optimised feature usage of some de…
douweschulte Mar 12, 2025
394856f
Updated code based on review
douweschulte Mar 17, 2025
07ddc5c
Fixed last code review comments
douweschulte Mar 24, 2025
bfd7e63
Keep theoretical fragments sorted on crude likelihood
douweschulte Mar 24, 2025
3cfbe5b
Merge branch 'main' into glycan-rendering
douweschulte Mar 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
cargo build -p rustyms --no-default-features --features rand
cargo build -p rustyms --no-default-features --features rayon
cargo build -p rustyms --no-default-features --features mzdata
cargo build -p rustyms --no-default-features --features glycan-render
cargo build -p rustyms --no-default-features --features glycan-render-bitmap

fmt:
runs-on: ubuntu-latest
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/scripts/update-all-databases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,9 @@ function make-ontologies {
curl https://raw.githubusercontent.com/HUPO-PSI/mzIdentML/master/cv/XLMOD.obo \
> ${db_data}/XLMOD.obo
curl -L http://purl.obolibrary.org/obo/gno.obo \
| sed '/(property_value: GNO:00000(022|023|041|042|101|102) .*$\n)|(def: .*$\n)/d' \
| gzip -c \
> ${db_data}/GNOme.obo.gz
> ${db_data}/GNOme.obo
curl -L https://glycosmos.org/download/glycosmos_glycans_list.csv \
| gzip -c > ${db_data}/glycosmos_glycans_list.csv.gz
> ${db_data}/glycosmos_glycans_list.csv


echo "Serializing the other databases..."
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Cargo.lock
errors.dat
*.dat.Z
*.dat
*.html
GNOme.obo
glycosmos_glycans_list.csv
.venv/
Expand Down
8 changes: 6 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,17 @@ codegen-units = 1

[workspace.dependencies]
afl = "0.15"
base64 = "0.22"
bincode = "1.3"
clap = { version = "4.5", features = ["derive", "cargo"] }
directories = "6.0"
flate2 = "1.0"
iai-callgrind = "0.14"
itertools = "0.14"
mzdata = "0.44"
mzdata = {version="0.48", default-features = false, features = ["miniz_oxide"]}
ndarray = "0.16"
ordered-float = { version = "4.6", features = ["serde"] }
png = "0.17"
probability = "0.20"
pyo3 = "0.23"
rand = "0.9"
Expand All @@ -45,8 +47,10 @@ roxmltree = "0.20"
serde = { version = "1.0", features = ["derive", "rc"] }
serde_json = "1.0"
similar = "2.7"
swash = "0.2"
thin-vec = { version = "0.2", features = ["serde"] }
uom = { version = "0.36", features = ["use_serde", "usize", "isize"] }
uom = { version = "0.36", default-features = false, features = ["use_serde", "usize", "isize", "f64"] }
zeno = {version = "0.3.2" }

[workspace.lints.rust]
unexpected_cfgs = { level = "allow", check-cfg = [
Expand Down
2 changes: 1 addition & 1 deletion examples/de-novo-align/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license.workspace = true
publish = false

[dependencies]
rustyms = { path = "../../rustyms" }
rustyms = { path = "../../rustyms", default-features=false, features = ["align", "identification"] }
clap = { workspace = true }
itertools = { workspace = true }
rayon = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions rustyms-generate-databases/src/gnome.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ impl std::str::FromStr for GnoSubsumption {
}

fn parse_gnome() -> HashMap<String, GNOmeModification> {
let obo = OboOntology::from_file("rustyms-generate-databases/data/GNOme.obo.gz")
let obo = OboOntology::from_file("rustyms-generate-databases/data/GNOme.obo")
.expect("Not a valid obo file");
let mut mods = HashMap::new();

Expand Down Expand Up @@ -221,7 +221,7 @@ fn parse_gnome_structures() -> HashMap<String, GlycosmosList> {
let mut glycans = HashMap::new();
let mut errors = 0;
for line in parse_csv(
"rustyms-generate-databases/data/glycosmos_glycans_list.csv.gz",
"rustyms-generate-databases/data/glycosmos_glycans_list.csv",
b',',
None,
)
Expand Down
10 changes: 9 additions & 1 deletion rustyms/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ repository = "https://github.com/snijderlab/rustyms"
readme = "README.md"
include = [
"src/**/*",
"databases/**/*.gz",
"README.md",
"build.rs",
"benches/**/*",
Expand All @@ -32,12 +31,17 @@ rayon = { workspace = true, optional = true }
regex = { workspace = true }
serde = { workspace = true }
similar = { workspace = true }
swash = {workspace = true, optional = true}
thin-vec = { workspace = true }
uom = { workspace = true }
zeno = { workspace = true, optional = true }

[dev-dependencies]
base64 = { workspace = true }
iai-callgrind = { workspace = true }
png = { workspace = true }
serde_json = { workspace = true }
directories = {workspace = true}

[features]
default = [
Expand All @@ -48,11 +52,15 @@ default = [
"isotopes",
"rand",
"mzdata",
"glycan-render",
"glycan-render-bitmap",
]
imgt = []
align = []
identification = []
isotopes = ["probability", "ndarray"]
glycan-render = []
glycan-render-bitmap = ["zeno", "swash", "glycan-render"]

[[bench]]
name = "iai"
Expand Down
2 changes: 2 additions & 0 deletions rustyms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,5 @@ It has multiple features which allow you to slim it down if needed (all are enab
* `rand` - allows the generation of random peptides.
* `rayon` - enables parallel iterators using rayon, mostly for `imgt` but also in consecutive align.
* `mzdata` - enables integration with [mzdata](https://github.com/mobiusklein/mzdata) which has more advanced raw file support.
* `glycan-render` - enables the rendering to SVGs for glycans and glycan fragments
* `glycan-render-bitmap` - enables the rendering to bitmaps for glycans, by enabling the optional dependencies zeno and swash
2 changes: 1 addition & 1 deletion rustyms/data/glycan.mgf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ BEGIN IONS
PEPMASS=660.2457879192369
CHARGE=1+
TITLE=MS/MS scan at 1.535 min with Intensity: 604.0
SEQUENCE=N[GlycanStructure:Hex(Hex,HexNAc)]
SEQUENCE=N[G:G01141WK]

189.48956 5050.0
283.62076 5050.0
Expand Down
1 change: 1 addition & 0 deletions rustyms/images/glycan_root.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified rustyms/src/databases/gnome.dat
Binary file not shown.
Binary file modified rustyms/src/databases/xlmod.dat
Binary file not shown.
Loading