{{ message }}
Releases: BojarLab/glycowork
Releases · BojarLab/glycowork
Release list
v1.9.0
Changelog
[1.9.0]
- Bumped Python version to
3.11(3.10reaches end of life in October 2026; https://devguide.python.org/versions/) (6a94ea9) - Bumped minimum
pandasversion to2.1(faf68f0) - Fixed
scipyversion as>=1.16to guarantee Games-Howell test in the ANOVA for biodiversity tests (cf5e7bd) - The
devoptional install set (only used for testing) now also includesglycontact>=0.3.3 - Automated versioning in
__init__.py(b72d113)
glycan_data
- Curated datasets are now stored in a dedicated folder
.glycan_data.datasets, for tidiness (c91ee8d) - Added new curated glycomics datasets:
human_interstitialfluid_N_GPST000651,celllines_colorectal_O_PMID32236654,celllines_colorectal_GSL_PMID35489554,human_serum_ovarian_N_PMID41366864,mouse_platelet_N_101161ATVBAHA126324757(ce499ae, 7ddd6c2, c91ee8d, 086d589, c29ceeb, e6f59e6) - Renamed and re-curated
glycomics_mouse_gastric_O_GPST000464toglycomics_mouse_gastric_O_PMID40667878(c91ee8d) - Added new
contrastsfile to catalog which sample belongs to which comparison group for the curated glycomics datasets (aad159e) df_speciesnow contains a newtaxon_idcolumn with TaxIDs (3d304a3)
loader
Added ✨
- Added the
GlycoListclass that equipsListwith graph-based matching capabilities (overridingindex,remove,count, andinwithcompare_glycansisomorphisms) (49c9aeb) - Added the
glycans,abundance,group1,group2,groups,paired, andnameproperties toGlycoDataFrameto benefit fromGlycoListcapabilities inglycans, get the abundance values viaabundanceand provide functions inglycowork.motif.analysiswith group labels and information whether data are paired or not (aad159e, c91ee8d, cd1b9aa)
stats
Added ✨
MissForestnow has acircadianAPI (also exposed inimpute_and_normalize, to fine-tune data imputation of rhythmic data (starting from the same-phase median, instead of the overall median) (4305377)
Fixed 🐛
- Fixed behavior of
hotellings_t2whenpaired=True(e419fc4) - Fixed
get_glycoform_diffmutating its input (e419fc4)
motif
graph
Added ✨
- All graph functions (e.g.,
compare_glycans,subgraph_isomorphism) now support narrow monosaccharide wildcards (e.g.,Gal/Maninstead ofHex) (f85ab80)
Changed 🔄
- Made glycan graph caching in
glycan_graph_memoizesomewhat faster (cf5e7bd)
Fixed 🐛
- Fixed some degree calculations in
generate_graph_features(cf5e7bd) - Fixed
graph_to_stringvery rarely not ordering branches in a deterministic/idempotent manner (9f42561)
Deprecated ⚠️
processing
Added ✨
- Universal Input via
canonicalize_iupaccan now deal with more monosaccharide cases, such asRibp,Glc1OMe, or single-monosaccharide glycans such asaDGlcpA(6754bbf, 426ff9d) - Universal Input via
canonicalize_iupaccan now more robustly handle modifications in CSDB-linear, such as inAc(1-5)aXNeup(2-6)[Ac(1-2)]bDGalpN(1-4)bDGalp(1-4)bDGlcp,S-3)bDGlcpA(1-3)bDGalp(1-4)[Ac(1-2)]bDGlcpN(1-3)bDGalp(1-4)bDGlcp,-4)[S-2)]aD3,6anhGalp(1-3)[S-2)]bDGalp(1-, orAc(1-2)[xXEt?N(1-P-6)]bDGlcpN(1-3)bDManp(1-4)bDGlcp, as well as more robustly strip reducing end anomeric indicator (99942e8, a152c47, d6c3d56, ced60fc, a6882db) - Universal Input via
canonicalize_iupaccan now parse more complex Oxford sequences, such asF(6)A2G(4)2S(3,3)2(9f42561) max_specify_glycanwill now also specify these cases:("Fuc(a1-?)GlcNAc", "Fuc(a1-3/4)GlcNAc"),("Fuc(a1-?)]GlcNAc", "Fuc(a1-3/4)]GlcNAc"),("Fuc(a1-?)Gal(", "Fuc(a1-2)Gal("),("GalOS", "Gal3/6S"),("GlcNAcOS", "GlcNAc6S"),("Fuc(a1-?)[Gal(b1-?)]", "Fuc(a1-3/4)[Gal(b1-3/4)]"),("Man(a1-?)Man", "Man(a1-2/3/6)Man")(f3b4389, 487dad4)- Oxford parsing in
canonicalize_iupacwill now detect hybrid glycans and will add extra mannoses to thea1-6branch (c4ba7f9)
Changed 🔄
- Universal Input via
canonicalize_iupacnow is more robust to modified reducing ends in IUPAC-extended glycans (6754bbf) canonicalize_iupachas again been made more robust against typos and personal idiosyncrasies in nomenclature (39b1d25, 9f57fa5, e419fc4)
Fixed 🐛
- Fixed some Oxford sequences (e.g.,
A1,A2) being misidentified as blood group glycolipids bycanonicalize_iupac(9f42561) - Fixed
canonicalize_compositionmistaking sialic acid composition blocks as sulfate in compositions such asH2N2S1Sulf1(bb822c8) - Fixed
oxford_to_iupacwrongly orderingNeuOAc5Acinstead ofNeu5AcOAc(eda4474)
tokenization
Added ✨
- The
modificationkeyword argument inmz_to_compositionetc now also acceptsprocainamideas an argument (e4a2a40) mz_to_compositionandmz_to_structuresnow have a newmax_chargekeyword argument that sets the maximum applicable charge state as well as the ion mode (e1475f9)mz_to_compositionandmz_to_structuresnow also support ppm-level mass tolerances via the newtolerance_unitkeyword argument that allows users to switch between Da and ppm (e1475f9)
Changed 🔄
mz_to_compositionnow also filters by providedglycan_classif a user provides a customdf_use(ab57479)
Fixed 🐛
composition_to_massnow correctly factors in the extra methylation (former ring oxygen) that happens in the combination ofmodification == 'reduced'andsample_prep == 'permethylated'(30e1a46)- Fixed incompatibility of
condense_composition_matchingwithscikit-learn >= 1.9.0(34d839f)
Deprecated ⚠️
- Removed the keyword argument
modefrommz_to_compositionandmz_to_structures; will be handled by the newmax_chargeinstead (e1475f9) - Removed the
doubly_chargedoption from theextraskeyword argument inmz_to_composition; will be handled by the newmax_chargeinstead (e1475f9)
annotate
Added ✨
annotate_glycannow also exposes the keyword argumentcondense=False, analogous toannotate_dataset, to get only non-zero motifs (5d4fa70)
Changed 🔄
- Arguments
glycansandfeature_setinquantify_motifshave been changed to keyword arguments with defaultsglycans = None(will be inferred from first column if it contains glycans, otherwise needs to be supplied) andfeature_set = ['known', 'exhaustive'](c5db6a8) - Wildcard monosaccharide-only columns (e.g.,
dHex) inget_k_saccharidewill now also aggregate signal from their specific instances (e.g.,Fuc) across the dataset (was already working like that forSiaand for k>1) (6de40f9)
Fixed 🐛
quantify_motifscan now also be used with full datasets that still have the first column be a glycan string column (fa98caa)get_k_saccharideswill no longer mistakenly capture narrow linkage wildcards likeb1-3/4in its feature columns for k=1 (where there should only be monosaccharides) (c209f85)
draw
Added ✨
- When supplied with narrow monosaccharide wildcards,
GlycoDrawwill now draw bisected monosaccharides (e.g., a blue-yellow split rectangle forGlcNAc/GalNAc) (f85ab80)
Changed 🔄
- If
draw_method = chem3d,GlycoDrawwill now preferentially fetch a realistic conformer from GlycoShape/PDB viaglycontact, if the user hasglycontactinstalled (lazily imported), and only fall back to RDKit if none can be found (7a59d08)
Fixed 🐛
- Made SVG parsing in
annotate_figuremore robust (e3dce0e) - Glycans with
/in their sequence can now be saved with the glycan name as the filename inGlycoDrawwithout error (edba778)
analysis
Changed 🔄
- Several functions are now more robust toward the specific glycan column naming for processing (aad159e)
get_jtknow internally uses fine-tuned data imputation for rhythmic data viaMissForestimprovements (4305377)
Fixed 🐛
- Fixed column access in ALR-treatment of
get_glycanova(aad159e) - Fixed warnings when using
scikit-learn>=1.9.0due to the deprecatedpenaltykeyword arg insklearn.linear_model.LogisticRegressionused inmulti_feature_scoring(34d839f) - Fixed edge case where
get_glycanovacould assign effect sizes to wrong glycans, if glycans had been dropped due to variance filtering (e419fc4)
Deprecated ⚠️
- Deprecated
glycan_col_namekeyword argument inget_pvals_motifandcharacterize_monosaccharide; will be auto-detected (aad159e)
regex
Fixed 🐛
- Specifying exact occurrences in
get_match, as inget_match("[HexNAc]{2}", "Gal(b1-4)GlcNAc(b1-4)GlcNAc"), is now more robust/accurate (28894d8)
Deprecated ⚠️
v1.8.1
Changelog
[1.8.1]
- fixed
deployaction internally still relying onnbdev2(84134fb)
glycan_data
loader
Changed 🔄
- Changed
human_macrophages_N_2024-11-28-625934andhuman_macrophages_O_2024-11-28-625934glycomics datasets tohuman_macrophages_N_2024_11_28_625934andhuman_macrophages_O_2024_11_28_625934(6a673d0) - Recurated
human_brain_GSL_PMID40207879glycomics dataset with improved nomenclature conversion (cf8706a)
Fixed 🐛
- Fixed one faulty sequence in
df_glycanthat caused graph generation to fail (b2f6ab9)
stats
Added ✨
- Added
hsicto calculate Hilbert-Schmidt Independence Criterion between variables, to measure dependency (c560fbb)
motif
analysis
Changed 🔄
- Added distance matrix to beta diversity output in
get_biodiversity(dca7820)
Fixed 🐛
- Fixed column names slipping into column values when
motifs = Truecombined withtransform = ALRinget_pca(e802da1) - Made motif abundance re-normalization more robust in
preprocess_data(ac6fa53)
draw
Changed 🔄
- Improved branch spacing in
GlycoDrawfor highly branched glycans (6a673d0)
tokenization
Added ✨
- Added a
mass_tagfloat keyword argument tomz_to_compositionandmz_to_structuresfor glycans tagged at the reducing end (7adaf75) - Added a
modificationstring keyword argument tocomposition_to_massandglycan_to_massfor glycans tagged at the reducing end (8160490) mz_to_compositionandmz_to_structuresnow also support the combination of multiply-charged ions with adducts (8160490)
Fixed 🐛
- Fixed mass calculation of additionally acetylated glycans in
glycan_to_mass(7adaf75)
Deprecated ⚠️
- The
reducedbool keyword argument inmz_to_compositionandmz_to_structureshas been replaced with themodificationstring keyword argument (8160490) - Deprecated the
reducing_endkeyword argument inmatch_composition_relaxed, as it was no longer being used (3f459b2)
Fixed 🐛
- Fixed a bug in
mask_rare_glycolettersin which rare linkages occasionally were not masked (3f459b2)
processing
Added ✨
- Added some more lipid shorthands (e.g.,
Fuc-GD1aorFuc-GA1) to Universal Input/canonicalize_iupac(cf8706a)
Changed 🔄
- Universal Input via
canonicalize_iupaccan now deal with more pyranose indicators (e.g.,AltporLyxp) (467673b) - Universal Input via
canonicalize_iupaccan now deal with more sulfate variants (e.g.,6-O-sulfo,[S-6]) (0e102a6, cbe20da)
Fixed 🐛
- Fixed overeager modification of already correctly formatted
6PChomodifications incanonicalize_iupac(467673b) - Fixed
max_specify_glycannot specifying the chitobiose core in N-glycans (3f459b2)
network
biosynthesis
Added ✨
- Added
get_biosynthetic_coherencefunction to estimate how well glycan abundances can be predicted from biosynthetic networks, to disentangle biosynthetic vs carrier variance (b7020fd)
v1.8.0
Changelog
[1.8.0]
- fixed
Quartoaccessing ofpyproject.tomlattributes for doc building (cd9b62f)
glycan_data
loader
Added ✨
- Added new N- and O-glycomics dataset from https://pubmed.ncbi.nlm.nih.gov/41460292/ to
glycomics_data_loader(mouse_taysachs_N_PMID41460292andmouse_taysachs_O_PMID41460292) (52c6cf9) - Added new N-glycomics dataset from https://pubmed.ncbi.nlm.nih.gov/39877544/ to
glycomics_data_loader(human_serum_N_PMID39877544) (57f6260) - Added new N-glycomics dataset from https://pubmed.ncbi.nlm.nih.gov/37639587/ to
glycomics_data_loader(human_neutrophils_N_PMID37639587) (5d81cc3) - Added new N- and O-glycomics dataset from https://www.biorxiv.org/content/10.1101/2024.11.28.625934v1 to
glycomics_data_loader(human_macrophages_N_2024-11-28-625934andhuman_macrophages_O_2024-11-28-625934) (4813910, 1688897) - Added new N-, O-, and GSL-glycomics dataset from https://pubmed.ncbi.nlm.nih.gov/36788594/ to
glycomics_data_loader(human_leukemia_N_PMID36788594,human_leukemia_O_PMID36788594, andhuman_leukemia_GSL_PMID36788594) (5510e55) - Added new N-glycomics datasets from https://pubmed.ncbi.nlm.nih.gov/39947398/ to
glycomics_data_loader(human_colorectal_N_PMID39947398andhuman_pbmc_cancer_N_PMID39947398) (fdd2340, 144051a)
Changed 🔄
- Specified wildcards in
glycomics_human_colorectal_O_PMC9254241(e71550d)
Fixed 🐛
- Made sure that incomplete API access in
get_molecular_propertiesdoes not lead to outright failure (52c6cf9) glycomics_data_loaderand otherLazyLoaderinstances are now robust against duplicate column names with the.1,.2suffix (they will be stripped now) (44e8473, 1cdb270)
motif
annotate
Added ✨
get_k_saccharidesandannotate_datasetcan now dynamically create enrichment motifs of the typeSia(a2-3)GalorTerminal_Sia(a2-3/6)if multiple sialic acid types are present in input data (522b7cf)
Fixed 🐛
- Made sure curly bracket sequence content ("floaty bits") are correctly counted in
count_unique_subgraphs_of_size_k(522b7cf) - Make sure all narrow linkage wildcards, even if not present in
linkages, are being correctly parsed incount_unique_subgraphs_of_size_k(5220912)
graph
Changed 🔄
- Added
_prefilter_labelsfor more cheap checks to avoid graph operations and thus makecompare_glycansandsubgraph_isomorphismconsiderably faster (b865229) - Made
glycan_to_graphfunction much faster (up to 10x) (750cdb1) - Made
graph_to_string_intfunction ~40% faster (750cdb1)
Deprecated ⚠️
- Deprecated
evaluate_adjacency; will be handled in-line inglycan_to_graph(750cdb1) - Deprecated
canonicalize_glycan_graph; will be handled in-line ingraph_to_string_int(750cdb1) - Deprecated
neighbor_is_branchpoint; no longer in use (e020ffb)
draw
Changed 🔄
HexN,dHexNAc, andHexAshapes now get drawn in fewer objects/more efficiently (10da7c5)
Fixed 🐛
- Fixed displaying beta-linkages instead of alpha-linkages in
annotate_figure(e71550d)
Deprecated ⚠️
- Deprecated
scale_in_range; has been in-lined instead (855a9f8) - Deprecated
process_repeat; has been in-lined instead (855a9f8)
analysis
Changed 🔄
get_volcanocan now also deal with input dataframes that have theGlycancolumn be the index instead (e71550d)- Equivalence p-values in
get_differential_expressionnow also use the same sample-size adjusted alpha as regular p-values (3884125) - Specifying
return_plot=Trueinget_heatmapwill now also return the column names and the transformed dataframe, next to the plot object (3b72129) - Improved default plot styling for outputs from functions (855a9f8)
Fixed 🐛
- CLR-transformation for paired data in
preprocess_datanow correctly uses the shared geometric mean as reference, to preserve within-pair differences (3884125) - Fixed equivalence p-values in
get_differential_expressionifsets=True(3884125) - CLR-transformed motif-level quantification in
preprocess_dataandget_pcaused the glycan-level geometric mean as a reference, rather than the motif-level geometric mean, which is now fixed (c71c385) get_rocnow saves the figures for all classes, not just the last, in a set-up offilepath+ multi-group comparison (855a9f8)- User-provided
random_statevalues/generators are now correctly propagated through tomulti_feature_scoring(855a9f8)
tokenization
Added ✨
mz_to_compositionnow has a new keyword argumentdeprioritized, which is a set of disfavored monosaccharides/modifications that will only be used if no composition can be found otherwise (i.e., less harsh than full exclusion viafilter_out). This keyword argument is now also exposed inmz_to_structures(316f962)
tokenization
Changed 🔄
canonicalize_iupacnow is even more robust regarding typo correction (acf05e1)
network
biosynthesis
Added ✨
- Added
build_network_from_glycanshandler to do a BFS-search to get the bulk biosynthetic network going (b865229) - Added
hierarchicaloption (now the new default) to the keyword argument options inplot_formatinplot_network, for a more organized network display (8d03348) extend_networknow has the newauto_stepskeyword argument, which (ifto_extendis a target composition), will calculate the minimum number of steps, cross-check it against the provided maximum assteps, and then iteratively extend the most favorable leaf nodes toward the target composition (f8f2fa9)
Changed 🔄
construct_networkis now more than twice as fast (a1c810c, b865229)- Dynamic wildcard construction in
get_differential_biosynthesisnow also creates the most parsimonious narrow wildcards, similar toannotate(e71550d) - Renamed the
Featurecolumn inget_differential_biosynthesistoGlycan(e71550d) extend_networknow accepts compositions in any format in theto_extendkeyword argument, using Universal Input (18f7ba5)extend_networknow early-exits if the composition provided into_extendalready exists within the network, outputting the existing matching structures in the network (18f7ba5)monolink_to_enzymeis now comma-separated instead of tab-separated and is more complete (10dc46e)
Fixed 🐛
- Fixed reaction hover label in
plot_network(8d03348) - Fixed a bug in
add_high_man_removalwhich set the edge labels with alambdafunction instead of a string (f2b5f99)
Deprecated ⚠️
- Deprecated
find_shared_virtuals,adjacencyMatrix_to_network,get_virtual_nodes,get_neighbors,create_adjacency_matrix; now all handled in-line (a1c810c, b865229) - Deprecated
find_path,find_shortest_path,deorphanize_nodes,shells_to_edges, which is all now handled by the newbuild_network_from_glycans(b865229)
v1.7.1
Changelog
[1.7.1]
glycorenderversion bump from0.2.3to0.2.5(1933574)- upgraded
nbdev2tonbdev3for the documentation (+ removed now unnecessary files) (eb3f727) - improved start-up time of the package (i.e., time at first import in a session) (10a39f0)
motif
draw
Changed 🔄
- Generic substituents will now be properly formatted in
GlycoDraw(89eb687) - Unknown base monosaccharides in
GlycoDrawnow correctly default to blank hexagons (89eb687) - Make sure
GlycoDrawcan draw !-containing sequences (e.g.,Internal_LewisA) even withrestrict_vocab=True(1933574)
Fixed 🐛
- Make sure
reducing_end_labelis perfectly y-centered inGlycoDraw(7e9e980) - Fixed setting utf-8 as default encoding in
annotate_figure(1933574)
processing
Added ✨
- Added
LacdiNActo thecommon_namessupport in Universal Input (d1140d1) - Added
max_specify_glycanfunction to infer sequence ambiguities/uncertainties as best as possible (e2cf92a)
Fixed 🐛
canonicalize_iupacis now more robust when handling variant modification dialects in IUPAC-condensed (i.e., not mistaking them for CSDB-linear), such asGalβ1-3(6SGlcNAcβ1-6)GalNAcol(046ea12)min_process_glycansandget_libnow correctly handle glycans with floating modifications, such as{6S}{Neu5Ac(a2-3)}Gal(b1-4)GlcNAc(b1-6)[Gal(b1-3)]GalNAc(68f1e1b)
analysis
Changed 🔄
characterize_monosaccharideis now much faster (0de71c5)
Fixed 🐛
- Fixed temporary file handling in
annotate_volcano=Trueinget_volcano(1933574)
annotate
Added ✨
- Added new
get_minimal_ksaccharide_ambiguityfunction to find the minimal needed narrow linkage wildcard to encompass all variants in dataset (8a0bbce)
Changed 🔄
feature_setoptionsexhaustiveand theterminalvariants now fully lean into narrow linkage wildcards for dynamically generated wildcards (e.g.,a2-3/6), instead of the broadera2-?versions, which are scoped based on the provided data (8a0bbce)get_terminal_structurescan now be used for anysizevalue, not only 1 and 2 (ef353fb)annotate_datasetwill now internally useget_terminal_structuresfor theterminal3feature-set keyword (ef353fb)
Fixed 🐛
- Fixed topologically incorrect disaccharides in
get_terminal_structuresoutput (ef353fb)
ml
models
- When using
prep_modelwithtrained=TrueonSweetNet-type models, the function now auto-corrects thenum_classesvalue, if a wrong output dimension is provided (i.e., if it clashes with the trained model) (ccf2d34)
Fixed 🐛
- Fixed warning message in
train_ml_modelabout not specifyingfeature_calc(0de71c5)
v1.7.0
Changelog
[1.7.0]
- Added some more lazy loading of drawing-related imports to improve package start-up time (b806bdd)
glycoworknow requires at least version0.2.3ofglycorender[png](d51c0eb)glycoworknow requiresPython>=3.10, as 3.9 is no longer supported by the Python Foundation (2b8838c)- switched type hints to native type hints (supported from Python 3.10) (2b8838c, 9b7b192)
motif
processing
Added ✨
- Added the
verbosekeyword argument (default = True) toglytoucan_to_glycan, to suppress the output of non-matched IDs (aa0b9a4) - Added the
kcf_to_iupacfunction to convert the KCF nomenclature into IUPAC-condensed (bfe947c, 37fad0d) - Added the
glycoctxml_to_iupacfunction to convert the GlycoCT XML nomenclature into IUPAC-condensed (3d967b6) - Added the
is_compositionutility function to quickly check whether a string is a composition or a glycan (dcd3ffe)
Changed 🔄
- Improved the detection of
LinearCodesequences incanonicalize_iupacwith the newlooks_like_linearcodehelper function (e26566e) - Improved the hook for triggering Oxford nomenclature conversion in
canonicalize_iupacto be less permissive and faster (c5ae5e5, 25186e5) - Renamed
linearcode1d_to_iupactoglyseeker_to_iupac(d44aba1) - Improved the hook for checking GlyTouCan IDs in
canonicalize_iupacby making it more specific (aa0b9a4) - Improved
wurcs_to_iupachandling of complex sequences to have more robust WURCS handling incanonicalize_iupac(0f5a5d8) - Improved
glycoworkbench_to_iupachandling of variable reducing ends to have more robust GlycoWorkbench handling incanonicalize_iupac(0f5a5d8) canonicalize_iupaccan now also convert KCF sequences, thanks to the newkcf_to_iupacfunction (bfe947c, 37fad0d)canonicalize_iupaccan now also convert GlycoCT XML sequences, thanks to the newglycoctxml_to_iupacfunction (3d967b6)- Arbitrary chemical substituents from CSDB-linear glycans are now being correctly handled in
canonicalize_iupac, even if the specific substituent is not yet supported (b71af07)
draw
Added ✨
- Added the
reducing_end_labelkeyword argument toGlycoDrawto display any connected text to the right of the glycan (such as "protein", which will be connected via a regular linkage) (c36a1a6) - Added the
GlycanDrawingclass to allowGlycoDrawto outputglycorenderaesthetics in a Jupyter notebook context (d51c0eb)
Changed 🔄
- Improved branch spacing for complex glycans (i.e., less overlap) within
GlycoDraw(39ba99c) - Added the
restrict_vocabkeyword argument toGlycoDraw(default: False) to support drawing of exotic glycans while still facilitating a restricted vocabulary for annotating glycans in figures (fcddb36)
annotate
Added ✨
- Added the
get_glycan_similarityfunction to calculate cosine similarities between glycan motif fingerprints between two glycan sequences (bd4d071)
Changed 🔄
get_k_saccharidesnow has limited support to extract information from inputs that are a mix of sequences and compositions; namely monosaccharide counts, whenup_to = True(dcd3ffe)
ml
model_training
Added ✨
- Added
WarmupSchedulerclass to (by default) have a warming-up period of learning rate schedule (for training stability) intraining_setup(469649a)
Changed 🔄
train_modelnow supports training GIFFLAR-type glycan models (1a7e720, 18f42e5)training_setuphas the newwarmup_epochskeyword argument (default = 5) that determines the length of the learning rate warm-up schedule (469649a)train_modelnow performs gradient clipping for improved training stability (469649a)
models
Added ✨
- The GIFFLAR model can now be requested from
prep_modelvia "GIFFLAR" asmodel_type(1a7e720, 18f42e5)
inference
Changed 🔄
- Added the
multilabelkeyword argument toglycans_to_emb, to support inference for multilabel outputs (0437583)
glycan_data
loader
Added ✨
- Added
parse_linesutility function to parse copy-pasted content from an Excel column into a list (b806bdd)
v1.6.4
Changelog
[1.6.4]
- The required version for
glyles, when using the[chem]or[all]optional installs, has been bumped up to1.2.3a0to resolve dependency conflicts (27eb990) - Added new glycomics, glycoproteomics, and lectin microarray datasets (5558f1e)
- Added link to
canonicalizeweb app into README (3c862db)
motif
draw
Added ✨
GlycoDrawnow has the new keyword argumenthighlight_linkages, which will draw selected linkages in red and thicker (6b60a53)
analysis
Added ✨
get_pcanow has the new keyword argumentsize, to let users control the size of points with a scalar column in the provided meta-data (ab7669c)
graph
Fixed 🐛
- Fixed an issue in
subgraph_isomorphism_with_negation, where motif graphs were only shallowly copied, potentially causing graph mutation during processing and leading to too permissive matching inannotate_datasetand higher-level functions (8b75aae)
processing
Changed 🔄
- Using
canonicalize_iupacon a monosaccharide contained inlibnow has an early return, preventing overlapping name spaces with the common names (040cbc8) - Added support for old 'z' uncertainty notation in
canonicalize_iupacviareplace_dic(b079ece) - Support C2-inference for beta-linked sialic acid in
canonicalize_iupac(563ea6d) - Support CarbBank IUPAC dialect in
canonicalize_iupac(563ea6d) - Generalized handling and sorting of
Neu5,9Actype modifications incanonicalize_iupac(757a24f) - Improved handling of CSDB-linear modifications in
canonicalize_iupac(757a24f)
v1.6.3
Changelog
[1.6.3]
glycoworkis now compatible with specifying narrow modification ambiguities (e.g.,Gal(b1-3)GalNAc4/6S) (ec290e8)- made the
bokehdependency runtime-optional by importing it just-in-time forplot_network(ea9929e)
glycan_data
stats
Added ✨
- Alpha biodiversity calculation in
alpha_biodiversity_statsnow performs Welch's ANOVA instead of ANOVA ifscipy>=1.16(ab73368) - ALR transformation functions now also expose the
random_statekeyword argument for reproducible seeding (23cafe7)
motif
processing
Added ✨
COMMON_ENANTIOMERdict to track the implicit enantiomer state (e.g., we writeGalinstead ofD-Galbut we do note the deviationL-Gal) (bb7575c)GLYCONNECT_TO_GLYTOUCANdict to support GlyConnect IDs as input to Universal Input /canonicalize_iupac(ea9929e)
Changed 🔄
canonicalize_iupacand its parsers will now leave theD-/L-prefixes in monosaccharides, which will then be centrally homogenized withCOMMON_ENANTIOMER, for a more refined and detailed output (bb7575c)canonicalize_iupacnow considers more IUPAC variations, such asNeu5,9Acinstead ofNeu5,9Ac2(a764897)canonicalize_iupacno longer strips trailing-Cer(d8c948b)canonicalize_iupacnow handlesalphaandbeta(d8c948b)glycoworkbench_to_iupacis now trigged by presence of eitherEnd--oru--(d8c948b)wurcs_to_iupacnow supports more tokens (d9d6e57)canonicalize_iupacnow supportsGal4,6Pyrmodifications (487c68a)wurcs_to_iupaccan now process sulfur linkages (e.g.,Glc(b1-S-4)Glc) (88b2d54)wurcs_to_iupacis now more robust to prefixes (e.g.,L-,6-deoxy-, etc) (ac171c5)wurcs_to_iupaccan now deal with ultra-long glycans (i.e., a-z, A-Z, aa-az, and aA-aZ) (487c68a)
tokenization
Changed 🔄
glycan_to_compositionis now compatible with the new narrow modification ambiguities (e.g.,Gal(b1-3)GalNAc4/6S) (ec290e8)
graph
Changed 🔄
compare_glycansis now compatible with the new narrow modification ambiguities (e.g.,Gal(b1-3)GalNAc4/6S) (ec290e8)
draw
Fixed 🐛
- fixed overlap in floating substituents in
GlycoDrawif glycan had fewer branching levels than unique floating substituents (daade78)
analysis
Added ✨
v1.6.2
Changelog
[1.6.2]
glycan_data
loader
Changed 🔄
huggingface_hubwill now only be imported upon runningdownload_model, making it technically run-time optional and improving package start-up time (d87e8af)
draw
Changed 🔄
openpyxlwill now only be imported upon runningplot_glycans_excel, making it technically run-time optional and improving package start-up time (d87e8af)
processing
Added ✨
canonicalize_iupacnow removes extraneous quote marks around input glycans (fbe454c)- Added more milk oligosaccharide common names to the Universal Input pipeline as recognized by
canonicalize_iupac(39e8a19)
Changed 🔄
canonicalize_iupacwill now recognizeGLYCAMsequences terminating in-OME(6430ebb)
Fixed 🐛
v1.6.1
[1.6.1]
- Moved
xgboostdependency into the optional[ml]install (0c62acf) glycoworknow no longer has asvglibdependency, due to improvements inglycorender, requiringglycorender[png]==0.2.0(4cad68f)
motif
graph
Changed 🔄
glycan_to_nxGraph_intwill now automatically convert providedlibdicts intoHashableDictobjects, if they aren't already (fe5cd74)compare_glycansused with two strings now has another early-return condition if the two glycans have different numbers of branches, enhancing efficiency (fe5cd74)
processing
Changed 🔄
canonicalize_iupaccan now handle some more variations, such as double-anomeric linkages ((a2-1b)), and will leave modification-containing-seeming monosaccharides (e.g.,Psif,Sorf) intact (5b25c1f)
v1.6.0
Changelog
[1.6.0]
- All glycan graphs are now directed graphs (
nx.Graph-->nx.DiGraph), flowing from the root (reducing end) to the tips (non-reducing ends), which has led to code changes in quite few functions. Some functions run faster now, yet outputs are unaffected (03dfad6) - Added
huggingface_hub>=0.16.0as a new dependency to facilitate more robust model distribution (22f6b8f) - Moved
drawSvg~=2.0andopenpyxlfrom the optional[draw]install to the dependencies of base glycowork. That allows for the usage ofGlycoDrawin, e.g., Jupyter environments etc, even ifglycowork[draw]has not been installed. Since these dependencies are unproblematic, no special install needs to be followed for the base glycowork install (60e51da) - Deprecated the optional
[draw]install completely, by replacing the problematiccairosvgdependency with our new & custom rendererglycorender, which is now a new base dependency ofglycowork(7c4fbe1) - Moved
Pillowdependency intoglycorender(793e71f) - Deprecated
mpld3andmatplotlib-inlinedependencies; added newbokehandIPythonbase dependencies for better interactive plotting in a Jupyter environment (972c34b, 13b0699) - Formally added
numpyandmatplotlibto base dependencies (ba40c73) - Exposed
canonicalize_iupacto theglycoworkGUI(ba40c73) - Implemented submodule lazy loading to speed up package imports & start-up (9bf18f7)
glycan_data
loader
Added ✨
- Added
HashableDictclass to allow for caching of functions with dicts as inputs (03dfad6) - Added
GlycoDataFrameclass to extendpd.DataFrameby adding the.glyco_filtermethod, to easily filter glycan dataframes by the occurrence/count of sequence motifs (9764b3e) - Added new curated glycoproteomics dataset:
sorghum_N_PMID39137587(13b0699) - Updated
glycan_binding,df_glycan,df_speciesto be bigger, better, and cleaner (e302075)
Changed 🔄
- Refined motif definition of
Internal_LewisX/Internal_Lewis_A/i_antigeninmotif_list, to excludeLewisY/LewisB/I_antigenfrom matching/overlapping (07c9c12) - Renamed
Hyluronaninmotif_listintoHyaluronan(07c9c12) - Removed
Nglycolyl_GM2frommotif_list; it's captured byGM2(07c9c12) - Further curated glycomics datasets stored in
glycomics_data_loaderby introducing the b1-? --> b1-3/4 narrow linkage ambiguities (9eeaa3a, 436bf09) download_modelwill now download model weights and representations from the HuggingFace Hub (22f6b8f)df_speciesanddf_glycanare now of typeGlycoDataFrame;build_custom_dfnow returns a dataframe of typeGlycoDataFrame(9764b3e)DataFrameSerializerwill now also correctly serialize cells in which (i) lists of strings or (ii) dictionaries have been converted into one string (Excel/pandas interplay of complex cells), where we useastto try to literally evaluate them back into lists of strings (i) / dictionaries (ii) (806a47c, e302075)
stats
Fixed 🐛
- Fixed a
DeprecationWarningabout implicit indexing inalr_transformationwhen a dict is used forcustom_scale(9bf18f7)
motif
processing
Added ✨
- GlyTouCanIDs are now another supported nomenclature in the context of Universal Input and can be used as inputs for functions etc, supported via improvements in
canonicalize_iupac(eafb218) - Added
sanitize_iupacto detect and fix chemical impossibilities (like two monosaccharides connected via the same hydroxyl group) and fix it (407cd6f, 74d35a0) - Added
GLYCAN_MAPPINGSdictionary to map commonly used glycan names to their IUPAC-condensed sequence (36d33b8) - Added
linearcode1d_to_iupacto support sequences of type01Y41Y41M(31M21M21M)61M(31M21M)61M21Min the Universal Input platform (d0eee40) - CSDB linear code is now another supported nomenclature in the context of Universal Input and can be used as inputs for functions etc, supported via improvements in
canonicalize_iupac(8dd34b7, 36d2a61, 69c00e1, 2d8fdfd, cb97593, 0e07c56) - Added
transform_repeat_glycanto support bringing repeat structures of type1)Fruf(b2-3)Fruf(b2-into the glycowork format ofFruf(b2-3)Fruf(b2-1)Fruf(36d2a61, 2d8fdfd) - Added
nglycan_stub_to_iupacto support sequences of type(Hex)3 (HexNAc)1 (NeuAc)1 + (Man)3(GlcNAc)2in the Universal Input platform (69c00e1) - Added
iupac_to_smilesalias forIUPAC_to_SMILES(cb97593) - Added
GAG_disaccharide_to_iupacto support disaccharide structural code (DSC) for GAGs (e.g.,D2A6) in the context of Universal Input (0770bcd) - Added more WURCS tokens for better support in the context of Universal Input, now stored in
wurcs_tokens.json(436bf09, 84c5bcc, b30553f, b94cf6d, d1fd4c7, 14bbd4d, a109176) - Support monosaccharides without anomeric indicator and phospho-linkages in WURCS (14bbd4d)
Changed 🔄
- Moved
.motif.query.glytoucan_to_glycaninto.motif.processing(eafb218) canonicalize_iupacwill now usesanitize_iupacto auto-fix chemical impossibilities in input glycans (407cd6f)- More GlycoWorkBench sequence variants can now be handled via
glycoworkbench_to_iupac/canonicalize_iupac(9eeaa3a, 436bf09, 74d35a0, 87fd540) canonicalize_iupacand most glycowork functions now also support common names, like "LacNAc" or "2'-FL", in the Universal Input framework, thanks toGLYCAN_MAPPINGS(36d33b8, ab42dbb)get_classcan now identify repeating unit glycans and returns "repeat" in this case (74d35a0)canonicalize_iupaccan now handle even more IUPAC-dialects, likeaMan13(aMan16)Man, where the anomeric state is declared before the monosaccharide (24c8e81, ab42dbb)canonicalize_iupacwill now useglycan_to_nxGraphandgraph_to_stringfor branch canonicalization, instead ofchoose_correct_isoform. On average, this works much better and is more reliable (7c52a0e)canonicalize_iupacis now more robust to (5-6) type linkages and to the associated sugar alcohols, like Rib5P-ol (7a260ac)canonicalize_iupacwill now raise aValueErrorinstead of a warning if a glycan string has mismatching brackets (b69fced)canonicalize_iupaccan now handle even more IUPAC-dialects such asNeu5Ac-α-2,6-Gal-β-1,3-GlcNAc-β-Sp(cb2c898)canonicalize_iupaccan now handle α,β before linkage parentheses (70b2f61)get_classwill now correctly annotate plant N-glycans with core a1-3 Fuc (8dd34b7)- Rare GLYCAM variants without "-OH" at the end can now also be handled by
glycam_to_iupac(207a050) - Support single-monosaccharide glycans in GlycoCT within
glycoct_to_iupac(87fd540) - Support variant sulfate notations in
oxford_to_iupac(b35fc0e) - Improved parsing of Sialic acid linkage specification in
oxford_to_iupac(06ea51f) - Added Oxford preferred antenna parsing in
oxford_to_iupac(013456f) - Added Sialic acid Acetyl modification parsing in
oxford_to_iupac(c402bf2) - enabled usage of single strings, next to lists, in
iupac_to_smiles(8c5aa64) glycam_to_iupaccan now handle KDN tokens and more exotic modifications (8c5aa64)iupac_to_smilescan now auto-use Universal Input, if used with a single-string input
Deprecated ⚠️
- Deprecated
find_isomorphsandchoose_correct_isoform; this will be done (and better) by the newcanonicalize_glycan_graphinstead (7c52a0e)
annotate
Changed 🔄
- Renamed
clean_up_heatmaptodeduplicate_motifs(407cd6f) - Allow sets of glycans as inputs in
get_k_saccharides, in addition to lists of glycans (74d35a0) - Made
get_k_saccharidesfaster by re-using graphs and using the directed graphs in an optimized way (7c52a0e) get_terminal_structureswill now return an actualValueErrorwhen settingsizeto be higher than 2 (fa451ba)
Fixed 🐛
- Fixed an edge case in
get_k_saccharides, in which choosing asizelarger than the size of the largest glycan in the input caused an error (db7847d) - Fixed
get_k_saccharideswith higher values ofsize, which occasionally produced invalid strings, by refactoringcount_unique_subgraphs_of_size_kand switching it to use the changedgraph_to_string_int, to ensure motif validity (db7847d) - Fixed
preprocess_data, which was attempting to transform 0-containing dataframes when no transform argument was provided (878701a) - Fixed an issue in
get_molecular_propertiesin which failed requests withplaceholderset to False could lead to a size mismatch in preparing the output dataframe (106d0b0)
Deprecated ⚠️
- Deprecated
link_find; will be done by an optimizedget_k_saccharidesinstead (sincelink_findrelied onfind_isomorphs) (7c52a0e)
draw
Added ✨
- Added
get_branches_from_graphto process directed glycan graphs into components forGlycoDraw(e56d015) - Added the
reverse_highlightkeyword argument toGlycoDraw, if you want to highlight everything except a certain motif (which means you can highlight discontiguous sequence stretches) (f5e3b2f) GlycoDrawwill now inject ALT text / metadata into all its outputs (displayed or saved as.pdf/.svg/.png) for improved accessibility and to aid curation efforts. The ALT text will be automatically generated and includes appropriate tags, the glycan sequence, and used drawing options. But it can also be overriden, if desired, via the newalt_textkeyword argument inGlycoDraw(793e71f)
Changed 🔄
- Quantitative highlighting in
GlycoDrawvia theper_residuekeyword argument will now use individual SNFG-colors instead of a uniform highlight color (07c9c12) - Refactored
get_coordinates_and_labelsto be more efficient and generalizable; with this and the newget_branches_from_graph,GlycoDrawis now capable of drawing even more complex structures accurately (e56d015, 36fbba9) - Next to
.svgand.pdf, it is now also possible to save.pngfiles withGlycoDraw(36fb...
