File R-topolow.spec of Package R-topolow
# Automatically generated by CRAN2OBS
#
# Spec file for package topolow
# This file is auto-generated using information in the package source,
# esp. Description and Summary. Improvements in that area should be
# discussed with upstream.
#
# Copyright (c) 2025 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%global packname topolow
%global rlibdir %{_libdir}/R/library
Name: R-%{packname}
Version: 2.0.1
Release: 0
Summary: Force-Directed Euclidean Embedding of Dissimilarity Data
Group: Development/Libraries/Other
License: BSD_3_clause + file LICENSE
URL: http://cran.r-project.org/web/packages/%{packname}
Source: topolow_2.0.1.tar.gz
Requires: R-base
Requires: R-future
Requires: R-lifecycle
Requires: R-ggplot2
Requires: R-dplyr
Requires: R-data.table
Requires: R-reshape2
Requires: R-filelock
Requires: R-lhs
Requires: R-rlang
Requires: R-cli
Requires: R-generics
Requires: R-glue
Requires: R-magrittr
Requires: R-pillar
Requires: R-R6
Requires: R-tibble
Requires: R-tidyselect
Requires: R-vctrs
Requires: R-digest
Requires: R-globals
Requires: R-listenv
Requires: R-parallelly
Requires: R-gtable
Requires: R-isoband
Requires: R-S7
Requires: R-scales
Requires: R-withr
Requires: R-Rcpp
Requires: R-plyr
Requires: R-stringr
Requires: R-utf8
Requires: R-farver
Requires: R-labeling
Requires: R-RColorBrewer
Requires: R-viridisLite
Requires: R-stringi
Requires: R-pkgconfig
# %%if 0%%{?sle_version} > 120400 || 0%%{?is_opensuse}
# # Three others commonly needed
# BuildRequires: tex(ae.sty)
# BuildRequires: tex(fancyvrb.sty)
# BuildRequires: tex(inconsolata.sty)
# BuildRequires: tex(natbib.sty)
# %else
# BuildRequires: texlive
# %endif
# BuildRequires: texinfo
BuildRequires: fdupes
BuildRequires: R-base
BuildRequires: R-future
BuildRequires: R-lifecycle
BuildRequires: R-ggplot2
BuildRequires: R-dplyr
BuildRequires: R-data.table
BuildRequires: R-reshape2
BuildRequires: R-filelock
BuildRequires: R-lhs
BuildRequires: R-rlang
BuildRequires: R-cli
BuildRequires: R-generics
BuildRequires: R-glue
BuildRequires: R-magrittr
BuildRequires: R-pillar
BuildRequires: R-R6
BuildRequires: R-tibble
BuildRequires: R-tidyselect
BuildRequires: R-vctrs
BuildRequires: R-digest
BuildRequires: R-globals
BuildRequires: R-listenv
BuildRequires: R-parallelly
BuildRequires: R-gtable
BuildRequires: R-isoband
BuildRequires: R-S7
BuildRequires: R-scales
BuildRequires: R-withr
BuildRequires: R-Rcpp-devel
BuildRequires: R-plyr
BuildRequires: R-stringr
BuildRequires: R-utf8
BuildRequires: R-farver
BuildRequires: R-labeling
BuildRequires: R-RColorBrewer
BuildRequires: R-viridisLite
BuildRequires: R-stringi
BuildRequires: R-pkgconfig
Suggests: R-coda
Suggests: R-Rtsne
Suggests: R-ape
Suggests: R-Racmacs
Suggests: R-vegan
Suggests: R-umap
Suggests: R-igraph
Suggests: R-rgl
Suggests: R-scales
Suggests: R-ggrepel
Suggests: R-plotly
Suggests: R-gridExtra
Suggests: R-covr
Suggests: R-knitr
Suggests: R-rmarkdown
Suggests: R-testthat
%description
A robust implementation of Topolow algorithm. It embeds objects into a
low-dimensional Euclidean space from a matrix of pairwise
dissimilarities, even when the data do not satisfy metric or Euclidean
axioms. The package is particularly well-suited for sparse, incomplete,
and censored (thresholded) datasets such as antigenic relationships.
The core is a physics-inspired, gradient-free optimization framework
that models objects as particles in a physical system, where observed
dissimilarities define spring rest lengths and unobserved pairs exert
repulsive forces. The package also provides functions specific to
antigenic mapping to transform cross-reactivity and binding affinity
measurements into accurate spatial representations in a phenotype
space. Key features include: * Robust Embedding from Sparse Data:
Effectively creates complete and consistent maps (in optimal
dimensions) even with high proportions of missing data (e.g., >95%). *
Physics-Inspired Optimization: Models objects (e.g., antigens,
landmarks) as particles connected by springs (for measured
dissimilarities) and subject to repulsive forces (for missing
dissimilarities), and simulates the physical system using laws of
mechanics, reducing the need for complex gradient computations. *
Automatic Dimensionality Detection: Employs a likelihood-based approach
to determine the optimal number of dimensions for the embedding/map,
avoiding distortions common in methods with fixed low dimensions. *
Noise and Bias Reduction: Naturally mitigates experimental noise and
bias through its network-based, error-dampening mechanism. * Antigenic
Velocity Calculation (for antigenic data): Introduces and quantifies
"antigenic velocity," a vector that describes the rate and direction of
antigenic drift for each pathogen isolate. This can help identify
cluster transitions and potential lineage replacements. * Broad
Applicability: Analyzes data from various objects that their
dissimilarity may be of interest, ranging from complex biological
measurements such as continuous and relational phenotypes,
antibody-antigen interactions, and protein folding to abstract
concepts, such as customer perception of different brands. Methods are
described in the context of bioinformatics applications in Arhami and
Rohani (2025a) <doi:10.1093/bioinformatics/btaf372>, and mathematical
proofs and Euclidean embedding details are in Arhami and Rohani (2025b)
<doi:10.48550/arXiv.2508.01733>.
%prep
%setup -q -c -n %{packname}
# the next line is needed, because we build without --clean in between two packages
rm -rf ~/.R
%build
%install
mkdir -p %{buildroot}%{rlibdir}
%{_bindir}/R CMD INSTALL -l %{buildroot}%{rlibdir} %{packname}
test -d %{packname}/src && (cd %{packname}/src; rm -f *.o *.so)
rm -f %{buildroot}%{rlibdir}/R.css
%fdupes -s %{buildroot}%{rlibdir}
#%%check
#%%{_bindir}/R CMD check %%{packname}
%files
%dir %{rlibdir}/%{packname}
%doc %{rlibdir}/%{packname}/DESCRIPTION
%{rlibdir}/%{packname}/INDEX
%license %{rlibdir}/%{packname}/LICENSE
%{rlibdir}/%{packname}/Meta
%{rlibdir}/%{packname}/NAMESPACE
%doc %{rlibdir}/%{packname}/NEWS.md
%{rlibdir}/%{packname}/R
%{rlibdir}/%{packname}/WORDLIST
%{rlibdir}/%{packname}/data
%{rlibdir}/%{packname}/doc
%{rlibdir}/%{packname}/extdata
%doc %{rlibdir}/%{packname}/help
%doc %{rlibdir}/%{packname}/html
%{rlibdir}/%{packname}/scripts
%changelog