From eb5a61bf4457c07346a7c7ecc38589f6bc40298d Mon Sep 17 00:00:00 2001
From: Julien Henry <julien.henry@inrae.fr>
Date: Mon, 4 Sep 2023 17:52:20 +0200
Subject: [PATCH 01/13] small fix to comply to new CRAN standards

---
 R/kernels.R | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/R/kernels.R b/R/kernels.R
index 0283c62..6e9561f 100644
--- a/R/kernels.R
+++ b/R/kernels.R
@@ -188,7 +188,7 @@ phylogenetic <- function(X, method = c("wunifrac", "unifrac"),
   	stop("'phylogenetic.tree' is required when computing a 'phylogenetic' kernel.", 
   	     call. = FALSE)
   }
-  if (!class(phylogenetic.tree) == "phylo") {
+  if (!inherits(phylogenetic.tree, "phylo")) {
   	stop("'phylogenetic.tree' should be an instance of 'phylo-class' as defined",
   	     " in the ape-package.", call. = FALSE)
   }
-- 
GitLab


From 96af33bbec346fa6eb2203cb825f9a1606e9d6e0 Mon Sep 17 00:00:00 2001
From: Julien Henry <julien.henry@inrae.fr>
Date: Mon, 4 Sep 2023 17:54:52 +0200
Subject: [PATCH 02/13] added rmardown to imports in NAMESPACE

---
 NAMESPACE | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/NAMESPACE b/NAMESPACE
index b56c714..21bf50d 100755
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -1,5 +1,5 @@
 
-import(mixOmics, ggplot2, reticulate)
+import(mixOmics, ggplot2, reticulate, markdown)
 
 importFrom("utils", "browseURL")
 
@@ -35,4 +35,4 @@ select.features,
 center.scale
 )
 
-S3method(plot, kernel.pca)
\ No newline at end of file
+S3method(plot, kernel.pca)
-- 
GitLab


From ed23df87b8d1c480375592cad7e66111dd08bf08 Mon Sep 17 00:00:00 2001
From: Julien Henry <julien.henry@inrae.fr>
Date: Mon, 4 Sep 2023 17:55:54 +0200
Subject: [PATCH 03/13] updated NEWS to comply to new CRAN standards

---
 NEWS    | 41 -----------------------------------------
 NEWS.md | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 33 insertions(+), 41 deletions(-)
 delete mode 100644 NEWS
 create mode 100644 NEWS.md

diff --git a/NEWS b/NEWS
deleted file mode 100644
index 04b6414..0000000
--- a/NEWS
+++ /dev/null
@@ -1,41 +0,0 @@
-********************************************************************************
-mixKernel 0.8 [2022-01-13]
-Documentation:
-  improved documentation and add installation instructions
-
-********************************************************************************
-mixKernel 0.7 [2021-06-15]
-Fixed bugs:
-  fix a compatibility bug of the PCA object read by mixOmics
-
-********************************************************************************
-mixKernel 0.6 [2021-05-17]
-Fixed bugs:
-  improve mixKernel and SOMbrero compatibility
-
-********************************************************************************
-mixKernel 0.5 [2021-03-01]
-New function:
-  the select.features function has been added. This function replace the ukfs function
-  and provides a supervised feature selection method based on the kernel framwork 
-
-********************************************************************************
-mixKernel 0.4 [2020-02-20]
-New function:
-  the ukfs function has been added. This function aims at selecting relevant 
-  variables using unsupervised kernel method
-
-********************************************************************************
-mixKernel 0.3 [2018-11-26]
-Fixed bugs:
-  fix a bug in kernel.pca.permute with duplicated block variables (reported by Devin Leopold)
-
-********************************************************************************
-mixKernel 0.2 [2017-10-17]
-New options:
-  Additional kernels          : gaussian.radial.basis, poisson
-  
-
-*******************************************************************************
-mixKernel 0.1 [2017-05-18]
-Initial release
\ No newline at end of file
diff --git a/NEWS.md b/NEWS.md
new file mode 100644
index 0000000..3ddf36f
--- /dev/null
+++ b/NEWS.md
@@ -0,0 +1,33 @@
+# Version 0.8 [2022-01-13]
+
+* improved documentation and add installation instructions
+
+# Version 0.7 [2021-06-15]
+
+* fix a compatibility bug of the PCA object read by mixOmics
+
+# Version 0.6 [2021-05-17]
+
+* improve mixKernel and SOMbrero compatibility
+
+# Version 0.5 [2021-03-01]
+
+* the select.features function has been added. This function replace the ukfs function
+and provides a supervised feature selection method based on the kernel framwork 
+
+# Version 0.4 [2020-02-20]
+
+* the ukfs function has been added. This function aims at selecting relevant 
+variables using unsupervised kernel method
+
+# Version 0.3 [2018-11-26]
+
+* fix a bug in kernel.pca.permute with duplicated block variables (reported by Devin Leopold)
+
+# Version 0.2 [2017-10-17]
+
+* Additional kernels: gaussian.radial.basis, poisson
+
+# Version 0.1 [2017-05-18]
+
+* Initial release
\ No newline at end of file
-- 
GitLab


From 92c3e3dc88a40d38178fd8d9350db01137391266 Mon Sep 17 00:00:00 2001
From: Julien Henry <julien.henry@inrae.fr>
Date: Mon, 4 Sep 2023 17:56:40 +0200
Subject: [PATCH 04/13] updated CITATION to comply to new CRAN standards

---
 inst/CITATION | 49 +++++++++++++++++++++++++------------------------
 1 file changed, 25 insertions(+), 24 deletions(-)

diff --git a/inst/CITATION b/inst/CITATION
index 01f9030..758a0fc 100644
--- a/inst/CITATION
+++ b/inst/CITATION
@@ -3,37 +3,38 @@ citHeader("To cite the 'mixKernel' package in publications, use:")
 year = sub('.*(2[[:digit:]]{3})-.*', '\\1', meta$Date, perl = TRUE)
 vers = paste('R package version', meta$Version)
 
-citEntry(
-  entry = 'manual',
-  title = paste('mixKernel:', meta$Title),
+bibentry(
+  bibtype = "Manual",
+  textVersion = paste('Mariette J., Brouard C., Flamary R., Vialaneix N. (', year, ') mixKernel: ', meta$Title, '. ', vers, '.', sep = ''),
   author = as.person(meta$Author),
+  title = paste('mixKernel:', meta$Title),
   year = year,
-  note = vers,
-  textVersion = paste('Mariette J., Brouard C., Flamary R., Vialaneix N. (', year, ') mixKernel: ', meta$Title, '. ', vers, '.', sep = '')
+  note = vers
 )
 
-citEntry(
-  entry = 'article',
-  title = 'Unsupervised multiple kernel learning for heterogeneous data integration',
-  author = personList(as.person("Jerome Mariette"), as.person("Nathalie Villa-Vialaneix")),
-  journal = 'Bioinformatics',
-  year = 2018,
-  volume = '34',
-  issue = '6',
-  pages = '1009-1015',
+bibentry(
+  bibtype = "Article",
   textVersion = paste('Mariette, J. and Villa-Vialaneix, N. (2017)',
                       'Unsupervised multiple kernel learning for heterogeneous data integration.',
-                      'Bioinformatics, 34(6): 1009-1015.')
+                      'Bioinformatics, 34(6): 1009-1015.'),
+  author = "Jerome Mariette and Nathalie Villa-Vialaneix",
+  title = "Unsupervised multiple kernel learning for heterogeneous data integration",
+  journal = "Bioinformatics",
+  year = "2018",
+  volume = "34",
+  issue = "6", 
+  pages = "1009-1015",
 )
 
-citEntry(
-  entry = 'article',
-  title = 'Feature selection for kernel methods in systems biology',
-  author = personList(as.person("Celine Brouard"), as.person("Jerome Mariette"), as.person("Remi Flamary"), as.person("Nathalie Vialaneix")),
-  journal = 'NAR Genomics and Bioinformatics',
-  year = 2022,
-  note = 'Forthcoming',
+bibentry(
+  bibtype = "Article",
   textVersion = paste('Brouard, C., Mariette, J., Flamary, R. and Vialaneix, N. (2022)',
                       'Feature selection for kernel methods in systems biology.',
-                      'NAR Genomics and Bioinformatics. Forthcoming.')
-)
\ No newline at end of file
+                      'NAR Genomics and Bioinformatics. Forthcoming.'),
+  author = "Celine Brouard, Jerome Mariette, Remi Flamary and Nathalie Vialaneix",
+  title = "Feature selection for kernel methods in systems biology",
+  journal = "NAR Genomics and Bioinformatics",
+  year = "2022",
+  note = 'Forthcoming'
+)
+
-- 
GitLab


From 23e09fbac5cf933327fe873c84d167c6378936c5 Mon Sep 17 00:00:00 2001
From: Julien Henry <julien.henry@inrae.fr>
Date: Tue, 5 Sep 2023 09:21:35 +0200
Subject: [PATCH 05/13] updated citation

---
 inst/CITATION          | 4 +++-
 man/select.features.Rd | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/inst/CITATION b/inst/CITATION
index 758a0fc..beb2cab 100644
--- a/inst/CITATION
+++ b/inst/CITATION
@@ -35,6 +35,8 @@ bibentry(
   title = "Feature selection for kernel methods in systems biology",
   journal = "NAR Genomics and Bioinformatics",
   year = "2022",
-  note = 'Forthcoming'
+  volume = "4",
+  issue = "1",
+  doi = "10.1093/nargab/lqac014"
 )
 
diff --git a/man/select.features.Rd b/man/select.features.Rd
index b93032e..d6a243b 100644
--- a/man/select.features.Rd
+++ b/man/select.features.Rd
@@ -55,7 +55,7 @@ the distorsion and the influence of the graph. Default: \code{1}.}
 \references{
 Brouard C., Mariette J., Flamary R. and Vialaneix N. (2022). Feature selection
 for kernel methods in systems biology. \emph{NAR Genomics and Bioinformatics},
-\emph{Forthcoming}.
+4(1), doi: 10.1093/nargab/lqac014.
 }
 
 \author{Celine Brouard <celine.brouard@inrae.fr>
-- 
GitLab


From 81d6676fbe583457e41fb544bee973b026eb6404 Mon Sep 17 00:00:00 2001
From: Julien Henry <julien.henry@inrae.fr>
Date: Wed, 6 Sep 2023 18:33:19 +0200
Subject: [PATCH 06/13] switched to roxygen documentation

---
 DESCRIPTION                  |   1 +
 NAMESPACE                    |  71 +++++++++++-------------
 R/TARAoceans.R               |  49 +++++++++++++++++
 R/center.scale.R             |  43 +++++++--------
 R/cim.kernel.R               |  73 +++++++++++++++++--------
 R/combine.kernels.R          |  79 +++++++++++++++++++--------
 R/compute.kernel.R           |  83 ++++++++++++++++++++--------
 R/kernel.pca.R               |  54 ++++++++++--------
 R/kernel.pca.permute.R       |  72 ++++++++++++++++--------
 R/mixKernel-package.R        |  17 ++++++
 R/plotVar.kernel.pca.R       |  59 ++++++++++++--------
 R/select.features.R          |  88 ++++++++++++++++++++++--------
 R/user.guide.R               |  49 +++++++++--------
 man/TARAoceans.Rd            |  58 ++++++++++----------
 man/center.scale.Rd          |  33 ++++++-----
 man/cim.kernel.Rd            |  66 ++++++++++++----------
 man/combine.kernels.Rd       |  76 ++++++++++++++------------
 man/compute.kernel.Rd        |  74 ++++++++++++-------------
 man/kernel.pca.Rd            |  41 +++++++-------
 man/kernel.pca.permute.Rd    |  58 ++++++++++++--------
 man/mixKernel.users.guide.Rd |  27 +++++----
 man/plotVar.kernel.pca.Rd    |  48 +++++++++-------
 man/select.features.Rd       | 103 ++++++++++++++++++++---------------
 23 files changed, 810 insertions(+), 512 deletions(-)
 mode change 100755 => 100644 NAMESPACE
 create mode 100644 R/TARAoceans.R
 create mode 100644 R/mixKernel-package.R

diff --git a/DESCRIPTION b/DESCRIPTION
index 5a0a9b9..41c4bd3 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -42,3 +42,4 @@ Config/reticulate:
       list(package = "sklearn", pip = TRUE)
     )
   )
+RoxygenNote: 7.2.3
diff --git a/NAMESPACE b/NAMESPACE
old mode 100755
new mode 100644
index 21bf50d..41da812
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -1,38 +1,33 @@
-
-import(mixOmics, ggplot2, reticulate, markdown)
-
-importFrom("utils", "browseURL")
-
-importFrom("methods", "is")
-
-importFrom("graphics", "barplot")
-
-importFrom("phyloseq", "otu_table", "phyloseq", "distance")
-
-importFrom("vegan", "vegdist")
-
-importFrom("corrplot", "corrplot")
-
-importFrom("psych", "tr")
-
-importFrom("stats", "reorder", "quantile", "median", "as.dist")
-
-importFrom("quadprog", "solve.QP")
-
-importFrom("LDRTools", "Pdist", "O2P")
-
-importFrom("Matrix", "forceSymmetric")
-
-export(
-cim.kernel,
-combine.kernels,
-compute.kernel,
-kernel.pca.permute,
-kernel.pca,
-mixKernel.users.guide,
-plotVar.kernel.pca,
-select.features,
-center.scale
-)
-
-S3method(plot, kernel.pca)
+# Generated by roxygen2: do not edit by hand
+
+S3method(plot,kernel.pca)
+export(center.scale)
+export(cim.kernel)
+export(combine.kernels)
+export(compute.kernel)
+export(kernel.pca)
+export(kernel.pca.permute)
+export(mixKernel.users.guide)
+export(plotVar.kernel.pca)
+export(select.features)
+import(ggplot2)
+import(markdown)
+import(mixOmics)
+import(reticulate)
+importFrom(LDRTools,O2P)
+importFrom(LDRTools,Pdist)
+importFrom(Matrix,forceSymmetric)
+importFrom(corrplot,corrplot)
+importFrom(graphics,barplot)
+importFrom(methods,is)
+importFrom(phyloseq,distance)
+importFrom(phyloseq,otu_table)
+importFrom(phyloseq,phyloseq)
+importFrom(psych,tr)
+importFrom(quadprog,solve.QP)
+importFrom(stats,as.dist)
+importFrom(stats,median)
+importFrom(stats,quantile)
+importFrom(stats,reorder)
+importFrom(utils,browseURL)
+importFrom(vegan,vegdist)
diff --git a/R/TARAoceans.R b/R/TARAoceans.R
new file mode 100644
index 0000000..d5a6ec1
--- /dev/null
+++ b/R/TARAoceans.R
@@ -0,0 +1,49 @@
+#' TARA ocean microbiome data
+#'
+#' The TARA Oceans expedition facilitated the study of plankton communities by 
+#' providing oceans metagenomic data combined with environmental measures to the 
+#' scientific community. This dataset focuses on 139 prokaryotic-enriched samples 
+#' collected from 68 stations and spread across three depth layers: the surface 
+#' (SRF), the deep chlorophyll maximum (DCM) layer and the mesopelagic (MES) zones. 
+#' Samples were located in height different oceans or seas: Indian Ocean (IO), 
+#' Mediterranean Sea (MS), North Atlantic Ocean (NAO), North Pacific Ocean (NPO), 
+#' Red Sea (RS), South Atlantic Ocean (SAO), South Pacific Ocean (SPO) and South 
+#' Ocean (SO). Here, only a subset of the original data is provided (1\% of the 
+#' 35,650 prokaryotic operational taxonomic units (OTUs) and of the 39,246 
+#' bacterial genes (NOGs) (selected at random).
+#'
+#' @usage data(TARAoceans)
+#'
+#' @format A list containing the following components:
+#' \describe{
+#'   \item{\code{phychem}}{data matrix with 139 rows and 22 columns. Each row 
+#'     represents a sample and each column an environmental variable.}
+#'   \item{\code{pro.phylo}}{data matrix with 139 rows (samples) and 356 columns
+#'     (prokaryotic OTUs).}
+#'   \item{\code{taxonomy}}{data matrix with 356 rows (prokaryotic OTUs) and 6 
+#'     columns indicating the taxonomy of each OTU.}
+#'   \item{\code{phylogenetic.tree}}{a phylo object (see package 'ape') 
+#'     representing the prokaryotic OTUs phylogenetic tree.}
+#'   \item{\code{pro.NOGs}}{data matrix with 139 rows (samples) and 638 columns 
+#'     (NOGs).}
+#'   \item{\code{sample}}{a list containing three following entries (all three 
+#'     are character vectors): \code{name} (sample name), \code{ocean} (oceanic 
+#'    region of the sample) and \code{depth} (sample depth).}
+#' }
+#' 
+#' @source The raw data were downloaded from \url{http://ocean-microbiome.embl.de/companion.html}.
+#' 
+#' @keywords datasets
+#' 
+#' @references Sunagawa S., Coelho L.P., Chaffron S., Kultima J.R., Labadie K., Salazar F., 
+#' Djahanschiri B., Zeller G., Mende D.R., Alberti A., Cornejo-Castillo F., 
+#' Costea P.I., Cruaud C., d'Oviedo F., Engelen S., Ferrera I., Gasol J., Guidi L.,
+#' Hildebrand F., Kokoszka F., Lepoivre C., Lima-Mendez G., Poulain J., Poulos B., 
+#' Royo-Llonch M., Sarmento H., Vieira-Silva S., Dimier C., Picheral M., Searson 
+#' S., Kandels-Lewis S., \emph{Tara} Oceans coordinators, Bowler C., de Vargas C.,
+#' Gorsky G., Grimsley N., Hingamp P., Iudicone D., Jaillon O., Not F., Ogata H., 
+#' Pesant S., Speich S., Stemmann L., Sullivan M., Weissenbach J., Wincker P., 
+#' Karsenti E., Raes J., Acinas S. and Bork P. (2015). Structure and function of 
+#' the global ocean microbiome. \emph{Science}, \bold{348}, 6237.
+#' 
+"TARAoceans"
\ No newline at end of file
diff --git a/R/center.scale.R b/R/center.scale.R
index be562de..e757063 100644
--- a/R/center.scale.R
+++ b/R/center.scale.R
@@ -1,27 +1,24 @@
-#############################################################################################################
-# Author :
-#   Jerome Mariette, MIAT, Universite de Toulouse, INRA 31326 Castanet-Tolosan France
-#   Nathalie Vialaneix, MIAT, Universite de Toulouse, INRA 31326 Castanet-Tolosan France
-#
-# Copyright (C) 2017
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#############################################################################################################
-
 if(getRversion() >= "2.15.1")  utils::globalVariables(c("centerscalepy"))
-
+#' Center and scale
+#' 
+#' Center and scale a dataset.
+#'
+#' @param X a numeric matrix (or data frame) to center and scaled.
+#' \code{NA}s not allowed.
+#' 
+#' @return \code{center.scale} returns a centered and scaled matrix.
+#' 
+#' @author Celine Brouard <celine.brouard@@inrae.fr>
+#' Jerome Mariette <jerome.mariette@@inrae.fr>
+#' Nathalie Vialaneix <nathalie.vialaneix@@inrae.fr>
+#' @seealso \code{\link{compute.kernel}}, \code{\link{combine.kernels}}
+#' @export
+#' @examples
+#' data("nutrimouse")
+#' \dontrun{
+#'  nutrimouse.sc <- center.scale(nutrimouse$gene)
+#' }
+#' 
 center.scale <- function(X) {
 
   source_python(file.path(system.file(package = "mixKernel"), "python", "center_scale.py"))
diff --git a/R/cim.kernel.R b/R/cim.kernel.R
index 6328c07..cfdc185 100644
--- a/R/cim.kernel.R
+++ b/R/cim.kernel.R
@@ -1,26 +1,53 @@
-#############################################################################################################
-# Author :
-#   Jerome Mariette, MIAT, Universite de Toulouse, INRA 31326 Castanet-Tolosan France
-#   Nathalie Vialaneix, MIAT, Universite de Toulouse, INRA 31326 Castanet-Tolosan France
-#
-# Copyright (C) 2017
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#############################################################################################################
-
-
+#' Compute and display similarities between multiple kernels
+#' 
+#' Compute cosine from Frobenius norm between kernels and display the 
+#' corresponding correlation plot.
+#'
+#' @details
+#' The displayed similarities are the kernel generalization of the 
+#' RV-coefficient described in Lavit \emph{et al.}, 1994.
+#' 
+#' The plot is displayed using the \code{\link[corrplot]{corrplot}} package. Seven 
+#' visualization methods are implemented: \code{"circle"} (default), 
+#' \code{"square"}, \code{"number"}, \code{"pie"}, \code{"shade"} and 
+#' \code{"color"}. Circle and square areas are proportional to the absolute value
+#' of corresponding similarities coefficients.
+#'
+#' @param ... list of kernels (called 'blocks') computed on different datasets and
+#' measured on the same samples.
+#' @param scale boleean. If \code{scale = TRUE}, each block is standardized to zero
+#' mean and unit variance and cosine normalization is performed on the kernel.
+#' Default: \code{TRUE}.
+#' @param method character. The visualization method to be used. Currently, seven
+#' methods are supported (see Details).
+#' 
+#' @return \code{cim.kernel} returns a matrix containing the cosine from Frobenius norm 
+#' between kernels.
+#' 
+#' @author Jerome Mariette <jerome.mariette@@inrae.fr>
+#' Nathalie Vialaneix <nathalie.vialaneix@@inrae.fr>
+#' @references Lavit C., Escoufier Y., Sabatier R. and Traissac P. (1994). The ACT (STATIS
+#' method). \emph{Computational Statistics and Data Analysis}, \bold{18}(1), 
+#' 97-119.
+#' 
+#' Mariette J. and Villa-Vialaneix N. (2018). Unsupervised multiple kernel learning
+#' for heterogeneous data integration. \emph{Bioinformatics}, \bold{34}(6), 1009-1015.
+#' @seealso \code{\link{compute.kernel}}
+#' @export
+#' @examples
+#' data(TARAoceans)
+#' 
+#' # compute one kernel per dataset
+#' phychem.kernel <- compute.kernel(TARAoceans$phychem, kernel.func = "linear")
+#' pro.phylo.kernel <- compute.kernel(TARAoceans$pro.phylo, kernel.func = "abundance")
+#' pro.NOGs.kernel <- compute.kernel(TARAoceans$pro.NOGs, kernel.func = "abundance")
+#' 
+#' # display similarities between kernels
+#' cim.kernel(phychem = phychem.kernel,
+#'            pro.phylo = pro.phylo.kernel,
+#'            pro.NOGs = pro.NOGs.kernel, 
+#'            method = "square")
+#' 
 cim.kernel <- function(..., scale = TRUE, 
                        method = c("circle", "square", "number", 
                                   "shade", "color", "pie")) {
diff --git a/R/combine.kernels.R b/R/combine.kernels.R
index a471d09..6e04f62 100644
--- a/R/combine.kernels.R
+++ b/R/combine.kernels.R
@@ -1,26 +1,59 @@
-#############################################################################################################
-# Author :
-#   Jerome Mariette, MIAT, Universite de Toulouse, INRA 31326 Castanet-Tolosan France
-#   Nathalie Vialaneix, MIAT, Universite de Toulouse, INRA 31326 Castanet-Tolosan France
-#
-# Copyright (C) 2017
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#############################################################################################################
-
-
+#' Combine multiple kernels into a meta-kernel
+#' 
+#' Compute multiple kernels into a single meta-kernel
+#'
+#' @details
+#' The arguments \code{method} allows to specify the Unsupervised Multiple
+#' Kernel Learning (UMKL) method to use: \itemize{
+#'   \item{\code{"STATIS-UMKL"}}{: combines input kernels into the best consensus 
+#'     of all kernels;}
+#'   \item \code{"full-UMKL"}{: computes a kernel that minimizes the distortion 
+#'     between the meta-kernel and the k-NN graphs obtained from all input kernels;}
+#'   \item \code{"sparse-UMKL"}{: a sparse variant of the \code{"full-UMKL"} 
+#'     approach.}}
+#'
+#' @param ... list of kernels (called 'blocks') computed on different datasets and
+#' measured on the same samples.
+#' @param scale boleean. If \code{scale = TRUE}, each block is standardized to zero
+#' mean and unit variance and cosine normalization is performed on the kernel.
+#' Default: \code{TRUE}.
+#' @param method character. Which method should be used to compute the meta-kernel. 
+#' Default: \code{"full-UMKL"}.
+#' @param knn integer. If \code{method = "sparse-UMKL"} or 
+#' \code{method = "full-UMKL"}, number of neighbors used to get a proxy of the 
+#' local topology of the datasets from each kernel. Default: \code{5}.
+#' @param rho integer. Parameters for the augmented Lagrangian method. Default: 
+#' \code{20}.
+#' 
+#' @return \code{combine.kernels} returns an object of classes \code{"kernel"} and 
+#' \code{"metaKernel"}, a list that contains the following components: \itemize{
+#'   \item{kernel}{: the computed meta-kernel matrix;}
+#'   \item{X}{: the dataset from which the kernel has been computed, as given by
+#'     the function \code{\link{compute.kernel}}. Can be \code{NULL} if a kernel
+#'     matrix was passed to this function;}
+#'   \item{weights}{: a vector containing the weights used to combine the kernels.} 
+#' }
+#' 
+#' @author Jerome Mariette <jerome.mariette@@inrae.fr>
+#' Nathalie Vialaneix <nathalie.vialaneix@@inrae.fr>
+#' @references Mariette J. and Villa-Vialaneix N. (2018). Unsupervised multiple kernel learning for
+#' heterogeneous data integration . \emph{Bioinformatics}, \bold{34}(6), 1009-1015.
+#' @seealso \code{\link{compute.kernel}}, \code{\link{kernel.pca}}
+#' @export
+#' @examples
+#' data(TARAoceans)
+#' 
+#' # compute one kernel per dataset
+#' phychem.kernel <- compute.kernel(TARAoceans$phychem, kernel.func = "linear")
+#' pro.phylo.kernel <- compute.kernel(TARAoceans$pro.phylo, kernel.func = "abundance")
+#' pro.NOGs.kernel <- compute.kernel(TARAoceans$pro.NOGs, kernel.func = "abundance")
+#' 
+#' # compute the meta kernel
+#' meta.kernel <- combine.kernels(phychem = phychem.kernel,
+#'                                pro.phylo = pro.phylo.kernel,
+#'                                pro.NOGs = pro.NOGs.kernel, 
+#'                                method = "full-UMKL")
+#' 
 combine.kernels <- function(..., scale = TRUE, 
                             method = c("full-UMKL", "STATIS-UMKL", "sparse-UMKL"),
                             knn = 5, rho = 20) {
diff --git a/R/compute.kernel.R b/R/compute.kernel.R
index 38c712b..65a7f8c 100644
--- a/R/compute.kernel.R
+++ b/R/compute.kernel.R
@@ -1,25 +1,64 @@
-#############################################################################################################
-# Author :
-#   Jerome Mariette, MIAT, Universite de Toulouse, INRA 31326 Castanet-Tolosan France
-#   Nathalie Vialaneix, MIAT, Universite de Toulouse, INRA 31326 Castanet-Tolosan France
-#
-# Copyright (C) 2017
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#############################################################################################################
-
+#' Compute a kernel
+#' 
+#' Compute a kernel from a given data matrix.
+#'
+#' @param X a numeric matrix (or data frame) used to compute the kernel. 
+#' \code{NA}s not allowed.
+#' @param kernel.func the kernel function to use. This parameter can be set to any
+#' user defined kernel function. Widely used kernel functions are pre-implemented,
+#' that can be used by setting \code{kernel.func} to one of the following strings:
+#' \code{"kidentity"}, \code{"abundance"}, \code{"linear"}, 
+#' \code{"gaussian.radial.basis"}, \code{"poisson"} or \code{"phylogenetic"}. 
+#' Default: \code{"linear"}.
+#' @param ... the kernel function arguments. Valid parameters for pre-implemented 
+#' kernels are: 
+#'   \itemize{
+#'     \item \code{phylogenetic.tree} (\code{"phylogenetic"}): an instance of 
+#'     phylo-class that contains a phylogenetic tree (required).
+#'     \item \code{scale} (\code{"linear"} or \code{"gaussian.radial.basis"}): 
+#'       logical. Should the variables be scaled to unit variance prior the kernel 
+#'     computation? Default: \code{TRUE}.
+#'     \item \code{sigma} (\code{"gaussian.radial.basis"}): double. The inverse 
+#'     kernel width used by \code{"gaussian.radial.basis"}.
+#'     \item \code{method} (\code{"phylogenetic"} or \code{"abundance"}): character.
+#'     Can be \code{"unifrac"} or \code{"wunifrac"} for \code{"phylogenetic"}. Which 
+#'     dissimilarity to use for \code{"abundance"}: one of \code{"bray"},
+#'     \code{"euclidean"}, \code{"canberra"}, \code{"manhattan"}, \code{"kulczynski"}, 
+#'     \code{"jaccard"}, \code{"gower"}, \code{"altGower"}, \code{"morisita"},
+#'     \code{"horn"}, \code{"mountford"}, \code{"raup"}, \code{"binomial"}, 
+#'     \code{"chao"} and \code{"cao"}.
+#'     \item \code{normalization} (\code{"poisson"}): character. Can be \code{"deseq"}
+#'     (more robust), \code{"mle"} (less robust) or \code{"quantile"}.}
+#' @param test.pos.semidef boleean. If \code{test.pos.semidef = TRUE}, the 
+#' resulting matrix is tested to be positive-semidefinite.
+#' 
+#' @return \code{compute.kernel} returns an object of classes \code{"kernel"}, a list that 
+#' contains the following components:
+#' \item{kernel}{: the computed kernel matrix.}
+#' \item{X}{: the original dataset. If \code{"kidentity"}, \code{X} is set to 
+#' \code{NULL}.}
+#' \item{kernel.func}{: the kernel function used.}
+#' \item{kernel.args}{: the arguments used to compute the kernel.} 
+#' 
+#' @author Jerome Mariette <jerome.mariette@@inrae.fr>
+#' Nathalie Vialaneix <nathalie.vialaneix@@inrae.fr>
+#' @references Lozupone C. and Knight R. (2005). UniFrac: a new phylogenetic method for 
+#' comparing microbial communities. \emph{Applied and Environmental Microbiology},
+#' \bold{71}(12), 8228-8235.
+#'
+#' Lozupone C., Hamady M., Kelley S.T. and Knight R. (2007). Quantitative and 
+#' qualitative beta diversity measures lead to different insights into factors that
+#' structure microbial communities. \emph{Applied and Environmental Microbiology}, 
+#' \bold{73}(5), 1576-1585.
+#' 
+#' Witten D. (2011). Classification and clustering of sequencing data using a 
+#' Poisson model. \emph{Annals of Applied Statistics}, \bold{5}(4), 2493-2518.
+#' @seealso \code{\link{combine.kernels}}, \code{\link{kernel.pca}}
+#' @export
+#' @examples
+#' data(TARAoceans)
+#' pro.NOGs.kernel <- compute.kernel(TARAoceans$pro.NOGs, kernel.func = "abundance")
+#' 
 compute.kernel <- function(X, kernel.func = "linear", ..., test.pos.semidef = FALSE) {
   
   #-- checking general input parameters --#
diff --git a/R/kernel.pca.R b/R/kernel.pca.R
index 745b969..bf8ee89 100644
--- a/R/kernel.pca.R
+++ b/R/kernel.pca.R
@@ -1,26 +1,34 @@
-#############################################################################################################
-# Author :
-#   Jerome Mariette, MIAT, Universite de Toulouse, INRA 31326 Castanet-Tolosan France
-#   Nathalie Vialaneix, MIAT, Universite de Toulouse, INRA 31326 Castanet-Tolosan France
-#
-# Copyright (C) 2017
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#############################################################################################################
-
-
+#' Kernel Principal Components Analysis
+#' 
+#' Performs a kernel PCA.
+#'
+#' @param K a kernel object obtained using either \code{compute.kernel} or
+#' \code{combine.kernels}.
+#' @param ncomp integer. Indicates the number of components to return..
+#' 
+#' @return \code{kernel.pca} returns an object of classes \code{"kernel.pca"} and 
+#' \code{"pca"}, which is a list containing the following entries: \itemize{
+#'   \item{ncomp}{: the number of principal components;}
+#'   \item{X}{: the input kernel matrix;} 
+#'   \item{kernel}{: the input kernel object provided by the user;}
+#'   \item{sdev}{: the singular values (square root of the eigenvalues);} 
+#'   \item{rotation}{: the matrix of variable loadings (\emph{i.e.}, a matrix whose
+#'                                                      columns contain the eigenvectors);}
+#'   \item{loadings}{: same as 'rotation' to keep the mixOmics spirit;}
+#'   \item{x}{: same as 'rotation' to keep the mixOmics spirit;}
+#' }
+#' 
+#' @author Jerome Mariette <jerome.mariette@@inrae.fr>
+#' Nathalie Vialaneix <nathalie.vialaneix@@inrae.fr>
+#' @references Scholkopf B., Smola A. and Muller K.R. (1998) Nonlinear component analysis as a
+#' kernel eigenvalue problem. \emph{Neural Computation}, \bold{10}, 1299-1319.
+#' @seealso \code{\link{compute.kernel}}, \code{\link{combine.kernels}}
+#' @export
+#' @examples
+#' data(TARAoceans)
+#' phychem.kernel <- compute.kernel(TARAoceans$phychem, kernel.func = "linear")
+#' kernel.pca.result <- kernel.pca(phychem.kernel, ncomp = 3)
+#' 
 kernel.pca <- function(K, ncomp = nrow(K$kernel)) {
   
   #-- checking general input parameters --#
diff --git a/R/kernel.pca.permute.R b/R/kernel.pca.permute.R
index 98e9cc1..01ab3d2 100644
--- a/R/kernel.pca.permute.R
+++ b/R/kernel.pca.permute.R
@@ -1,26 +1,52 @@
-#############################################################################################################
-# Author :
-#   Jerome Mariette, MIAT, Universite de Toulouse, INRA 31326 Castanet-Tolosan France
-#   Nathalie Vialaneix, MIAT, Universite de Toulouse, INRA 31326 Castanet-Tolosan France
-#
-# Copyright (C) 2017
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#############################################################################################################
-
-
+#' Assess variable importance
+#' 
+#' Assess importance of variables on a given PC component by computing 
+#' the Crone-Crosby distance between original sample positions and sample positions 
+#' obtain by a random permutation of the variables.
+#'
+#' @details
+#' \code{plotVar.kernel.pca} produces a barplot for each block. The variables for which the 
+#' importance has been computed with \code{\link{kernel.pca.permute}} are 
+#' displayed. The representation is limited to the \code{ndisplay} most important 
+#' variables.
+#'
+#' @param kpca.result a kernel.pca object returned by the \code{\link{kernel.pca}}
+#' function.
+#' @param ncomp integer. Number of KPCA components used to compute the importance. 
+#' Default: \code{1}.
+#' @param ... list of character vectors. The parameter name must be the kernel name 
+#' to be considered for permutation of variables. Provided vectors length has to be 
+#' equal to the number of variables of the input dataset. A kernel is performed on 
+#' each unique variables values. Crone-Crosby distances are computed on each KPCA 
+#' performed on resulted kernels or meta-kernels and can be displayed using the 
+#' \code{\link{plotVar.kernel.pca}}.
+#' @param directory character. To limit computational burden, this argument allows
+#' to store / read temporary computed kernels.
+#' 
+#' @return \code{kernel.pca.permute} returns a copy of the input \code{kpca.result}
+#' results and add values in the three entries: \code{cc.distances}, 
+#' \code{cc.variables} and \code{cc.blocks}.
+#' 
+#' @author Jerome Mariette <jerome.mariette@@inrae.fr>
+#' Nathalie Vialaneix <nathalie.vialaneix@@inrae.fr>
+#' @references Mariette J. and Villa-Vialaneix N. (2018). Unsupervised multiple kernel learning
+#' for heterogeneous data integration. \emph{Bioinformatics}, \bold{34}(6), 1009-1015.
+#' 
+#' Crone L. and Crosby D. (1995). Statistical applications of a metric on subspaces
+#' to satellite meteorology. \emph{Technometrics}, \bold{37}(3), 324-328.
+#' @seealso \code{\link{compute.kernel}}, \code{\link{kernel.pca}}
+#' @export
+#' @examples
+#' data(TARAoceans)
+#' 
+#' # compute one kernel for the psychem dataset
+#' phychem.kernel <- compute.kernel(TARAoceans$phychem, kernel.func = "linear")
+#' # perform a KPCA
+#' kernel.pca.result <- kernel.pca(phychem.kernel)
+#' 
+#' # compute importance for all variables in this kernel
+#' kernel.pca.result <- kernel.pca.permute(kernel.pca.result, phychem = colnames(TARAoceans$phychem))
+#' 
 kernel.pca.permute = function(kpca.result, ncomp = 1, ..., directory = NULL) {
   
   #-- checking general input parameters --#
diff --git a/R/mixKernel-package.R b/R/mixKernel-package.R
new file mode 100644
index 0000000..f617fef
--- /dev/null
+++ b/R/mixKernel-package.R
@@ -0,0 +1,17 @@
+#' @import mixOmics
+#' @import ggplot2
+#' @import reticulate
+#' @import markdown
+#' @importFrom utils browseURL
+#' @importFrom methods is
+#' @importFrom graphics barplot
+#' @importFrom phyloseq otu_table phyloseq distance
+#' @importFrom vegan vegdist
+#' @importFrom corrplot corrplot
+#' @importFrom psych tr
+#' @importFrom stats reorder quantile median as.dist
+#' @importFrom quadprog solve.QP
+#' @importFrom LDRTools Pdist O2P
+#' @importFrom Matrix forceSymmetric
+#' @exportS3Method plot kernel.pca
+NULL
\ No newline at end of file
diff --git a/R/plotVar.kernel.pca.R b/R/plotVar.kernel.pca.R
index 97fae13..53b6f56 100644
--- a/R/plotVar.kernel.pca.R
+++ b/R/plotVar.kernel.pca.R
@@ -1,25 +1,40 @@
-#############################################################################################################
-# Author :
-#   Jerome Mariette, MIAT, Universite de Toulouse, INRA 31326 Castanet-Tolosan France
-#   Nathalie Vialaneix, MIAT, Universite de Toulouse, INRA 31326 Castanet-Tolosan France
-#
-# Copyright (C) 2017
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#############################################################################################################
-
+#' Plot importance of variables in kernel PCA
+#' 
+#' Provides a representation of variable importance in kernel PCA.
+#'
+#' @details
+#' \code{plotVar.kernel.pca} produces a barplot for each block. The variables for which the 
+#' importance has been computed with \code{\link{kernel.pca.permute}} are 
+#' displayed. The representation is limited to the \code{ndisplay} most important 
+#' variables.
+#'
+#' @param object : a kernel.pca object returned by \code{\link{kernel.pca}}.
+#' @param blocks a numerical vector indicating the block variables to display.
+#' @param ndisplay integer. The number of important variables per blocks shown in 
+#' the representation. Default: \code{5}.
+#' @param ncol integer. Each block of variables is displayed in a separate 
+#' subfigure. \code{ncol} sets the number of columns for the global figure. 
+#' Default: \code{2}.
+#' @param ... external arguments.
+#' 
+#' @author Jerome Mariette <jerome.mariette@@inrae.fr>
+#' Nathalie Vialaneix <nathalie.vialaneix@@inrae.fr>
+#' @references Crone L. and Crosby D. (1995). Statistical applications of a metric on subspaces
+#' to satellite meteorology. \emph{Technometrics}, \bold{37}(3), 324-328.
+#' @seealso \code{\link{kernel.pca}}, \code{\link{kernel.pca.permute}}
+#' @export
+#' @examples
+#' data(TARAoceans)
+#' 
+#' # compute one kernel for the psychem dataset
+#' phychem.kernel <- compute.kernel(TARAoceans$phychem, kernel.func = "linear")
+#' # perform a KPCA
+#' kernel.pca.result <- kernel.pca(phychem.kernel)
+#' # compute importance for all variables in this kernel
+#' kernel.pca.result <- kernel.pca.permute(kernel.pca.result, phychem = colnames(TARAoceans$phychem))
+#' 
+#' \dontrun{plotVar.kernel.pca(kernel.pca.result, ndisplay = 10)}
+#' 
 plotVar.kernel.pca <- function(object, blocks = unique(object$cc.blocks), 
                                ndisplay = 5, ncol = 2, ...) {
   
diff --git a/R/select.features.R b/R/select.features.R
index e53653d..774ac20 100644
--- a/R/select.features.R
+++ b/R/select.features.R
@@ -1,28 +1,70 @@
-#############################################################################################################
-# Author :
-#   Jerome Mariette, MIAT, Universite de Toulouse, INRA 31326 Castanet-Tolosan France
-#   Nathalie Vialaneix, MIAT, Universite de Toulouse, INRA 31326 Castanet-Tolosan France
-#
-# Copyright (C) 2017
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#############################################################################################################
-
 if(getRversion() >= "2.15.1")  utils::globalVariables(c("ukfspy"))
 if(getRversion() >= "2.15.1")  utils::globalVariables(c("kokfspy"))
-
+#' Select important features
+#' 
+#' Select features using supervised or unsupervised kernel method. A 
+#' supervised feature selection method is performed if \code{Y} is provided.
+#'
+#' @param X a numeric matrix (or data frame) used to select variables. \code{NA}s not allowed.
+#' @param Y a numeric matrix (or data frame) used to select variables. \code{NA}s not allowed.
+#' @param kx.func the kernel function name to use on \code{X}. Widely used kernel
+#' functions are pre-implemented, and can be directly used by setting 
+#' \code{kx.func} to one of the following values: \code{"linear"}, 
+#' \code{"gaussian.radial.basis"} or \code{"bray"}. Default: \code{"linear"}. If 
+#' \code{Y} is provided, the kernel \code{"bray"} is not allowed.
+#' @param ky.func the kernel function name to use on \code{Y}. Available 
+#' kernels are: \code{"linear"}, and \code{"gaussian.radial.basis"}. Default: 
+#' \code{"linear"}. This value is ignored when \code{Y} is not provided.
+#' @param keepX the number of variables to select.
+#' @param method the method to use. Either an unsupervised variable selection
+#' method (\code{"kernel"}), a kernel PCA oriented variable selection method 
+#' (\code{"kpca"}) or a structure driven variable selection selection 
+#' (\code{"graph"}). Default: \code{"kernel"}.
+#' @param lambda the penalization parameter that controls the trade-off between the
+#' minimization of the distorsion and the sparsity of the solution parameter.
+#' @param n_components how many principal components should be used with method
+#' \code{"kpca"}. Required with method \code{"kpca"}. Default: \code{2}.
+#' @param Lg the Laplacian matrix of the graph representing relations between the 
+#' input dataset variables. Required with method \code{"graph"}.
+#' @param mu the penalization parameter that controls the trade-off between the
+#' the distorsion and the influence of the graph. Default: \code{1}.
+#' @param max_iter the maximum number of iterations. Default: \code{100}.
+#' @param nstep the number of values used for the regularization path. Default: \code{50}.
+#' @param ... the kernel function arguments. In particular \code{sigma}
+#' (\code{"gaussian.radial.basis"}): double. The inverse kernel width used by
+#' \code{"gaussian.radial.basis"}.
+#' 
+#' @return \code{ukfs} returns a vector of sorted selected features indexes.
+#' 
+#' @author Celine Brouard <celine.brouard@@inrae.fr>
+#' Jerome Mariette <jerome.mariette@@inrae.fr>
+#' Nathalie Vialaneix <nathalie.vialaneix@@inrae.fr>
+#' @references Brouard C., Mariette J., Flamary R. and Vialaneix N. (2022). Feature selection
+#' for kernel methods in systems biology. \emph{NAR Genomics and Bioinformatics},
+#' 4(1), doi: 10.1093/nargab/lqac014.
+#' @seealso \code{\link{compute.kernel}}
+#' @export select.features
+#' @examples
+#' ## These examples require the installation of python modules
+#' ## See installation instruction at: http://mixkernel.clementine.wf
+#'
+#' data("Koren.16S")
+#' \dontrun{
+#'  sf.res <- select.features(Koren.16S$data.raw, kx.func = "bray", lambda = 1,
+#'                            keepX = 40, nstep = 1)
+#'  colnames(Koren.16S$data.raw)[sf.res]
+#' }
+#'
+#' data("nutrimouse")
+#' \dontrun{
+#'  grb.func <- "gaussian.radial.basis"
+#'  genes <- center.scale(nutrimouse$gene)
+#'  lipids <- center.scale(nutrimouse$lipid)
+#'  sf.res <- select.features(genes, lipids, kx.func = grb.func, ky.func = grb.func,
+#'                            keepX = 40)
+#'  colnames(nutrimouse$gene)[sf.res]
+#' }
+#' 
 select.features <- function(X, Y=NULL, kx.func=c("linear", "gaussian.radial.basis", "bray"),
                             ky.func=c("linear", "gaussian.radial.basis"), keepX=NULL,
                             method=c("kernel", "kpca", "graph"),
diff --git a/R/user.guide.R b/R/user.guide.R
index 45d894c..0a1d446 100644
--- a/R/user.guide.R
+++ b/R/user.guide.R
@@ -1,25 +1,30 @@
-#############################################################################################################
-# Author :
-#   Jerome Mariette, MIAT, Universite de Toulouse, INRA 31326 Castanet-Tolosan France
-#   Nathalie Vialaneix, MIAT, Universite de Toulouse, INRA 31326 Castanet-Tolosan France
-#
-# Copyright (C) 2017
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#############################################################################################################
-
+#' View mixKernel User's Guide
+#' 
+#' Find the location of the mixKernel User's Guide and optionnaly opens it
+#'
+#' @param html logical. Should the document returned by the function be the
+#' compiled PDF or the Rmd source. Default to \code{TRUE}
+#' @param view logical. Should the document be opened using the default HTML
+#' viewer? Default to \code{html}. It has no effect if \code{html = FALSE}
+#' 
+#' @return Character string giving the file location. If \code{html = TRUE} and
+#' \code{view = TRUE}, the HTML document reader is started and the User's Guide
+#' is opened in it.
+#' 
+#' @details
+#' If the operating system is not Windows, then the HTML viewer used is that
+#' given by \code{Sys.getenv("R_BROWSER")}. The HTML viewer can be changed using
+#' \code{Sys.setenv(R_BROWSER = )}.
+#' 
+#' 
+#' @author Jerome Mariette <jerome.mariette@@inrae.fr>
+#' Nathalie Vialaneix <nathalie.vialaneix@@inrae.fr>
+#' @export
+#' @examples
+#' mixKernel.users.guide(view = FALSE)
+#' mixKernel.users.guide(html = FALSE)
+#' \dontrun{mixKernel.users.guide()}
+#' 
 mixKernel.users.guide <- function(html = TRUE, view = html) {
   if (html) {
     f <- system.file("doc", "mixKernelUsersGuide.html", package = "mixKernel")
diff --git a/man/TARAoceans.Rd b/man/TARAoceans.Rd
index 38949ae..0ed1695 100644
--- a/man/TARAoceans.Rd
+++ b/man/TARAoceans.Rd
@@ -1,10 +1,33 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/TARAoceans.R
+\docType{data}
 \name{TARAoceans}
 \alias{TARAoceans}
-
-\docType{data}
-
 \title{TARA ocean microbiome data}
-
+\format{
+A list containing the following components:
+\describe{
+  \item{\code{phychem}}{data matrix with 139 rows and 22 columns. Each row 
+    represents a sample and each column an environmental variable.}
+  \item{\code{pro.phylo}}{data matrix with 139 rows (samples) and 356 columns
+    (prokaryotic OTUs).}
+  \item{\code{taxonomy}}{data matrix with 356 rows (prokaryotic OTUs) and 6 
+    columns indicating the taxonomy of each OTU.}
+  \item{\code{phylogenetic.tree}}{a phylo object (see package 'ape') 
+    representing the prokaryotic OTUs phylogenetic tree.}
+  \item{\code{pro.NOGs}}{data matrix with 139 rows (samples) and 638 columns 
+    (NOGs).}
+  \item{\code{sample}}{a list containing three following entries (all three 
+    are character vectors): \code{name} (sample name), \code{ocean} (oceanic 
+   region of the sample) and \code{depth} (sample depth).}
+}
+}
+\source{
+The raw data were downloaded from \url{http://ocean-microbiome.embl.de/companion.html}.
+}
+\usage{
+data(TARAoceans)
+}
 \description{
 The TARA Oceans expedition facilitated the study of plankton communities by 
 providing oceans metagenomic data combined with environmental measures to the 
@@ -18,31 +41,7 @@ Ocean (SO). Here, only a subset of the original data is provided (1\% of the
 35,650 prokaryotic operational taxonomic units (OTUs) and of the 39,246 
 bacterial genes (NOGs) (selected at random).
 }
-
-\usage{data(TARAoceans)}
-
-\format{A list containing the following components:
-  \describe{
-    \item{\code{phychem}}{data matrix with 139 rows and 22 columns. Each row 
-    represents a sample and each column an environmental variable.}
-    \item{\code{pro.phylo}}{data matrix with 139 rows (samples) and 356 columns
-    (prokaryotic OTUs).}
-    \item{\code{taxonomy}}{data matrix with 356 rows (prokaryotic OTUs) and 6 
-    columns indicating the taxonomy of each OTU.}
-    \item{\code{phylogenetic.tree}}{a phylo object (see package 'ape') 
-    representing the prokaryotic OTUs phylogenetic tree.}
-    \item{\code{pro.NOGs}}{data matrix with 139 rows (samples) and 638 columns 
-    (NOGs).}
-    \item{\code{sample}}{a list containing three following entries (all three 
-    are character vectors): \code{name} (sample name), \code{ocean} (oceanic 
-    region of the sample) and \code{depth} (sample depth).}
-}}
-
-\source{
-The raw data were downloaded from \url{http://ocean-microbiome.embl.de/companion.html}.
-}
-
-\section{References}{
+\references{
 Sunagawa S., Coelho L.P., Chaffron S., Kultima J.R., Labadie K., Salazar F., 
 Djahanschiri B., Zeller G., Mende D.R., Alberti A., Cornejo-Castillo F., 
 Costea P.I., Cruaud C., d'Oviedo F., Engelen S., Ferrera I., Gasol J., Guidi L.,
@@ -54,5 +53,4 @@ Pesant S., Speich S., Stemmann L., Sullivan M., Weissenbach J., Wincker P.,
 Karsenti E., Raes J., Acinas S. and Bork P. (2015). Structure and function of 
 the global ocean microbiome. \emph{Science}, \bold{348}, 6237.
 }
-
 \keyword{datasets}
diff --git a/man/center.scale.Rd b/man/center.scale.Rd
index a6763f0..1489d01 100644
--- a/man/center.scale.Rd
+++ b/man/center.scale.Rd
@@ -1,34 +1,33 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/center.scale.R
 \name{center.scale}
 \alias{center.scale}
 \title{Center and scale}
-
-\description{Center and scale a dataset.}
-
 \usage{
 center.scale(X)
 }
-
 \arguments{
 \item{X}{a numeric matrix (or data frame) to center and scaled.
 \code{NA}s not allowed.}
 }
-
-\value{\code{center.scale} returns a centered and scaled matrix.
+\value{
+\code{center.scale} returns a centered and scaled matrix.
 }
-
-\author{Celine Brouard <celine.brouard@inrae.fr>
-     
-Jerome Mariette <jerome.mariette@inrae.fr>
-
-Nathalie Vialaneix <nathalie.vialaneix@inrae.fr>}
-
-\seealso{
-\code{\link{compute.kernel}}, \code{\link{combine.kernels}}
+\description{
+Center and scale a dataset.
 }
-
 \examples{
 data("nutrimouse")
 \dontrun{
-nutrimouse.sc <- center.scale(nutrimouse$gene)
+ nutrimouse.sc <- center.scale(nutrimouse$gene)
+}
+
 }
+\seealso{
+\code{\link{compute.kernel}}, \code{\link{combine.kernels}}
+}
+\author{
+Celine Brouard <celine.brouard@inrae.fr>
+Jerome Mariette <jerome.mariette@inrae.fr>
+Nathalie Vialaneix <nathalie.vialaneix@inrae.fr>
 }
diff --git a/man/cim.kernel.Rd b/man/cim.kernel.Rd
index 16c28cb..a4ffe14 100644
--- a/man/cim.kernel.Rd
+++ b/man/cim.kernel.Rd
@@ -1,54 +1,44 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/cim.kernel.R
 \name{cim.kernel}
 \alias{cim.kernel}
 \title{Compute and display similarities between multiple kernels}
-
-\description{Compute cosine from Frobenius norm between kernels and display the 
-corresponding correlation plot.}
-
 \usage{
-cim.kernel(..., scale = TRUE, 
-           method = c("circle", "square", "number", "shade", "color", "pie"))
+cim.kernel(
+  ...,
+  scale = TRUE,
+  method = c("circle", "square", "number", "shade", "color", "pie")
+)
 }
-
 \arguments{
 \item{...}{list of kernels (called 'blocks') computed on different datasets and
 measured on the same samples.}
+
 \item{scale}{boleean. If \code{scale = TRUE}, each block is standardized to zero
 mean and unit variance and cosine normalization is performed on the kernel.
 Default: \code{TRUE}.}
+
 \item{method}{character. The visualization method to be used. Currently, seven
 methods are supported (see Details).}
 }
-
-\details{The displayed similarities are the kernel generalization of the 
+\value{
+\code{cim.kernel} returns a matrix containing the cosine from Frobenius norm 
+between kernels.
+}
+\description{
+Compute cosine from Frobenius norm between kernels and display the 
+corresponding correlation plot.
+}
+\details{
+The displayed similarities are the kernel generalization of the 
 RV-coefficient described in Lavit \emph{et al.}, 1994.
 
 The plot is displayed using the \code{\link[corrplot]{corrplot}} package. Seven 
 visualization methods are implemented: \code{"circle"} (default), 
 \code{"square"}, \code{"number"}, \code{"pie"}, \code{"shade"} and 
 \code{"color"}. Circle and square areas are proportional to the absolute value
-of corresponding similarities coefficients.}
-
-\value{
-\code{cim.kernel} returns a matrix containing the cosine from Frobenius norm 
-between kernels.
+of corresponding similarities coefficients.
 }
-
-\references{
-Lavit C., Escoufier Y., Sabatier R. and Traissac P. (1994). The ACT (STATIS
-method). \emph{Computational Statistics and Data Analysis}, \bold{18}(1), 
-97-119.
-
-Mariette J. and Villa-Vialaneix N. (2018). Unsupervised multiple kernel learning
-for heterogeneous data integration. \emph{Bioinformatics}, \bold{34}(6), 1009-1015.
-}
-
-\author{Jerome Mariette <jerome.mariette@inrae.fr>
-
-Nathalie Vialaneix <nathalie.vialaneix@inrae.fr>}
-
-\seealso{\code{\link{compute.kernel}}}
-
 \examples{
 data(TARAoceans)
 
@@ -62,4 +52,20 @@ cim.kernel(phychem = phychem.kernel,
            pro.phylo = pro.phylo.kernel,
            pro.NOGs = pro.NOGs.kernel, 
            method = "square")
+
+}
+\references{
+Lavit C., Escoufier Y., Sabatier R. and Traissac P. (1994). The ACT (STATIS
+method). \emph{Computational Statistics and Data Analysis}, \bold{18}(1), 
+97-119.
+
+Mariette J. and Villa-Vialaneix N. (2018). Unsupervised multiple kernel learning
+for heterogeneous data integration. \emph{Bioinformatics}, \bold{34}(6), 1009-1015.
+}
+\seealso{
+\code{\link{compute.kernel}}
+}
+\author{
+Jerome Mariette <jerome.mariette@inrae.fr>
+Nathalie Vialaneix <nathalie.vialaneix@inrae.fr>
 }
diff --git a/man/combine.kernels.Rd b/man/combine.kernels.Rd
index df7bddc..9c1a946 100644
--- a/man/combine.kernels.Rd
+++ b/man/combine.kernels.Rd
@@ -1,64 +1,58 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/combine.kernels.R
 \name{combine.kernels}
 \alias{combine.kernels}
 \title{Combine multiple kernels into a meta-kernel}
-
-\description{Compute multiple kernels into a single meta-kernel}
-
 \usage{
-combine.kernels(..., scale = TRUE, 
-                method = c("full-UMKL", "STATIS-UMKL", "sparse-UMKL"), knn = 5,
-                rho = 20)
+combine.kernels(
+  ...,
+  scale = TRUE,
+  method = c("full-UMKL", "STATIS-UMKL", "sparse-UMKL"),
+  knn = 5,
+  rho = 20
+)
 }
-
 \arguments{
 \item{...}{list of kernels (called 'blocks') computed on different datasets and
 measured on the same samples.}
+
 \item{scale}{boleean. If \code{scale = TRUE}, each block is standardized to zero
 mean and unit variance and cosine normalization is performed on the kernel.
 Default: \code{TRUE}.}
+
 \item{method}{character. Which method should be used to compute the meta-kernel. 
-Default: \code{"full-UMKL"}.
-}
+Default: \code{"full-UMKL"}.}
+
 \item{knn}{integer. If \code{method = "sparse-UMKL"} or 
 \code{method = "full-UMKL"}, number of neighbors used to get a proxy of the 
-local topology of the datasets from each kernel. Default: \code{5}.
-}
+local topology of the datasets from each kernel. Default: \code{5}.}
+
 \item{rho}{integer. Parameters for the augmented Lagrangian method. Default: 
 \code{20}.}
 }
-
-\value{\code{combine.kernels} returns an object of classes \code{"kernel"} and 
+\value{
+\code{combine.kernels} returns an object of classes \code{"kernel"} and 
 \code{"metaKernel"}, a list that contains the following components: \itemize{
   \item{kernel}{: the computed meta-kernel matrix;}
   \item{X}{: the dataset from which the kernel has been computed, as given by
-  the function \code{\link{compute.kernel}}. Can be \code{NULL} if a kernel
-  matrix was passed to this function;}
+    the function \code{\link{compute.kernel}}. Can be \code{NULL} if a kernel
+    matrix was passed to this function;}
   \item{weights}{: a vector containing the weights used to combine the kernels.} 
-}}
-
-\details{The arguments \code{method} allows to specify the Unsupervised Multiple
+}
+}
+\description{
+Compute multiple kernels into a single meta-kernel
+}
+\details{
+The arguments \code{method} allows to specify the Unsupervised Multiple
 Kernel Learning (UMKL) method to use: \itemize{
   \item{\code{"STATIS-UMKL"}}{: combines input kernels into the best consensus 
-  of all kernels;}
+    of all kernels;}
   \item \code{"full-UMKL"}{: computes a kernel that minimizes the distortion 
-  between the meta-kernel and the k-NN graphs obtained from all input kernels;}
+    between the meta-kernel and the k-NN graphs obtained from all input kernels;}
   \item \code{"sparse-UMKL"}{: a sparse variant of the \code{"full-UMKL"} 
-  approach.}}
+    approach.}}
 }
-
-\section{References}{
-Mariette J. and Villa-Vialaneix N. (2018). Unsupervised multiple kernel learning for
-heterogeneous data integration . \emph{Bioinformatics}, \bold{34}(6), 1009-1015.
-}
-
-\author{Jerome Mariette <jerome.mariette@inrae.fr>
-
-Nathalie Vialaneix <nathalie.vialaneix@inrae.fr>}
-
-\seealso{
-\code{\link{compute.kernel}}, \code{\link{kernel.pca}}
-}
-
 \examples{
 data(TARAoceans)
 
@@ -72,4 +66,16 @@ meta.kernel <- combine.kernels(phychem = phychem.kernel,
                                pro.phylo = pro.phylo.kernel,
                                pro.NOGs = pro.NOGs.kernel, 
                                method = "full-UMKL")
+
+}
+\references{
+Mariette J. and Villa-Vialaneix N. (2018). Unsupervised multiple kernel learning for
+heterogeneous data integration . \emph{Bioinformatics}, \bold{34}(6), 1009-1015.
+}
+\seealso{
+\code{\link{compute.kernel}}, \code{\link{kernel.pca}}
+}
+\author{
+Jerome Mariette <jerome.mariette@inrae.fr>
+Nathalie Vialaneix <nathalie.vialaneix@inrae.fr>
 }
diff --git a/man/compute.kernel.Rd b/man/compute.kernel.Rd
index 042d87e..527c5d1 100644
--- a/man/compute.kernel.Rd
+++ b/man/compute.kernel.Rd
@@ -1,56 +1,62 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/compute.kernel.R
 \name{compute.kernel}
 \alias{compute.kernel}
 \title{Compute a kernel}
-
-\description{Compute a kernel from a given data matrix.}
-
 \usage{
 compute.kernel(X, kernel.func = "linear", ..., test.pos.semidef = FALSE)
 }
-
 \arguments{
 \item{X}{a numeric matrix (or data frame) used to compute the kernel. 
 \code{NA}s not allowed.}
+
 \item{kernel.func}{the kernel function to use. This parameter can be set to any
 user defined kernel function. Widely used kernel functions are pre-implemented,
 that can be used by setting \code{kernel.func} to one of the following strings:
 \code{"kidentity"}, \code{"abundance"}, \code{"linear"}, 
 \code{"gaussian.radial.basis"}, \code{"poisson"} or \code{"phylogenetic"}. 
 Default: \code{"linear"}.}
+
 \item{...}{the kernel function arguments. Valid parameters for pre-implemented 
 kernels are: 
-\itemize{
-  \item \code{phylogenetic.tree} (\code{"phylogenetic"}): an instance of 
-  phylo-class that contains a phylogenetic tree (required).
-  \item \code{scale} (\code{"linear"} or \code{"gaussian.radial.basis"}): 
-  logical. Should the variables be scaled to unit variance prior the kernel 
-  computation? Default: \code{TRUE}.
-  \item \code{sigma} (\code{"gaussian.radial.basis"}): double. The inverse 
-  kernel width used by \code{"gaussian.radial.basis"}.
-  \item \code{method} (\code{"phylogenetic"} or \code{"abundance"}): character.
-  Can be \code{"unifrac"} or \code{"wunifrac"} for \code{"phylogenetic"}. Which 
-  dissimilarity to use for \code{"abundance"}: one of \code{"bray"},
-  \code{"euclidean"}, \code{"canberra"}, \code{"manhattan"}, \code{"kulczynski"}, 
-  \code{"jaccard"}, \code{"gower"}, \code{"altGower"}, \code{"morisita"},
-  \code{"horn"}, \code{"mountford"}, \code{"raup"}, \code{"binomial"}, 
-  \code{"chao"} and \code{"cao"}.
-  \item \code{normalization} (\code{"poisson"}): character. Can be \code{"deseq"}
-  (more robust), \code{"mle"} (less robust) or \code{"quantile"}.}
-}
+  \itemize{
+    \item \code{phylogenetic.tree} (\code{"phylogenetic"}): an instance of 
+    phylo-class that contains a phylogenetic tree (required).
+    \item \code{scale} (\code{"linear"} or \code{"gaussian.radial.basis"}): 
+      logical. Should the variables be scaled to unit variance prior the kernel 
+    computation? Default: \code{TRUE}.
+    \item \code{sigma} (\code{"gaussian.radial.basis"}): double. The inverse 
+    kernel width used by \code{"gaussian.radial.basis"}.
+    \item \code{method} (\code{"phylogenetic"} or \code{"abundance"}): character.
+    Can be \code{"unifrac"} or \code{"wunifrac"} for \code{"phylogenetic"}. Which 
+    dissimilarity to use for \code{"abundance"}: one of \code{"bray"},
+    \code{"euclidean"}, \code{"canberra"}, \code{"manhattan"}, \code{"kulczynski"}, 
+    \code{"jaccard"}, \code{"gower"}, \code{"altGower"}, \code{"morisita"},
+    \code{"horn"}, \code{"mountford"}, \code{"raup"}, \code{"binomial"}, 
+    \code{"chao"} and \code{"cao"}.
+    \item \code{normalization} (\code{"poisson"}): character. Can be \code{"deseq"}
+    (more robust), \code{"mle"} (less robust) or \code{"quantile"}.}}
+
 \item{test.pos.semidef}{boleean. If \code{test.pos.semidef = TRUE}, the 
 resulting matrix is tested to be positive-semidefinite.}
 }
-
 \value{
 \code{compute.kernel} returns an object of classes \code{"kernel"}, a list that 
 contains the following components:
-  \item{kernel}{: the computed kernel matrix.}
-  \item{X}{: the original dataset. If \code{"kidentity"}, \code{X} is set to 
-  \code{NULL}.}
-  \item{kernel.func}{: the kernel function used.}
-  \item{kernel.args}{: the arguments used to compute the kernel.} 
+\item{kernel}{: the computed kernel matrix.}
+\item{X}{: the original dataset. If \code{"kidentity"}, \code{X} is set to 
+\code{NULL}.}
+\item{kernel.func}{: the kernel function used.}
+\item{kernel.args}{: the arguments used to compute the kernel.}
 }
+\description{
+Compute a kernel from a given data matrix.
+}
+\examples{
+data(TARAoceans)
+pro.NOGs.kernel <- compute.kernel(TARAoceans$pro.NOGs, kernel.func = "abundance")
 
+}
 \references{
 Lozupone C. and Knight R. (2005). UniFrac: a new phylogenetic method for 
 comparing microbial communities. \emph{Applied and Environmental Microbiology},
@@ -64,16 +70,10 @@ structure microbial communities. \emph{Applied and Environmental Microbiology},
 Witten D. (2011). Classification and clustering of sequencing data using a 
 Poisson model. \emph{Annals of Applied Statistics}, \bold{5}(4), 2493-2518.
 }
-
-\author{Jerome Mariette <jerome.mariette@inrae.fr>
-
-Nathalie Vialaneix <nathalie.vialaneix@inrae.fr>}
-
 \seealso{
 \code{\link{combine.kernels}}, \code{\link{kernel.pca}}
 }
-
-\examples{
-data(TARAoceans)
-pro.NOGs.kernel <- compute.kernel(TARAoceans$pro.NOGs, kernel.func = "abundance")
+\author{
+Jerome Mariette <jerome.mariette@inrae.fr>
+Nathalie Vialaneix <nathalie.vialaneix@inrae.fr>
 }
diff --git a/man/kernel.pca.Rd b/man/kernel.pca.Rd
index 8a77560..b355fd9 100644
--- a/man/kernel.pca.Rd
+++ b/man/kernel.pca.Rd
@@ -1,46 +1,47 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/kernel.pca.R
 \name{kernel.pca}
 \alias{kernel.pca}
 \title{Kernel Principal Components Analysis}
-
-\description{Performs a kernel PCA.}
-
 \usage{
 kernel.pca(K, ncomp = nrow(K$kernel))
 }
-
 \arguments{
 \item{K}{a kernel object obtained using either \code{compute.kernel} or
 \code{combine.kernels}.}
-\item{ncomp}{integer. Indicates the number of components to return.}
-}
 
-\value{\code{kernel.pca} returns an object of classes \code{"kernel.pca"} and 
+\item{ncomp}{integer. Indicates the number of components to return..}
+}
+\value{
+\code{kernel.pca} returns an object of classes \code{"kernel.pca"} and 
 \code{"pca"}, which is a list containing the following entries: \itemize{
   \item{ncomp}{: the number of principal components;}
   \item{X}{: the input kernel matrix;} 
   \item{kernel}{: the input kernel object provided by the user;}
   \item{sdev}{: the singular values (square root of the eigenvalues);} 
   \item{rotation}{: the matrix of variable loadings (\emph{i.e.}, a matrix whose
-  columns contain the eigenvectors);}
+                                                     columns contain the eigenvectors);}
   \item{loadings}{: same as 'rotation' to keep the mixOmics spirit;}
   \item{x}{: same as 'rotation' to keep the mixOmics spirit;}
-}}
+}
+}
+\description{
+Performs a kernel PCA.
+}
+\examples{
+data(TARAoceans)
+phychem.kernel <- compute.kernel(TARAoceans$phychem, kernel.func = "linear")
+kernel.pca.result <- kernel.pca(phychem.kernel, ncomp = 3)
 
-\section{References}{
+}
+\references{
 Scholkopf B., Smola A. and Muller K.R. (1998) Nonlinear component analysis as a
 kernel eigenvalue problem. \emph{Neural Computation}, \bold{10}, 1299-1319.
 }
-
-\author{Jerome Mariette <jerome.mariette@inrae.fr>
-
-Nathalie Vialaneix <nathalie.vialaneix@inrae.fr>}
-
 \seealso{
 \code{\link{compute.kernel}}, \code{\link{combine.kernels}}
 }
-
-\examples{
-data(TARAoceans)
-phychem.kernel <- compute.kernel(TARAoceans$phychem, kernel.func = "linear")
-kernel.pca.result <- kernel.pca(phychem.kernel, ncomp = 3)
+\author{
+Jerome Mariette <jerome.mariette@inrae.fr>
+Nathalie Vialaneix <nathalie.vialaneix@inrae.fr>
 }
diff --git a/man/kernel.pca.permute.Rd b/man/kernel.pca.permute.Rd
index f46b2ed..a0815d3 100644
--- a/man/kernel.pca.permute.Rd
+++ b/man/kernel.pca.permute.Rd
@@ -1,49 +1,44 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/kernel.pca.permute.R
 \name{kernel.pca.permute}
 \alias{kernel.pca.permute}
 \title{Assess variable importance}
-
-\description{Assess importance of variables on a given PC component by computing 
-the Crone-Crosby distance between original sample positions and sample positions 
-obtain by a random permutation of the variables.}
-
 \usage{
 kernel.pca.permute(kpca.result, ncomp = 1, ..., directory = NULL)
 }
-
 \arguments{
 \item{kpca.result}{a kernel.pca object returned by the \code{\link{kernel.pca}}
 function.}
+
 \item{ncomp}{integer. Number of KPCA components used to compute the importance. 
 Default: \code{1}.}
+
 \item{...}{list of character vectors. The parameter name must be the kernel name 
 to be considered for permutation of variables. Provided vectors length has to be 
 equal to the number of variables of the input dataset. A kernel is performed on 
 each unique variables values. Crone-Crosby distances are computed on each KPCA 
 performed on resulted kernels or meta-kernels and can be displayed using the 
 \code{\link{plotVar.kernel.pca}}.}
+
 \item{directory}{character. To limit computational burden, this argument allows
 to store / read temporary computed kernels.}
 }
-
-\value{\code{kernel.pca.permute} returns a copy of the input \code{kpca.result}
+\value{
+\code{kernel.pca.permute} returns a copy of the input \code{kpca.result}
 results and add values in the three entries: \code{cc.distances}, 
-\code{cc.variables} and \code{cc.blocks}.}
-
-\section{References}{
-Mariette J. and Villa-Vialaneix N. (2018). Unsupervised multiple kernel learning
-for heterogeneous data integration. \emph{Bioinformatics}, \bold{34}(6), 1009-1015.
-
-Crone L. and Crosby D. (1995). Statistical applications of a metric on subspaces
-to satellite meteorology. \emph{Technometrics}, \bold{37}(3), 324-328.
+\code{cc.variables} and \code{cc.blocks}.
+}
+\description{
+Assess importance of variables on a given PC component by computing 
+the Crone-Crosby distance between original sample positions and sample positions 
+obtain by a random permutation of the variables.
+}
+\details{
+\code{plotVar.kernel.pca} produces a barplot for each block. The variables for which the 
+importance has been computed with \code{\link{kernel.pca.permute}} are 
+displayed. The representation is limited to the \code{ndisplay} most important 
+variables.
 }
-
-\author{Jerome Mariette <jerome.mariette@inrae.fr>
-
-Nathalie Vialaneix <nathalie.vialaneix@inrae.fr>}
-
-\seealso{\code{\link{compute.kernel}}, \code{\link{kernel.pca}}, 
-\code{\link{plotVar.kernel.pca}}}
-
 \examples{
 data(TARAoceans)
 
@@ -54,4 +49,19 @@ kernel.pca.result <- kernel.pca(phychem.kernel)
 
 # compute importance for all variables in this kernel
 kernel.pca.result <- kernel.pca.permute(kernel.pca.result, phychem = colnames(TARAoceans$phychem))
+
+}
+\references{
+Mariette J. and Villa-Vialaneix N. (2018). Unsupervised multiple kernel learning
+for heterogeneous data integration. \emph{Bioinformatics}, \bold{34}(6), 1009-1015.
+
+Crone L. and Crosby D. (1995). Statistical applications of a metric on subspaces
+to satellite meteorology. \emph{Technometrics}, \bold{37}(3), 324-328.
+}
+\seealso{
+\code{\link{compute.kernel}}, \code{\link{kernel.pca}}
+}
+\author{
+Jerome Mariette <jerome.mariette@inrae.fr>
+Nathalie Vialaneix <nathalie.vialaneix@inrae.fr>
 }
diff --git a/man/mixKernel.users.guide.Rd b/man/mixKernel.users.guide.Rd
index 32f34bb..ce519a5 100644
--- a/man/mixKernel.users.guide.Rd
+++ b/man/mixKernel.users.guide.Rd
@@ -1,18 +1,15 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/user.guide.R
 \name{mixKernel.users.guide}
 \alias{mixKernel.users.guide}
 \title{View mixKernel User's Guide}
-
-\description{
-Find the location of the mixKernel User's Guide and optionnaly opens it
-}
-
 \usage{
 mixKernel.users.guide(html = TRUE, view = html)
 }
-
 \arguments{
 \item{html}{logical. Should the document returned by the function be the
 compiled PDF or the Rmd source. Default to \code{TRUE}}
+
 \item{view}{logical. Should the document be opened using the default HTML
 viewer? Default to \code{html}. It has no effect if \code{html = FALSE}}
 }
@@ -21,19 +18,21 @@ Character string giving the file location. If \code{html = TRUE} and
 \code{view = TRUE}, the HTML document reader is started and the User's Guide
 is opened in it.
 }
-
+\description{
+Find the location of the mixKernel User's Guide and optionnaly opens it
+}
 \details{
 If the operating system is not Windows, then the HTML viewer used is that
 given by \code{Sys.getenv("R_BROWSER")}. The HTML viewer can be changed using
- \code{Sys.setenv(R_BROWSER = )}.
+\code{Sys.setenv(R_BROWSER = )}.
 }
-
-\author{Jerome Mariette <jerome.mariette@inrae.fr>
-
-Nathalie Vialaneix <nathalie.vialaneix@inrae.fr>}
-
 \examples{
 mixKernel.users.guide(view = FALSE)
 mixKernel.users.guide(html = FALSE)
 \dontrun{mixKernel.users.guide()}
-}
\ No newline at end of file
+
+}
+\author{
+Jerome Mariette <jerome.mariette@inrae.fr>
+Nathalie Vialaneix <nathalie.vialaneix@inrae.fr>
+}
diff --git a/man/plotVar.kernel.pca.Rd b/man/plotVar.kernel.pca.Rd
index 325ceda..1c6278f 100644
--- a/man/plotVar.kernel.pca.Rd
+++ b/man/plotVar.kernel.pca.Rd
@@ -1,44 +1,40 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/plotVar.kernel.pca.R
 \name{plotVar.kernel.pca}
 \alias{plotVar.kernel.pca}
 \title{Plot importance of variables in kernel PCA}
-
-\description{Provides a representation of variable importance in kernel PCA.}
-
 \usage{
-plotVar.kernel.pca(object, blocks = unique(object$cc.blocks), ndisplay = 5, ncol = 2, ...)
+plotVar.kernel.pca(
+  object,
+  blocks = unique(object$cc.blocks),
+  ndisplay = 5,
+  ncol = 2,
+  ...
+)
 }
-
 \arguments{
 \item{object}{: a kernel.pca object returned by \code{\link{kernel.pca}}.}
+
 \item{blocks}{a numerical vector indicating the block variables to display.}
+
 \item{ndisplay}{integer. The number of important variables per blocks shown in 
 the representation. Default: \code{5}.}
+
 \item{ncol}{integer. Each block of variables is displayed in a separate 
 subfigure. \code{ncol} sets the number of columns for the global figure. 
 Default: \code{2}.}
+
 \item{...}{external arguments.}
 }
-
+\description{
+Provides a representation of variable importance in kernel PCA.
+}
 \details{
 \code{plotVar.kernel.pca} produces a barplot for each block. The variables for which the 
 importance has been computed with \code{\link{kernel.pca.permute}} are 
 displayed. The representation is limited to the \code{ndisplay} most important 
 variables.
 }
-
-\section{References}{
-Crone L. and Crosby D. (1995). Statistical applications of a metric on subspaces
-to satellite meteorology. \emph{Technometrics}, \bold{37}(3), 324-328.
-}
-
-\author{Jerome Mariette <jerome.mariette@inrae.fr>
-
-Nathalie Vialaneix <nathalie.vialaneix@inrae.fr>}
-
-\seealso{
-\code{\link{kernel.pca}}, \code{\link{kernel.pca.permute}}
-}
-
 \examples{
 data(TARAoceans)
 
@@ -50,4 +46,16 @@ kernel.pca.result <- kernel.pca(phychem.kernel)
 kernel.pca.result <- kernel.pca.permute(kernel.pca.result, phychem = colnames(TARAoceans$phychem))
 
 \dontrun{plotVar.kernel.pca(kernel.pca.result, ndisplay = 10)}
+
+}
+\references{
+Crone L. and Crosby D. (1995). Statistical applications of a metric on subspaces
+to satellite meteorology. \emph{Technometrics}, \bold{37}(3), 324-328.
+}
+\seealso{
+\code{\link{kernel.pca}}, \code{\link{kernel.pca.permute}}
+}
+\author{
+Jerome Mariette <jerome.mariette@inrae.fr>
+Nathalie Vialaneix <nathalie.vialaneix@inrae.fr>
 }
diff --git a/man/select.features.Rd b/man/select.features.Rd
index d6a243b..3c88087 100644
--- a/man/select.features.Rd
+++ b/man/select.features.Rd
@@ -1,89 +1,106 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/select.features.R
 \name{select.features}
 \alias{select.features}
 \title{Select important features}
-
-\description{Select features using supervised or unsupervised kernel method. A 
-supervised feature selection method is performed if \code{Y} is provided.}
-
 \usage{
-select.features(X, Y = NULL, 
-                kx.func = c("linear", "gaussian.radial.basis", "bray"),
-                ky.func = c("linear", "gaussian.radial.basis"), keepX = NULL,
-                method = c("kernel", "kpca", "graph"), lambda = NULL,
-                n_components = 2, Lg = NULL, mu = 1, max_iter = 100, nstep = 50,
-                ...)
+\method{select}{features}(
+  X,
+  Y = NULL,
+  kx.func = c("linear", "gaussian.radial.basis", "bray"),
+  ky.func = c("linear", "gaussian.radial.basis"),
+  keepX = NULL,
+  method = c("kernel", "kpca", "graph"),
+  lambda = NULL,
+  n_components = 2,
+  Lg = NULL,
+  mu = 1,
+  max_iter = 100,
+  nstep = 50,
+  ...
+)
 }
-
 \arguments{
-\item{X}{a numeric matrix (or data frame) used to select variables.
-\code{NA}s not allowed.}
-\item{Y}{a numeric matrix (or data frame) used to select variables.
-\code{NA}s not allowed.}
+\item{X}{a numeric matrix (or data frame) used to select variables. \code{NA}s not allowed.}
+
+\item{Y}{a numeric matrix (or data frame) used to select variables. \code{NA}s not allowed.}
+
 \item{kx.func}{the kernel function name to use on \code{X}. Widely used kernel
 functions are pre-implemented, and can be directly used by setting 
 \code{kx.func} to one of the following values: \code{"linear"}, 
 \code{"gaussian.radial.basis"} or \code{"bray"}. Default: \code{"linear"}. If 
 \code{Y} is provided, the kernel \code{"bray"} is not allowed.}
-\item{ky.func}{the kernel function name to use on \code{Y}. Available kernels 
-are: \code{"linear"}, and \code{"gaussian.radial.basis"}. Default: 
+
+\item{ky.func}{the kernel function name to use on \code{Y}. Available 
+kernels are: \code{"linear"}, and \code{"gaussian.radial.basis"}. Default: 
 \code{"linear"}. This value is ignored when \code{Y} is not provided.}
+
 \item{keepX}{the number of variables to select.}
+
 \item{method}{the method to use. Either an unsupervised variable selection
 method (\code{"kernel"}), a kernel PCA oriented variable selection method 
 (\code{"kpca"}) or a structure driven variable selection selection 
 (\code{"graph"}). Default: \code{"kernel"}.}
+
 \item{lambda}{the penalization parameter that controls the trade-off between the
 minimization of the distorsion and the sparsity of the solution parameter.}
+
 \item{n_components}{how many principal components should be used with method
 \code{"kpca"}. Required with method \code{"kpca"}. Default: \code{2}.}
+
 \item{Lg}{the Laplacian matrix of the graph representing relations between the 
 input dataset variables. Required with method \code{"graph"}.}
+
 \item{mu}{the penalization parameter that controls the trade-off between the
 the distorsion and the influence of the graph. Default: \code{1}.}
+
 \item{max_iter}{the maximum number of iterations. Default: \code{100}.}
-\item{nstep}{the number of values used for the regularization path. Default: 
-\code{50}.}
+
+\item{nstep}{the number of values used for the regularization path. Default: \code{50}.}
+
 \item{...}{the kernel function arguments. In particular \code{sigma}
 (\code{"gaussian.radial.basis"}): double. The inverse kernel width used by
 \code{"gaussian.radial.basis"}.}
 }
-
 \value{
 \code{ukfs} returns a vector of sorted selected features indexes.
 }
-
-\references{
-Brouard C., Mariette J., Flamary R. and Vialaneix N. (2022). Feature selection
-for kernel methods in systems biology. \emph{NAR Genomics and Bioinformatics},
-4(1), doi: 10.1093/nargab/lqac014.
+\description{
+Select features using supervised or unsupervised kernel method. A 
+supervised feature selection method is performed if \code{Y} is provided.
 }
-
-\author{Celine Brouard <celine.brouard@inrae.fr>
-
-Jerome Mariette <jerome.mariette@inrae.fr>
-
-Nathalie Vialaneix <nathalie.vialaneix@inrae.fr>}
-
-\seealso{\code{\link{compute.kernel}}}
-
 \examples{
 ## These examples require the installation of python modules
 ## See installation instruction at: http://mixkernel.clementine.wf
 
 data("Koren.16S")
 \dontrun{
-sf.res <- select.features(Koren.16S$data.raw, kx.func = "bray", lambda = 1,
-                          keepX = 40, nstep = 1)
-colnames(Koren.16S$data.raw)[sf.res]
+ sf.res <- select.features(Koren.16S$data.raw, kx.func = "bray", lambda = 1,
+                           keepX = 40, nstep = 1)
+ colnames(Koren.16S$data.raw)[sf.res]
 }
 
 data("nutrimouse")
 \dontrun{
-grb.func <- "gaussian.radial.basis"
-genes <- center.scale(nutrimouse$gene)
-lipids <- center.scale(nutrimouse$lipid)
-sf.res <- select.features(genes, lipids, kx.func = grb.func, ky.func = grb.func,
-                          keepX = 40)
-colnames(nutrimouse$gene)[sf.res]
+ grb.func <- "gaussian.radial.basis"
+ genes <- center.scale(nutrimouse$gene)
+ lipids <- center.scale(nutrimouse$lipid)
+ sf.res <- select.features(genes, lipids, kx.func = grb.func, ky.func = grb.func,
+                           keepX = 40)
+ colnames(nutrimouse$gene)[sf.res]
 }
+
+}
+\references{
+Brouard C., Mariette J., Flamary R. and Vialaneix N. (2022). Feature selection
+for kernel methods in systems biology. \emph{NAR Genomics and Bioinformatics},
+4(1), doi: 10.1093/nargab/lqac014.
+}
+\seealso{
+\code{\link{compute.kernel}}
+}
+\author{
+Celine Brouard <celine.brouard@inrae.fr>
+Jerome Mariette <jerome.mariette@inrae.fr>
+Nathalie Vialaneix <nathalie.vialaneix@inrae.fr>
 }
-- 
GitLab


From 96e235b75307d59bffb67ef014688bf05d2bb275 Mon Sep 17 00:00:00 2001
From: Julien Henry <julien.henry@inrae.fr>
Date: Fri, 8 Sep 2023 15:15:36 +0200
Subject: [PATCH 07/13] changed maintainer

---
 DESCRIPTION | 14 ++++++++------
 R/zzz.R     |  4 ++--
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index 41c4bd3..6895ba6 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -6,15 +6,17 @@ Date: 2022-01-13
 Depends: R (>= 3.5.0), mixOmics, ggplot2, reticulate (>= 1.14)
 Imports: vegan, phyloseq, corrplot, psych, quadprog, LDRTools, Matrix, methods, markdown
 Suggests: rmarkdown, knitr
-Authors@R: c(person("Jerome", "Mariette", role = c("aut", "cre"), email="jerome.mariette@inrae.fr"),
+Authors@R: c(person("Jerome", "Mariette", role = c("aut"), email="jerome.mariette@inrae.fr"),
              person("Celine", "Brouard", role = c("aut"), email="celine.brouard@inrae.fr"),
              person("Remi", "Flamary", role = c("aut"), email="remi.flamary@polytechnique.edu"),
-             person("Nathalie", "Vialaneix", role = c("aut"), email="nathalie.vialaneix@inrae.fr"))
-Maintainer: Jerome Mariette <jerome.mariette@inrae.fr>
-Author: Jerome Mariette [aut, cre],
+             person("Nathalie", "Vialaneix", role = c("aut", "cre"), email="nathalie.vialaneix@inrae.fr"),
+             person("Julien", "Henry", role = c("aut"), email="julien.henry@inrae.fr"))
+Maintainer: Nathalie Vialaneix <nathalie.vialaneix@inrae.fr>
+Author: Jerome Mariette [aut],
   Celine Brouard [aut],
   Remi Flamary [aut],
-  Nathalie Vialaneix [aut]
+  Nathalie Vialaneix [aut, cre],
+  Julien Henry [aut]
 Description: Kernel-based methods are powerful methods for integrating 
     heterogeneous types of data. mixKernel aims at providing methods to combine
     kernel for unsupervised exploratory analysis. Different solutions are 
@@ -27,7 +29,7 @@ Description: Kernel-based methods are powerful methods for integrating
 License: GPL (>= 2)
 Repository: CRAN
 Packaged: 2022-01-13 15:38:01 UTC; nvialaneix
-BugReports: https://forgemia.inra.fr/jerome.mariette/mixKernel/-/issues
+BugReports: https://forgemia.inra.fr/genotoul-bioinfo/mixKernel/-/issues
 VignetteBuilder: knitr
 Encoding: UTF-8
 NeedsCompilation: no
diff --git a/R/zzz.R b/R/zzz.R
index cc14093..24b26ba 100755
--- a/R/zzz.R
+++ b/R/zzz.R
@@ -23,8 +23,8 @@
 
 .onAttach <- function(libname, pkgname) {
   
-  packageStartupMessage("\nAny bug reports or comments? Notify us at jerome.mariette@inrae.fr",
-    " or https://forgemia.inra.fr/jerome.mariette/mixKernel/-/issues"
+  packageStartupMessage("\nAny bug reports or comments? Notify us at nathalie.vialaneix@inrae.fr",
+    " or https://forgemia.inra.fr/genotoul-bioinfo/mixKernel/-/issues"
   )
   
 }
-- 
GitLab


From bf259aea03013311788d3420021e4ec121ee4c8b Mon Sep 17 00:00:00 2001
From: Julien Henry <julien.henry@inrae.fr>
Date: Fri, 8 Sep 2023 15:17:10 +0200
Subject: [PATCH 08/13] changed citation

---
 inst/CITATION | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/inst/CITATION b/inst/CITATION
index beb2cab..04adede 100644
--- a/inst/CITATION
+++ b/inst/CITATION
@@ -1,16 +1,3 @@
-citHeader("To cite the 'mixKernel' package in publications, use:")
-
-year = sub('.*(2[[:digit:]]{3})-.*', '\\1', meta$Date, perl = TRUE)
-vers = paste('R package version', meta$Version)
-
-bibentry(
-  bibtype = "Manual",
-  textVersion = paste('Mariette J., Brouard C., Flamary R., Vialaneix N. (', year, ') mixKernel: ', meta$Title, '. ', vers, '.', sep = ''),
-  author = as.person(meta$Author),
-  title = paste('mixKernel:', meta$Title),
-  year = year,
-  note = vers
-)
 
 bibentry(
   bibtype = "Article",
-- 
GitLab


From 0c321788fbe8008968f058851dad4410d8aa1a1e Mon Sep 17 00:00:00 2001
From: Julien Henry <julien.henry@inrae.fr>
Date: Fri, 8 Sep 2023 15:21:36 +0200
Subject: [PATCH 09/13] released version 0.9

---
 DESCRIPTION | 4 ++--
 NEWS.md     | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index 6895ba6..950e540 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,8 +1,8 @@
 Package: mixKernel
 Type: Package
 Title: Omics Data Integration Using Kernel Methods
-Version: 0.8
-Date: 2022-01-13
+Version: 0.9
+Date: 2023-09-08
 Depends: R (>= 3.5.0), mixOmics, ggplot2, reticulate (>= 1.14)
 Imports: vegan, phyloseq, corrplot, psych, quadprog, LDRTools, Matrix, methods, markdown
 Suggests: rmarkdown, knitr
diff --git a/NEWS.md b/NEWS.md
index 3ddf36f..32d3666 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,3 +1,5 @@
+# Version 0.9 [2023-09-08]
+
 # Version 0.8 [2022-01-13]
 
 * improved documentation and add installation instructions
-- 
GitLab


From 7e54d2ccebd87476605ca3bcbd9508ac88f28d58 Mon Sep 17 00:00:00 2001
From: Nathalie Vialaneix <nathalie.vialaneix@inrae.fr>
Date: Sun, 17 Sep 2023 21:21:41 +0200
Subject: [PATCH 10/13] fixed line lengths in documentation

---
 R/TARAoceans.R            | 42 ++++++++++++++-------------
 R/cim.kernel.R            | 43 +++++++++++++++-------------
 R/combine.kernels.R       | 37 +++++++++++++-----------
 R/compute.kernel.R        | 60 +++++++++++++++++++++------------------
 R/kernel.pca.R            | 13 +++++----
 R/kernel.pca.permute.R    | 57 +++++++++++++++++++------------------
 R/select.features.R       | 32 ++++++++++++---------
 man/TARAoceans.Rd         | 42 ++++++++++++++-------------
 man/cim.kernel.Rd         | 43 +++++++++++++++-------------
 man/combine.kernels.Rd    | 37 +++++++++++++-----------
 man/compute.kernel.Rd     | 57 +++++++++++++++++++------------------
 man/kernel.pca.Rd         | 13 +++++----
 man/kernel.pca.permute.Rd | 57 +++++++++++++++++++------------------
 man/select.features.Rd    | 32 ++++++++++++---------
 14 files changed, 302 insertions(+), 263 deletions(-)

diff --git a/R/TARAoceans.R b/R/TARAoceans.R
index d5a6ec1..f0d8e9e 100644
--- a/R/TARAoceans.R
+++ b/R/TARAoceans.R
@@ -2,15 +2,15 @@
 #'
 #' The TARA Oceans expedition facilitated the study of plankton communities by 
 #' providing oceans metagenomic data combined with environmental measures to the 
-#' scientific community. This dataset focuses on 139 prokaryotic-enriched samples 
-#' collected from 68 stations and spread across three depth layers: the surface 
-#' (SRF), the deep chlorophyll maximum (DCM) layer and the mesopelagic (MES) zones. 
-#' Samples were located in height different oceans or seas: Indian Ocean (IO), 
-#' Mediterranean Sea (MS), North Atlantic Ocean (NAO), North Pacific Ocean (NPO), 
-#' Red Sea (RS), South Atlantic Ocean (SAO), South Pacific Ocean (SPO) and South 
-#' Ocean (SO). Here, only a subset of the original data is provided (1\% of the 
-#' 35,650 prokaryotic operational taxonomic units (OTUs) and of the 39,246 
-#' bacterial genes (NOGs) (selected at random).
+#' scientific community. This dataset focuses on 139 prokaryotic-enriched 
+#' samples collected from 68 stations and spread across three depth layers: the 
+#' surface (SRF), the deep chlorophyll maximum (DCM) layer and the mesopelagic 
+#' (MES) zones. Samples were located in height different oceans or seas: Indian 
+#' Ocean (IO), Mediterranean Sea (MS), North Atlantic Ocean (NAO), North Pacific
+#' Ocean (NPO), Red Sea (RS), South Atlantic Ocean (SAO), South Pacific Ocean 
+#' (SPO) and South Ocean (SO). Here, only a subset of the original data is 
+#' provided (1\% of the 35,650 prokaryotic operational taxonomic units (OTUs) 
+#' and of the 39,246 bacterial genes (NOGs) (selected at random).
 #'
 #' @usage data(TARAoceans)
 #'
@@ -31,19 +31,21 @@
 #'    region of the sample) and \code{depth} (sample depth).}
 #' }
 #' 
-#' @source The raw data were downloaded from \url{http://ocean-microbiome.embl.de/companion.html}.
+#' @source The raw data were downloaded from 
+#' \url{http://ocean-microbiome.embl.de/companion.html}.
 #' 
 #' @keywords datasets
 #' 
-#' @references Sunagawa S., Coelho L.P., Chaffron S., Kultima J.R., Labadie K., Salazar F., 
-#' Djahanschiri B., Zeller G., Mende D.R., Alberti A., Cornejo-Castillo F., 
-#' Costea P.I., Cruaud C., d'Oviedo F., Engelen S., Ferrera I., Gasol J., Guidi L.,
-#' Hildebrand F., Kokoszka F., Lepoivre C., Lima-Mendez G., Poulain J., Poulos B., 
-#' Royo-Llonch M., Sarmento H., Vieira-Silva S., Dimier C., Picheral M., Searson 
-#' S., Kandels-Lewis S., \emph{Tara} Oceans coordinators, Bowler C., de Vargas C.,
-#' Gorsky G., Grimsley N., Hingamp P., Iudicone D., Jaillon O., Not F., Ogata H., 
-#' Pesant S., Speich S., Stemmann L., Sullivan M., Weissenbach J., Wincker P., 
-#' Karsenti E., Raes J., Acinas S. and Bork P. (2015). Structure and function of 
-#' the global ocean microbiome. \emph{Science}, \bold{348}, 6237.
+#' @references Sunagawa S., Coelho L.P., Chaffron S., Kultima J.R., Labadie K., 
+#' Salazar F., Djahanschiri B., Zeller G., Mende D.R., Alberti A., 
+#' Cornejo-Castillo F., Costea P.I., Cruaud C., d'Oviedo F., Engelen S., 
+#' Ferrera I., Gasol J., Guidi L., Hildebrand F., Kokoszka F., Lepoivre C., 
+#' Lima-Mendez G., Poulain J., Poulos B., Royo-Llonch M., Sarmento H., 
+#' Vieira-Silva S., Dimier C., Picheral M., Searson S., Kandels-Lewis S., 
+#' \emph{Tara} Oceans coordinators, Bowler C., de Vargas C., Gorsky G., 
+#' Grimsley N., Hingamp P., Iudicone D., Jaillon O., Not F., Ogata H., Pesant 
+#' S., Speich S., Stemmann L., Sullivan M., Weissenbach J., Wincker P., Karsenti 
+#' E., Raes J., Acinas S. and Bork P. (2015). Structure and function of the 
+#' global ocean microbiome. \emph{Science}, \bold{348}, 6237.
 #' 
 "TARAoceans"
\ No newline at end of file
diff --git a/R/cim.kernel.R b/R/cim.kernel.R
index cfdc185..fe0b510 100644
--- a/R/cim.kernel.R
+++ b/R/cim.kernel.R
@@ -7,31 +7,32 @@
 #' The displayed similarities are the kernel generalization of the 
 #' RV-coefficient described in Lavit \emph{et al.}, 1994.
 #' 
-#' The plot is displayed using the \code{\link[corrplot]{corrplot}} package. Seven 
-#' visualization methods are implemented: \code{"circle"} (default), 
+#' The plot is displayed using the \code{\link[corrplot]{corrplot}} package. 
+#' Seven visualization methods are implemented: \code{"circle"} (default), 
 #' \code{"square"}, \code{"number"}, \code{"pie"}, \code{"shade"} and 
-#' \code{"color"}. Circle and square areas are proportional to the absolute value
-#' of corresponding similarities coefficients.
+#' \code{"color"}. Circle and square areas are proportional to the absolute 
+#' value of corresponding similarities coefficients.
 #'
-#' @param ... list of kernels (called 'blocks') computed on different datasets and
-#' measured on the same samples.
-#' @param scale boleean. If \code{scale = TRUE}, each block is standardized to zero
-#' mean and unit variance and cosine normalization is performed on the kernel.
-#' Default: \code{TRUE}.
-#' @param method character. The visualization method to be used. Currently, seven
-#' methods are supported (see Details).
+#' @param ... list of kernels (called 'blocks') computed on different datasets 
+#' and measured on the same samples.
+#' @param scale boleean. If \code{scale = TRUE}, each block is standardized to 
+#' zero mean and unit variance and cosine normalization is performed on the 
+#' kernel. Default: \code{TRUE}.
+#' @param method character. The visualization method to be used. Currently, 
+#' seven methods are supported (see Details).
 #' 
-#' @return \code{cim.kernel} returns a matrix containing the cosine from Frobenius norm 
-#' between kernels.
+#' @return \code{cim.kernel} returns a matrix containing the cosine from 
+#' Frobenius norm between kernels.
 #' 
 #' @author Jerome Mariette <jerome.mariette@@inrae.fr>
 #' Nathalie Vialaneix <nathalie.vialaneix@@inrae.fr>
-#' @references Lavit C., Escoufier Y., Sabatier R. and Traissac P. (1994). The ACT (STATIS
-#' method). \emph{Computational Statistics and Data Analysis}, \bold{18}(1), 
-#' 97-119.
+#' @references Lavit C., Escoufier Y., Sabatier R. and Traissac P. (1994). The 
+#' ACT (STATIS method). \emph{Computational Statistics and Data Analysis}, 
+#' \bold{18}(1), 97-119.
 #' 
-#' Mariette J. and Villa-Vialaneix N. (2018). Unsupervised multiple kernel learning
-#' for heterogeneous data integration. \emph{Bioinformatics}, \bold{34}(6), 1009-1015.
+#' Mariette J. and Villa-Vialaneix N. (2018). Unsupervised multiple kernel 
+#' learning for heterogeneous data integration. \emph{Bioinformatics}, 
+#' \bold{34}(6), 1009-1015.
 #' @seealso \code{\link{compute.kernel}}
 #' @export
 #' @examples
@@ -39,8 +40,10 @@
 #' 
 #' # compute one kernel per dataset
 #' phychem.kernel <- compute.kernel(TARAoceans$phychem, kernel.func = "linear")
-#' pro.phylo.kernel <- compute.kernel(TARAoceans$pro.phylo, kernel.func = "abundance")
-#' pro.NOGs.kernel <- compute.kernel(TARAoceans$pro.NOGs, kernel.func = "abundance")
+#' pro.phylo.kernel <- compute.kernel(TARAoceans$pro.phylo, 
+#'                                    kernel.func = "abundance")
+#' pro.NOGs.kernel <- compute.kernel(TARAoceans$pro.NOGs, 
+#'                                   kernel.func = "abundance")
 #' 
 #' # display similarities between kernels
 #' cim.kernel(phychem = phychem.kernel,
diff --git a/R/combine.kernels.R b/R/combine.kernels.R
index 6e04f62..f638542 100644
--- a/R/combine.kernels.R
+++ b/R/combine.kernels.R
@@ -5,21 +5,22 @@
 #' @details
 #' The arguments \code{method} allows to specify the Unsupervised Multiple
 #' Kernel Learning (UMKL) method to use: \itemize{
-#'   \item{\code{"STATIS-UMKL"}}{: combines input kernels into the best consensus 
-#'     of all kernels;}
+#'   \item{\code{"STATIS-UMKL"}}{: combines input kernels into the best 
+#'   consensus of all kernels;}
 #'   \item \code{"full-UMKL"}{: computes a kernel that minimizes the distortion 
-#'     between the meta-kernel and the k-NN graphs obtained from all input kernels;}
+#'   between the meta-kernel and the k-NN graphs obtained from all input 
+#'   kernels;}
 #'   \item \code{"sparse-UMKL"}{: a sparse variant of the \code{"full-UMKL"} 
-#'     approach.}}
+#'   approach.}}
 #'
-#' @param ... list of kernels (called 'blocks') computed on different datasets and
-#' measured on the same samples.
-#' @param scale boleean. If \code{scale = TRUE}, each block is standardized to zero
-#' mean and unit variance and cosine normalization is performed on the kernel.
-#' Default: \code{TRUE}.
-#' @param method character. Which method should be used to compute the meta-kernel. 
-#' Default: \code{"full-UMKL"}.
-#' @param knn integer. If \code{method = "sparse-UMKL"} or 
+#' @param ... list of kernels (called 'blocks') computed on different datasets 
+#' and measured on the same samples.
+#' @param scale boleean. If \code{scale = TRUE}, each block is standardized to 
+#' zero mean and unit variance and cosine normalization is performed on the 
+#' kernel. Default: \code{TRUE}.
+#' @param method character. Which method should be used to compute the 
+#' meta-kernel. Default: \code{"full-UMKL"}.
+#' @param knn integer. If \code{method = "sparse-UMKL"} or
 #' \code{method = "full-UMKL"}, number of neighbors used to get a proxy of the 
 #' local topology of the datasets from each kernel. Default: \code{5}.
 #' @param rho integer. Parameters for the augmented Lagrangian method. Default: 
@@ -29,15 +30,17 @@
 #' \code{"metaKernel"}, a list that contains the following components: \itemize{
 #'   \item{kernel}{: the computed meta-kernel matrix;}
 #'   \item{X}{: the dataset from which the kernel has been computed, as given by
-#'     the function \code{\link{compute.kernel}}. Can be \code{NULL} if a kernel
-#'     matrix was passed to this function;}
-#'   \item{weights}{: a vector containing the weights used to combine the kernels.} 
+#'   the function \code{\link{compute.kernel}}. Can be \code{NULL} if a kernel
+#'   matrix was passed to this function;}
+#'   \item{weights}{: a vector containing the weights used to combine the 
+#'   kernels.} 
 #' }
 #' 
 #' @author Jerome Mariette <jerome.mariette@@inrae.fr>
 #' Nathalie Vialaneix <nathalie.vialaneix@@inrae.fr>
-#' @references Mariette J. and Villa-Vialaneix N. (2018). Unsupervised multiple kernel learning for
-#' heterogeneous data integration . \emph{Bioinformatics}, \bold{34}(6), 1009-1015.
+#' @references Mariette J. and Villa-Vialaneix N. (2018). Unsupervised multiple 
+#' kernel learning for heterogeneous data integration . \emph{Bioinformatics}, 
+#' \bold{34}(6), 1009-1015.
 #' @seealso \code{\link{compute.kernel}}, \code{\link{kernel.pca}}
 #' @export
 #' @examples
diff --git a/R/compute.kernel.R b/R/compute.kernel.R
index 65a7f8c..06ccda4 100644
--- a/R/compute.kernel.R
+++ b/R/compute.kernel.R
@@ -4,36 +4,38 @@
 #'
 #' @param X a numeric matrix (or data frame) used to compute the kernel. 
 #' \code{NA}s not allowed.
-#' @param kernel.func the kernel function to use. This parameter can be set to any
-#' user defined kernel function. Widely used kernel functions are pre-implemented,
-#' that can be used by setting \code{kernel.func} to one of the following strings:
-#' \code{"kidentity"}, \code{"abundance"}, \code{"linear"}, 
+#' @param kernel.func the kernel function to use. This parameter can be set to 
+#' any user defined kernel function. Widely used kernel functions are 
+#' pre-implemented, that can be used by setting \code{kernel.func} to one of the
+#'  following strings: \code{"kidentity"}, \code{"abundance"}, \code{"linear"}, 
 #' \code{"gaussian.radial.basis"}, \code{"poisson"} or \code{"phylogenetic"}. 
 #' Default: \code{"linear"}.
-#' @param ... the kernel function arguments. Valid parameters for pre-implemented 
-#' kernels are: 
+#' @param ... the kernel function arguments. Valid parameters for 
+#' pre-implemented kernels are: 
 #'   \itemize{
 #'     \item \code{phylogenetic.tree} (\code{"phylogenetic"}): an instance of 
 #'     phylo-class that contains a phylogenetic tree (required).
 #'     \item \code{scale} (\code{"linear"} or \code{"gaussian.radial.basis"}): 
-#'       logical. Should the variables be scaled to unit variance prior the kernel 
-#'     computation? Default: \code{TRUE}.
+#'       logical. Should the variables be scaled to unit variance prior the 
+#'       kernel computation? Default: \code{TRUE}.
 #'     \item \code{sigma} (\code{"gaussian.radial.basis"}): double. The inverse 
 #'     kernel width used by \code{"gaussian.radial.basis"}.
-#'     \item \code{method} (\code{"phylogenetic"} or \code{"abundance"}): character.
-#'     Can be \code{"unifrac"} or \code{"wunifrac"} for \code{"phylogenetic"}. Which 
-#'     dissimilarity to use for \code{"abundance"}: one of \code{"bray"},
-#'     \code{"euclidean"}, \code{"canberra"}, \code{"manhattan"}, \code{"kulczynski"}, 
-#'     \code{"jaccard"}, \code{"gower"}, \code{"altGower"}, \code{"morisita"},
-#'     \code{"horn"}, \code{"mountford"}, \code{"raup"}, \code{"binomial"}, 
-#'     \code{"chao"} and \code{"cao"}.
-#'     \item \code{normalization} (\code{"poisson"}): character. Can be \code{"deseq"}
-#'     (more robust), \code{"mle"} (less robust) or \code{"quantile"}.}
+#'     \item \code{method} (\code{"phylogenetic"} or \code{"abundance"}): 
+#'     character. Can be \code{"unifrac"} or \code{"wunifrac"} for 
+#'     \code{"phylogenetic"}. Which dissimilarity to use for \code{"abundance"}:
+#'     one of \code{"bray"}, \code{"euclidean"}, \code{"canberra"}, 
+#'     \code{"manhattan"}, \code{"kulczynski"}, \code{"jaccard"}, 
+#'     \code{"gower"}, \code{"altGower"}, \code{"morisita"}, \code{"horn"}, 
+#'     \code{"mountford"}, \code{"raup"}, \code{"binomial"}, \code{"chao"} and 
+#'     \code{"cao"}.
+#'     \item \code{normalization} (\code{"poisson"}): character. Can be 
+#'     \code{"deseq"} (more robust), \code{"mle"} (less robust) or 
+#'     \code{"quantile"}.}
 #' @param test.pos.semidef boleean. If \code{test.pos.semidef = TRUE}, the 
-#' resulting matrix is tested to be positive-semidefinite.
+#' positive semidefiniteness of the resulting matrix is checked.
 #' 
-#' @return \code{compute.kernel} returns an object of classes \code{"kernel"}, a list that 
-#' contains the following components:
+#' @return \code{compute.kernel} returns an object of classes \code{"kernel"}, a
+#' list that contains the following components:
 #' \item{kernel}{: the computed kernel matrix.}
 #' \item{X}{: the original dataset. If \code{"kidentity"}, \code{X} is set to 
 #' \code{NULL}.}
@@ -42,14 +44,14 @@
 #' 
 #' @author Jerome Mariette <jerome.mariette@@inrae.fr>
 #' Nathalie Vialaneix <nathalie.vialaneix@@inrae.fr>
-#' @references Lozupone C. and Knight R. (2005). UniFrac: a new phylogenetic method for 
-#' comparing microbial communities. \emph{Applied and Environmental Microbiology},
-#' \bold{71}(12), 8228-8235.
+#' @references Lozupone C. and Knight R. (2005). UniFrac: a new phylogenetic 
+#' method for comparing microbial communities. \emph{Applied and Environmental 
+#' Microbiology}, \bold{71}(12), 8228-8235.
 #'
 #' Lozupone C., Hamady M., Kelley S.T. and Knight R. (2007). Quantitative and 
-#' qualitative beta diversity measures lead to different insights into factors that
-#' structure microbial communities. \emph{Applied and Environmental Microbiology}, 
-#' \bold{73}(5), 1576-1585.
+#' qualitative beta diversity measures lead to different insights into factors 
+#' that structure microbial communities. \emph{Applied and Environmental 
+#' Microbiology}, \bold{73}(5), 1576-1585.
 #' 
 #' Witten D. (2011). Classification and clustering of sequencing data using a 
 #' Poisson model. \emph{Annals of Applied Statistics}, \bold{5}(4), 2493-2518.
@@ -57,9 +59,11 @@
 #' @export
 #' @examples
 #' data(TARAoceans)
-#' pro.NOGs.kernel <- compute.kernel(TARAoceans$pro.NOGs, kernel.func = "abundance")
+#' pro.NOGs.kernel <- compute.kernel(TARAoceans$pro.NOGs, 
+#'                                   kernel.func = "abundance")
 #' 
-compute.kernel <- function(X, kernel.func = "linear", ..., test.pos.semidef = FALSE) {
+compute.kernel <- function(X, kernel.func = "linear", ..., 
+                           test.pos.semidef = FALSE) {
   
   #-- checking general input parameters --#
   
diff --git a/R/kernel.pca.R b/R/kernel.pca.R
index bf8ee89..bb54efa 100644
--- a/R/kernel.pca.R
+++ b/R/kernel.pca.R
@@ -6,22 +6,23 @@
 #' \code{combine.kernels}.
 #' @param ncomp integer. Indicates the number of components to return..
 #' 
-#' @return \code{kernel.pca} returns an object of classes \code{"kernel.pca"} and 
-#' \code{"pca"}, which is a list containing the following entries: \itemize{
+#' @return \code{kernel.pca} returns an object of classes \code{"kernel.pca"} 
+#' and \code{"pca"}, which is a list containing the following entries: \itemize{
 #'   \item{ncomp}{: the number of principal components;}
 #'   \item{X}{: the input kernel matrix;} 
 #'   \item{kernel}{: the input kernel object provided by the user;}
 #'   \item{sdev}{: the singular values (square root of the eigenvalues);} 
-#'   \item{rotation}{: the matrix of variable loadings (\emph{i.e.}, a matrix whose
-#'                                                      columns contain the eigenvectors);}
+#'   \item{rotation}{: the matrix of variable loadings (\emph{i.e.}, a matrix 
+#'   whose columns contain the eigenvectors);}
 #'   \item{loadings}{: same as 'rotation' to keep the mixOmics spirit;}
 #'   \item{x}{: same as 'rotation' to keep the mixOmics spirit;}
 #' }
 #' 
 #' @author Jerome Mariette <jerome.mariette@@inrae.fr>
 #' Nathalie Vialaneix <nathalie.vialaneix@@inrae.fr>
-#' @references Scholkopf B., Smola A. and Muller K.R. (1998) Nonlinear component analysis as a
-#' kernel eigenvalue problem. \emph{Neural Computation}, \bold{10}, 1299-1319.
+#' @references Scholkopf B., Smola A. and Muller K.R. (1998) Nonlinear component 
+#' analysis as a kernel eigenvalue problem. \emph{Neural Computation}, 
+#' \bold{10}, 1299-1319.
 #' @seealso \code{\link{compute.kernel}}, \code{\link{combine.kernels}}
 #' @export
 #' @examples
diff --git a/R/kernel.pca.permute.R b/R/kernel.pca.permute.R
index 01ab3d2..ea9ed1d 100644
--- a/R/kernel.pca.permute.R
+++ b/R/kernel.pca.permute.R
@@ -1,39 +1,41 @@
 #' Assess variable importance
 #' 
-#' Assess importance of variables on a given PC component by computing 
-#' the Crone-Crosby distance between original sample positions and sample positions 
-#' obtain by a random permutation of the variables.
+#' Assess importance of variables on a given PC component by computing the 
+#' Crone-Crosby distance between original sample positions and sample positions 
+#' obtained by a random permutation of the variables.
 #'
 #' @details
-#' \code{plotVar.kernel.pca} produces a barplot for each block. The variables for which the 
-#' importance has been computed with \code{\link{kernel.pca.permute}} are 
-#' displayed. The representation is limited to the \code{ndisplay} most important 
-#' variables.
+#' \code{plotVar.kernel.pca} produces a barplot for each block. The variables 
+#' for which the importance has been computed with 
+#' \code{\link{kernel.pca.permute}} are displayed. The representation is limited 
+#' to the \code{ndisplay} most important variables.
 #'
-#' @param kpca.result a kernel.pca object returned by the \code{\link{kernel.pca}}
-#' function.
-#' @param ncomp integer. Number of KPCA components used to compute the importance. 
-#' Default: \code{1}.
-#' @param ... list of character vectors. The parameter name must be the kernel name 
-#' to be considered for permutation of variables. Provided vectors length has to be 
-#' equal to the number of variables of the input dataset. A kernel is performed on 
-#' each unique variables values. Crone-Crosby distances are computed on each KPCA 
-#' performed on resulted kernels or meta-kernels and can be displayed using the 
-#' \code{\link{plotVar.kernel.pca}}.
-#' @param directory character. To limit computational burden, this argument allows
-#' to store / read temporary computed kernels.
+#' @param kpca.result a kernel.pca object returned by the
+#' \code{\link{kernel.pca}} function.
+#' @param ncomp integer. Number of KPCA components used to compute the 
+#' importance. Default: \code{1}.
+#' @param ... list of character vectors. The parameter name must be the kernel 
+#' name to be considered for permutation of variables. Provided vectors length 
+#' has to be equal to the number of variables of the input dataset. A kernel is 
+#' performed on each unique variables values. Crone-Crosby distances are 
+#' computed on each KPCA performed on resulted kernels or meta-kernels and can 
+#' be displayed using the \code{\link{plotVar.kernel.pca}}.
+#' @param directory character. To limit computational burden, this argument 
+#' allows to store / read temporary computed kernels.
 #' 
-#' @return \code{kernel.pca.permute} returns a copy of the input \code{kpca.result}
-#' results and add values in the three entries: \code{cc.distances}, 
-#' \code{cc.variables} and \code{cc.blocks}.
+#' @return \code{kernel.pca.permute} returns a copy of the input 
+#' \code{kpca.result} results and add values in the three entries: 
+#' \code{cc.distances}, \code{cc.variables} and \code{cc.blocks}.
 #' 
 #' @author Jerome Mariette <jerome.mariette@@inrae.fr>
 #' Nathalie Vialaneix <nathalie.vialaneix@@inrae.fr>
-#' @references Mariette J. and Villa-Vialaneix N. (2018). Unsupervised multiple kernel learning
-#' for heterogeneous data integration. \emph{Bioinformatics}, \bold{34}(6), 1009-1015.
+#' @references Mariette J. and Villa-Vialaneix N. (2018). Unsupervised multiple 
+#' kernel learning for heterogeneous data integration. \emph{Bioinformatics}, 
+#' \bold{34}(6), 1009-1015.
 #' 
-#' Crone L. and Crosby D. (1995). Statistical applications of a metric on subspaces
-#' to satellite meteorology. \emph{Technometrics}, \bold{37}(3), 324-328.
+#' Crone L. and Crosby D. (1995). Statistical applications of a metric on 
+#' subspaces to satellite meteorology. \emph{Technometrics}, \bold{37}(3), 
+#' 324-328.
 #' @seealso \code{\link{compute.kernel}}, \code{\link{kernel.pca}}
 #' @export
 #' @examples
@@ -45,7 +47,8 @@
 #' kernel.pca.result <- kernel.pca(phychem.kernel)
 #' 
 #' # compute importance for all variables in this kernel
-#' kernel.pca.result <- kernel.pca.permute(kernel.pca.result, phychem = colnames(TARAoceans$phychem))
+#' kernel.pca.result <- kernel.pca.permute(kernel.pca.result, 
+#'                                         phychem = colnames(TARAoceans$phychem))
 #' 
 kernel.pca.permute = function(kpca.result, ncomp = 1, ..., directory = NULL) {
   
diff --git a/R/select.features.R b/R/select.features.R
index 774ac20..cee4e2b 100644
--- a/R/select.features.R
+++ b/R/select.features.R
@@ -5,10 +5,12 @@ if(getRversion() >= "2.15.1")  utils::globalVariables(c("kokfspy"))
 #' Select features using supervised or unsupervised kernel method. A 
 #' supervised feature selection method is performed if \code{Y} is provided.
 #'
-#' @param X a numeric matrix (or data frame) used to select variables. \code{NA}s not allowed.
-#' @param Y a numeric matrix (or data frame) used to select variables. \code{NA}s not allowed.
-#' @param kx.func the kernel function name to use on \code{X}. Widely used kernel
-#' functions are pre-implemented, and can be directly used by setting 
+#' @param X a numeric matrix (or data frame) used to select variables. 
+#' \code{NA}s not allowed.
+#' @param Y a numeric matrix (or data frame) used to select variables. 
+#' \code{NA}s not allowed.
+#' @param kx.func the kernel function name to use on \code{X}. Widely used 
+#' kernel functions are pre-implemented, and can be directly used by setting 
 #' \code{kx.func} to one of the following values: \code{"linear"}, 
 #' \code{"gaussian.radial.basis"} or \code{"bray"}. Default: \code{"linear"}. If 
 #' \code{Y} is provided, the kernel \code{"bray"} is not allowed.
@@ -20,19 +22,21 @@ if(getRversion() >= "2.15.1")  utils::globalVariables(c("kokfspy"))
 #' method (\code{"kernel"}), a kernel PCA oriented variable selection method 
 #' (\code{"kpca"}) or a structure driven variable selection selection 
 #' (\code{"graph"}). Default: \code{"kernel"}.
-#' @param lambda the penalization parameter that controls the trade-off between the
-#' minimization of the distorsion and the sparsity of the solution parameter.
+#' @param lambda the penalization parameter that controls the trade-off between 
+#' the minimization of the distorsion and the sparsity of the solution 
+#' parameter.
 #' @param n_components how many principal components should be used with method
 #' \code{"kpca"}. Required with method \code{"kpca"}. Default: \code{2}.
-#' @param Lg the Laplacian matrix of the graph representing relations between the 
-#' input dataset variables. Required with method \code{"graph"}.
+#' @param Lg the Laplacian matrix of the graph representing relations between 
+#' the input dataset variables. Required with method \code{"graph"}.
 #' @param mu the penalization parameter that controls the trade-off between the
 #' the distorsion and the influence of the graph. Default: \code{1}.
 #' @param max_iter the maximum number of iterations. Default: \code{100}.
-#' @param nstep the number of values used for the regularization path. Default: \code{50}.
-#' @param ... the kernel function arguments. In particular \code{sigma}
-#' (\code{"gaussian.radial.basis"}): double. The inverse kernel width used by
-#' \code{"gaussian.radial.basis"}.
+#' @param nstep the number of values used for the regularization path. Default: 
+#' \code{50}. 
+#' @param ... the kernel function arguments. In particular, 
+#' \code{sigma}(\code{"gaussian.radial.basis"}): double. The inverse kernel 
+#' width used by \code{"gaussian.radial.basis"}.
 #' 
 #' @return \code{ukfs} returns a vector of sorted selected features indexes.
 #' 
@@ -60,8 +64,8 @@ if(getRversion() >= "2.15.1")  utils::globalVariables(c("kokfspy"))
 #'  grb.func <- "gaussian.radial.basis"
 #'  genes <- center.scale(nutrimouse$gene)
 #'  lipids <- center.scale(nutrimouse$lipid)
-#'  sf.res <- select.features(genes, lipids, kx.func = grb.func, ky.func = grb.func,
-#'                            keepX = 40)
+#'  sf.res <- select.features(genes, lipids, kx.func = grb.func, 
+#'                            ky.func = grb.func, keepX = 40)
 #'  colnames(nutrimouse$gene)[sf.res]
 #' }
 #' 
diff --git a/man/TARAoceans.Rd b/man/TARAoceans.Rd
index 0ed1695..30036e7 100644
--- a/man/TARAoceans.Rd
+++ b/man/TARAoceans.Rd
@@ -23,7 +23,8 @@ A list containing the following components:
 }
 }
 \source{
-The raw data were downloaded from \url{http://ocean-microbiome.embl.de/companion.html}.
+The raw data were downloaded from 
+\url{http://ocean-microbiome.embl.de/companion.html}.
 }
 \usage{
 data(TARAoceans)
@@ -31,26 +32,27 @@ data(TARAoceans)
 \description{
 The TARA Oceans expedition facilitated the study of plankton communities by 
 providing oceans metagenomic data combined with environmental measures to the 
-scientific community. This dataset focuses on 139 prokaryotic-enriched samples 
-collected from 68 stations and spread across three depth layers: the surface 
-(SRF), the deep chlorophyll maximum (DCM) layer and the mesopelagic (MES) zones. 
-Samples were located in height different oceans or seas: Indian Ocean (IO), 
-Mediterranean Sea (MS), North Atlantic Ocean (NAO), North Pacific Ocean (NPO), 
-Red Sea (RS), South Atlantic Ocean (SAO), South Pacific Ocean (SPO) and South 
-Ocean (SO). Here, only a subset of the original data is provided (1\% of the 
-35,650 prokaryotic operational taxonomic units (OTUs) and of the 39,246 
-bacterial genes (NOGs) (selected at random).
+scientific community. This dataset focuses on 139 prokaryotic-enriched 
+samples collected from 68 stations and spread across three depth layers: the 
+surface (SRF), the deep chlorophyll maximum (DCM) layer and the mesopelagic 
+(MES) zones. Samples were located in height different oceans or seas: Indian 
+Ocean (IO), Mediterranean Sea (MS), North Atlantic Ocean (NAO), North Pacific
+Ocean (NPO), Red Sea (RS), South Atlantic Ocean (SAO), South Pacific Ocean 
+(SPO) and South Ocean (SO). Here, only a subset of the original data is 
+provided (1\% of the 35,650 prokaryotic operational taxonomic units (OTUs) 
+and of the 39,246 bacterial genes (NOGs) (selected at random).
 }
 \references{
-Sunagawa S., Coelho L.P., Chaffron S., Kultima J.R., Labadie K., Salazar F., 
-Djahanschiri B., Zeller G., Mende D.R., Alberti A., Cornejo-Castillo F., 
-Costea P.I., Cruaud C., d'Oviedo F., Engelen S., Ferrera I., Gasol J., Guidi L.,
-Hildebrand F., Kokoszka F., Lepoivre C., Lima-Mendez G., Poulain J., Poulos B., 
-Royo-Llonch M., Sarmento H., Vieira-Silva S., Dimier C., Picheral M., Searson 
-S., Kandels-Lewis S., \emph{Tara} Oceans coordinators, Bowler C., de Vargas C.,
-Gorsky G., Grimsley N., Hingamp P., Iudicone D., Jaillon O., Not F., Ogata H., 
-Pesant S., Speich S., Stemmann L., Sullivan M., Weissenbach J., Wincker P., 
-Karsenti E., Raes J., Acinas S. and Bork P. (2015). Structure and function of 
-the global ocean microbiome. \emph{Science}, \bold{348}, 6237.
+Sunagawa S., Coelho L.P., Chaffron S., Kultima J.R., Labadie K., 
+Salazar F., Djahanschiri B., Zeller G., Mende D.R., Alberti A., 
+Cornejo-Castillo F., Costea P.I., Cruaud C., d'Oviedo F., Engelen S., 
+Ferrera I., Gasol J., Guidi L., Hildebrand F., Kokoszka F., Lepoivre C., 
+Lima-Mendez G., Poulain J., Poulos B., Royo-Llonch M., Sarmento H., 
+Vieira-Silva S., Dimier C., Picheral M., Searson S., Kandels-Lewis S., 
+\emph{Tara} Oceans coordinators, Bowler C., de Vargas C., Gorsky G., 
+Grimsley N., Hingamp P., Iudicone D., Jaillon O., Not F., Ogata H., Pesant 
+S., Speich S., Stemmann L., Sullivan M., Weissenbach J., Wincker P., Karsenti 
+E., Raes J., Acinas S. and Bork P. (2015). Structure and function of the 
+global ocean microbiome. \emph{Science}, \bold{348}, 6237.
 }
 \keyword{datasets}
diff --git a/man/cim.kernel.Rd b/man/cim.kernel.Rd
index a4ffe14..6af08bb 100644
--- a/man/cim.kernel.Rd
+++ b/man/cim.kernel.Rd
@@ -11,19 +11,19 @@ cim.kernel(
 )
 }
 \arguments{
-\item{...}{list of kernels (called 'blocks') computed on different datasets and
-measured on the same samples.}
+\item{...}{list of kernels (called 'blocks') computed on different datasets 
+and measured on the same samples.}
 
-\item{scale}{boleean. If \code{scale = TRUE}, each block is standardized to zero
-mean and unit variance and cosine normalization is performed on the kernel.
-Default: \code{TRUE}.}
+\item{scale}{boleean. If \code{scale = TRUE}, each block is standardized to 
+zero mean and unit variance and cosine normalization is performed on the 
+kernel. Default: \code{TRUE}.}
 
-\item{method}{character. The visualization method to be used. Currently, seven
-methods are supported (see Details).}
+\item{method}{character. The visualization method to be used. Currently, 
+seven methods are supported (see Details).}
 }
 \value{
-\code{cim.kernel} returns a matrix containing the cosine from Frobenius norm 
-between kernels.
+\code{cim.kernel} returns a matrix containing the cosine from 
+Frobenius norm between kernels.
 }
 \description{
 Compute cosine from Frobenius norm between kernels and display the 
@@ -33,19 +33,21 @@ corresponding correlation plot.
 The displayed similarities are the kernel generalization of the 
 RV-coefficient described in Lavit \emph{et al.}, 1994.
 
-The plot is displayed using the \code{\link[corrplot]{corrplot}} package. Seven 
-visualization methods are implemented: \code{"circle"} (default), 
+The plot is displayed using the \code{\link[corrplot]{corrplot}} package. 
+Seven visualization methods are implemented: \code{"circle"} (default), 
 \code{"square"}, \code{"number"}, \code{"pie"}, \code{"shade"} and 
-\code{"color"}. Circle and square areas are proportional to the absolute value
-of corresponding similarities coefficients.
+\code{"color"}. Circle and square areas are proportional to the absolute 
+value of corresponding similarities coefficients.
 }
 \examples{
 data(TARAoceans)
 
 # compute one kernel per dataset
 phychem.kernel <- compute.kernel(TARAoceans$phychem, kernel.func = "linear")
-pro.phylo.kernel <- compute.kernel(TARAoceans$pro.phylo, kernel.func = "abundance")
-pro.NOGs.kernel <- compute.kernel(TARAoceans$pro.NOGs, kernel.func = "abundance")
+pro.phylo.kernel <- compute.kernel(TARAoceans$pro.phylo, 
+                                   kernel.func = "abundance")
+pro.NOGs.kernel <- compute.kernel(TARAoceans$pro.NOGs, 
+                                  kernel.func = "abundance")
 
 # display similarities between kernels
 cim.kernel(phychem = phychem.kernel,
@@ -55,12 +57,13 @@ cim.kernel(phychem = phychem.kernel,
 
 }
 \references{
-Lavit C., Escoufier Y., Sabatier R. and Traissac P. (1994). The ACT (STATIS
-method). \emph{Computational Statistics and Data Analysis}, \bold{18}(1), 
-97-119.
+Lavit C., Escoufier Y., Sabatier R. and Traissac P. (1994). The 
+ACT (STATIS method). \emph{Computational Statistics and Data Analysis}, 
+\bold{18}(1), 97-119.
 
-Mariette J. and Villa-Vialaneix N. (2018). Unsupervised multiple kernel learning
-for heterogeneous data integration. \emph{Bioinformatics}, \bold{34}(6), 1009-1015.
+Mariette J. and Villa-Vialaneix N. (2018). Unsupervised multiple kernel 
+learning for heterogeneous data integration. \emph{Bioinformatics}, 
+\bold{34}(6), 1009-1015.
 }
 \seealso{
 \code{\link{compute.kernel}}
diff --git a/man/combine.kernels.Rd b/man/combine.kernels.Rd
index 9c1a946..7ce91cd 100644
--- a/man/combine.kernels.Rd
+++ b/man/combine.kernels.Rd
@@ -13,17 +13,17 @@ combine.kernels(
 )
 }
 \arguments{
-\item{...}{list of kernels (called 'blocks') computed on different datasets and
-measured on the same samples.}
+\item{...}{list of kernels (called 'blocks') computed on different datasets 
+and measured on the same samples.}
 
-\item{scale}{boleean. If \code{scale = TRUE}, each block is standardized to zero
-mean and unit variance and cosine normalization is performed on the kernel.
-Default: \code{TRUE}.}
+\item{scale}{boleean. If \code{scale = TRUE}, each block is standardized to 
+zero mean and unit variance and cosine normalization is performed on the 
+kernel. Default: \code{TRUE}.}
 
-\item{method}{character. Which method should be used to compute the meta-kernel. 
-Default: \code{"full-UMKL"}.}
+\item{method}{character. Which method should be used to compute the 
+meta-kernel. Default: \code{"full-UMKL"}.}
 
-\item{knn}{integer. If \code{method = "sparse-UMKL"} or 
+\item{knn}{integer. If \code{method = "sparse-UMKL"} or
 \code{method = "full-UMKL"}, number of neighbors used to get a proxy of the 
 local topology of the datasets from each kernel. Default: \code{5}.}
 
@@ -35,9 +35,10 @@ local topology of the datasets from each kernel. Default: \code{5}.}
 \code{"metaKernel"}, a list that contains the following components: \itemize{
   \item{kernel}{: the computed meta-kernel matrix;}
   \item{X}{: the dataset from which the kernel has been computed, as given by
-    the function \code{\link{compute.kernel}}. Can be \code{NULL} if a kernel
-    matrix was passed to this function;}
-  \item{weights}{: a vector containing the weights used to combine the kernels.} 
+  the function \code{\link{compute.kernel}}. Can be \code{NULL} if a kernel
+  matrix was passed to this function;}
+  \item{weights}{: a vector containing the weights used to combine the 
+  kernels.} 
 }
 }
 \description{
@@ -46,12 +47,13 @@ Compute multiple kernels into a single meta-kernel
 \details{
 The arguments \code{method} allows to specify the Unsupervised Multiple
 Kernel Learning (UMKL) method to use: \itemize{
-  \item{\code{"STATIS-UMKL"}}{: combines input kernels into the best consensus 
-    of all kernels;}
+  \item{\code{"STATIS-UMKL"}}{: combines input kernels into the best 
+  consensus of all kernels;}
   \item \code{"full-UMKL"}{: computes a kernel that minimizes the distortion 
-    between the meta-kernel and the k-NN graphs obtained from all input kernels;}
+  between the meta-kernel and the k-NN graphs obtained from all input 
+  kernels;}
   \item \code{"sparse-UMKL"}{: a sparse variant of the \code{"full-UMKL"} 
-    approach.}}
+  approach.}}
 }
 \examples{
 data(TARAoceans)
@@ -69,8 +71,9 @@ meta.kernel <- combine.kernels(phychem = phychem.kernel,
 
 }
 \references{
-Mariette J. and Villa-Vialaneix N. (2018). Unsupervised multiple kernel learning for
-heterogeneous data integration . \emph{Bioinformatics}, \bold{34}(6), 1009-1015.
+Mariette J. and Villa-Vialaneix N. (2018). Unsupervised multiple 
+kernel learning for heterogeneous data integration . \emph{Bioinformatics}, 
+\bold{34}(6), 1009-1015.
 }
 \seealso{
 \code{\link{compute.kernel}}, \code{\link{kernel.pca}}
diff --git a/man/compute.kernel.Rd b/man/compute.kernel.Rd
index 527c5d1..57f947a 100644
--- a/man/compute.kernel.Rd
+++ b/man/compute.kernel.Rd
@@ -10,39 +10,41 @@ compute.kernel(X, kernel.func = "linear", ..., test.pos.semidef = FALSE)
 \item{X}{a numeric matrix (or data frame) used to compute the kernel. 
 \code{NA}s not allowed.}
 
-\item{kernel.func}{the kernel function to use. This parameter can be set to any
-user defined kernel function. Widely used kernel functions are pre-implemented,
-that can be used by setting \code{kernel.func} to one of the following strings:
-\code{"kidentity"}, \code{"abundance"}, \code{"linear"}, 
+\item{kernel.func}{the kernel function to use. This parameter can be set to 
+any user defined kernel function. Widely used kernel functions are 
+pre-implemented, that can be used by setting \code{kernel.func} to one of the
+ following strings: \code{"kidentity"}, \code{"abundance"}, \code{"linear"}, 
 \code{"gaussian.radial.basis"}, \code{"poisson"} or \code{"phylogenetic"}. 
 Default: \code{"linear"}.}
 
-\item{...}{the kernel function arguments. Valid parameters for pre-implemented 
-kernels are: 
+\item{...}{the kernel function arguments. Valid parameters for 
+pre-implemented kernels are: 
   \itemize{
     \item \code{phylogenetic.tree} (\code{"phylogenetic"}): an instance of 
     phylo-class that contains a phylogenetic tree (required).
     \item \code{scale} (\code{"linear"} or \code{"gaussian.radial.basis"}): 
-      logical. Should the variables be scaled to unit variance prior the kernel 
-    computation? Default: \code{TRUE}.
+      logical. Should the variables be scaled to unit variance prior the 
+      kernel computation? Default: \code{TRUE}.
     \item \code{sigma} (\code{"gaussian.radial.basis"}): double. The inverse 
     kernel width used by \code{"gaussian.radial.basis"}.
-    \item \code{method} (\code{"phylogenetic"} or \code{"abundance"}): character.
-    Can be \code{"unifrac"} or \code{"wunifrac"} for \code{"phylogenetic"}. Which 
-    dissimilarity to use for \code{"abundance"}: one of \code{"bray"},
-    \code{"euclidean"}, \code{"canberra"}, \code{"manhattan"}, \code{"kulczynski"}, 
-    \code{"jaccard"}, \code{"gower"}, \code{"altGower"}, \code{"morisita"},
-    \code{"horn"}, \code{"mountford"}, \code{"raup"}, \code{"binomial"}, 
-    \code{"chao"} and \code{"cao"}.
-    \item \code{normalization} (\code{"poisson"}): character. Can be \code{"deseq"}
-    (more robust), \code{"mle"} (less robust) or \code{"quantile"}.}}
+    \item \code{method} (\code{"phylogenetic"} or \code{"abundance"}): 
+    character. Can be \code{"unifrac"} or \code{"wunifrac"} for 
+    \code{"phylogenetic"}. Which dissimilarity to use for \code{"abundance"}:
+    one of \code{"bray"}, \code{"euclidean"}, \code{"canberra"}, 
+    \code{"manhattan"}, \code{"kulczynski"}, \code{"jaccard"}, 
+    \code{"gower"}, \code{"altGower"}, \code{"morisita"}, \code{"horn"}, 
+    \code{"mountford"}, \code{"raup"}, \code{"binomial"}, \code{"chao"} and 
+    \code{"cao"}.
+    \item \code{normalization} (\code{"poisson"}): character. Can be 
+    \code{"deseq"} (more robust), \code{"mle"} (less robust) or 
+    \code{"quantile"}.}}
 
 \item{test.pos.semidef}{boleean. If \code{test.pos.semidef = TRUE}, the 
-resulting matrix is tested to be positive-semidefinite.}
+positive semidefiniteness of the resulting matrix is checked.}
 }
 \value{
-\code{compute.kernel} returns an object of classes \code{"kernel"}, a list that 
-contains the following components:
+\code{compute.kernel} returns an object of classes \code{"kernel"}, a
+list that contains the following components:
 \item{kernel}{: the computed kernel matrix.}
 \item{X}{: the original dataset. If \code{"kidentity"}, \code{X} is set to 
 \code{NULL}.}
@@ -54,18 +56,19 @@ Compute a kernel from a given data matrix.
 }
 \examples{
 data(TARAoceans)
-pro.NOGs.kernel <- compute.kernel(TARAoceans$pro.NOGs, kernel.func = "abundance")
+pro.NOGs.kernel <- compute.kernel(TARAoceans$pro.NOGs, 
+                                  kernel.func = "abundance")
 
 }
 \references{
-Lozupone C. and Knight R. (2005). UniFrac: a new phylogenetic method for 
-comparing microbial communities. \emph{Applied and Environmental Microbiology},
-\bold{71}(12), 8228-8235.
+Lozupone C. and Knight R. (2005). UniFrac: a new phylogenetic 
+method for comparing microbial communities. \emph{Applied and Environmental 
+Microbiology}, \bold{71}(12), 8228-8235.
 
 Lozupone C., Hamady M., Kelley S.T. and Knight R. (2007). Quantitative and 
-qualitative beta diversity measures lead to different insights into factors that
-structure microbial communities. \emph{Applied and Environmental Microbiology}, 
-\bold{73}(5), 1576-1585.
+qualitative beta diversity measures lead to different insights into factors 
+that structure microbial communities. \emph{Applied and Environmental 
+Microbiology}, \bold{73}(5), 1576-1585.
 
 Witten D. (2011). Classification and clustering of sequencing data using a 
 Poisson model. \emph{Annals of Applied Statistics}, \bold{5}(4), 2493-2518.
diff --git a/man/kernel.pca.Rd b/man/kernel.pca.Rd
index b355fd9..11a99f1 100644
--- a/man/kernel.pca.Rd
+++ b/man/kernel.pca.Rd
@@ -13,14 +13,14 @@ kernel.pca(K, ncomp = nrow(K$kernel))
 \item{ncomp}{integer. Indicates the number of components to return..}
 }
 \value{
-\code{kernel.pca} returns an object of classes \code{"kernel.pca"} and 
-\code{"pca"}, which is a list containing the following entries: \itemize{
+\code{kernel.pca} returns an object of classes \code{"kernel.pca"} 
+and \code{"pca"}, which is a list containing the following entries: \itemize{
   \item{ncomp}{: the number of principal components;}
   \item{X}{: the input kernel matrix;} 
   \item{kernel}{: the input kernel object provided by the user;}
   \item{sdev}{: the singular values (square root of the eigenvalues);} 
-  \item{rotation}{: the matrix of variable loadings (\emph{i.e.}, a matrix whose
-                                                     columns contain the eigenvectors);}
+  \item{rotation}{: the matrix of variable loadings (\emph{i.e.}, a matrix 
+  whose columns contain the eigenvectors);}
   \item{loadings}{: same as 'rotation' to keep the mixOmics spirit;}
   \item{x}{: same as 'rotation' to keep the mixOmics spirit;}
 }
@@ -35,8 +35,9 @@ kernel.pca.result <- kernel.pca(phychem.kernel, ncomp = 3)
 
 }
 \references{
-Scholkopf B., Smola A. and Muller K.R. (1998) Nonlinear component analysis as a
-kernel eigenvalue problem. \emph{Neural Computation}, \bold{10}, 1299-1319.
+Scholkopf B., Smola A. and Muller K.R. (1998) Nonlinear component 
+analysis as a kernel eigenvalue problem. \emph{Neural Computation}, 
+\bold{10}, 1299-1319.
 }
 \seealso{
 \code{\link{compute.kernel}}, \code{\link{combine.kernels}}
diff --git a/man/kernel.pca.permute.Rd b/man/kernel.pca.permute.Rd
index a0815d3..e6cd253 100644
--- a/man/kernel.pca.permute.Rd
+++ b/man/kernel.pca.permute.Rd
@@ -7,37 +7,37 @@
 kernel.pca.permute(kpca.result, ncomp = 1, ..., directory = NULL)
 }
 \arguments{
-\item{kpca.result}{a kernel.pca object returned by the \code{\link{kernel.pca}}
-function.}
+\item{kpca.result}{a kernel.pca object returned by the
+\code{\link{kernel.pca}} function.}
 
-\item{ncomp}{integer. Number of KPCA components used to compute the importance. 
-Default: \code{1}.}
+\item{ncomp}{integer. Number of KPCA components used to compute the 
+importance. Default: \code{1}.}
 
-\item{...}{list of character vectors. The parameter name must be the kernel name 
-to be considered for permutation of variables. Provided vectors length has to be 
-equal to the number of variables of the input dataset. A kernel is performed on 
-each unique variables values. Crone-Crosby distances are computed on each KPCA 
-performed on resulted kernels or meta-kernels and can be displayed using the 
-\code{\link{plotVar.kernel.pca}}.}
+\item{...}{list of character vectors. The parameter name must be the kernel 
+name to be considered for permutation of variables. Provided vectors length 
+has to be equal to the number of variables of the input dataset. A kernel is 
+performed on each unique variables values. Crone-Crosby distances are 
+computed on each KPCA performed on resulted kernels or meta-kernels and can 
+be displayed using the \code{\link{plotVar.kernel.pca}}.}
 
-\item{directory}{character. To limit computational burden, this argument allows
-to store / read temporary computed kernels.}
+\item{directory}{character. To limit computational burden, this argument 
+allows to store / read temporary computed kernels.}
 }
 \value{
-\code{kernel.pca.permute} returns a copy of the input \code{kpca.result}
-results and add values in the three entries: \code{cc.distances}, 
-\code{cc.variables} and \code{cc.blocks}.
+\code{kernel.pca.permute} returns a copy of the input 
+\code{kpca.result} results and add values in the three entries: 
+\code{cc.distances}, \code{cc.variables} and \code{cc.blocks}.
 }
 \description{
-Assess importance of variables on a given PC component by computing 
-the Crone-Crosby distance between original sample positions and sample positions 
-obtain by a random permutation of the variables.
+Assess importance of variables on a given PC component by computing the 
+Crone-Crosby distance between original sample positions and sample positions 
+obtained by a random permutation of the variables.
 }
 \details{
-\code{plotVar.kernel.pca} produces a barplot for each block. The variables for which the 
-importance has been computed with \code{\link{kernel.pca.permute}} are 
-displayed. The representation is limited to the \code{ndisplay} most important 
-variables.
+\code{plotVar.kernel.pca} produces a barplot for each block. The variables 
+for which the importance has been computed with 
+\code{\link{kernel.pca.permute}} are displayed. The representation is limited 
+to the \code{ndisplay} most important variables.
 }
 \examples{
 data(TARAoceans)
@@ -48,15 +48,18 @@ phychem.kernel <- compute.kernel(TARAoceans$phychem, kernel.func = "linear")
 kernel.pca.result <- kernel.pca(phychem.kernel)
 
 # compute importance for all variables in this kernel
-kernel.pca.result <- kernel.pca.permute(kernel.pca.result, phychem = colnames(TARAoceans$phychem))
+kernel.pca.result <- kernel.pca.permute(kernel.pca.result, 
+                                        phychem = colnames(TARAoceans$phychem))
 
 }
 \references{
-Mariette J. and Villa-Vialaneix N. (2018). Unsupervised multiple kernel learning
-for heterogeneous data integration. \emph{Bioinformatics}, \bold{34}(6), 1009-1015.
+Mariette J. and Villa-Vialaneix N. (2018). Unsupervised multiple 
+kernel learning for heterogeneous data integration. \emph{Bioinformatics}, 
+\bold{34}(6), 1009-1015.
 
-Crone L. and Crosby D. (1995). Statistical applications of a metric on subspaces
-to satellite meteorology. \emph{Technometrics}, \bold{37}(3), 324-328.
+Crone L. and Crosby D. (1995). Statistical applications of a metric on 
+subspaces to satellite meteorology. \emph{Technometrics}, \bold{37}(3), 
+324-328.
 }
 \seealso{
 \code{\link{compute.kernel}}, \code{\link{kernel.pca}}
diff --git a/man/select.features.Rd b/man/select.features.Rd
index 3c88087..b682abc 100644
--- a/man/select.features.Rd
+++ b/man/select.features.Rd
@@ -21,12 +21,14 @@
 )
 }
 \arguments{
-\item{X}{a numeric matrix (or data frame) used to select variables. \code{NA}s not allowed.}
+\item{X}{a numeric matrix (or data frame) used to select variables. 
+\code{NA}s not allowed.}
 
-\item{Y}{a numeric matrix (or data frame) used to select variables. \code{NA}s not allowed.}
+\item{Y}{a numeric matrix (or data frame) used to select variables. 
+\code{NA}s not allowed.}
 
-\item{kx.func}{the kernel function name to use on \code{X}. Widely used kernel
-functions are pre-implemented, and can be directly used by setting 
+\item{kx.func}{the kernel function name to use on \code{X}. Widely used 
+kernel functions are pre-implemented, and can be directly used by setting 
 \code{kx.func} to one of the following values: \code{"linear"}, 
 \code{"gaussian.radial.basis"} or \code{"bray"}. Default: \code{"linear"}. If 
 \code{Y} is provided, the kernel \code{"bray"} is not allowed.}
@@ -42,25 +44,27 @@ method (\code{"kernel"}), a kernel PCA oriented variable selection method
 (\code{"kpca"}) or a structure driven variable selection selection 
 (\code{"graph"}). Default: \code{"kernel"}.}
 
-\item{lambda}{the penalization parameter that controls the trade-off between the
-minimization of the distorsion and the sparsity of the solution parameter.}
+\item{lambda}{the penalization parameter that controls the trade-off between 
+the minimization of the distorsion and the sparsity of the solution 
+parameter.}
 
 \item{n_components}{how many principal components should be used with method
 \code{"kpca"}. Required with method \code{"kpca"}. Default: \code{2}.}
 
-\item{Lg}{the Laplacian matrix of the graph representing relations between the 
-input dataset variables. Required with method \code{"graph"}.}
+\item{Lg}{the Laplacian matrix of the graph representing relations between 
+the input dataset variables. Required with method \code{"graph"}.}
 
 \item{mu}{the penalization parameter that controls the trade-off between the
 the distorsion and the influence of the graph. Default: \code{1}.}
 
 \item{max_iter}{the maximum number of iterations. Default: \code{100}.}
 
-\item{nstep}{the number of values used for the regularization path. Default: \code{50}.}
+\item{nstep}{the number of values used for the regularization path. Default: 
+\code{50}.}
 
-\item{...}{the kernel function arguments. In particular \code{sigma}
-(\code{"gaussian.radial.basis"}): double. The inverse kernel width used by
-\code{"gaussian.radial.basis"}.}
+\item{...}{the kernel function arguments. In particular, 
+\code{sigma}(\code{"gaussian.radial.basis"}): double. The inverse kernel 
+width used by \code{"gaussian.radial.basis"}.}
 }
 \value{
 \code{ukfs} returns a vector of sorted selected features indexes.
@@ -85,8 +89,8 @@ data("nutrimouse")
  grb.func <- "gaussian.radial.basis"
  genes <- center.scale(nutrimouse$gene)
  lipids <- center.scale(nutrimouse$lipid)
- sf.res <- select.features(genes, lipids, kx.func = grb.func, ky.func = grb.func,
-                           keepX = 40)
+ sf.res <- select.features(genes, lipids, kx.func = grb.func, 
+                           ky.func = grb.func, keepX = 40)
  colnames(nutrimouse$gene)[sf.res]
 }
 
-- 
GitLab


From d45bf56ac42e7755234638b344b54e39df30382d Mon Sep 17 00:00:00 2001
From: Nathalie Vialaneix <nathalie.vialaneix@inrae.fr>
Date: Sun, 17 Sep 2023 21:22:03 +0200
Subject: [PATCH 11/13] updated DESCRIPTION and NEWS before submission

---
 DESCRIPTION | 16 ++++++++--------
 NEWS.md     | 15 +++++++++++----
 2 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index 950e540..759f175 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -2,15 +2,15 @@ Package: mixKernel
 Type: Package
 Title: Omics Data Integration Using Kernel Methods
 Version: 0.9
-Date: 2023-09-08
+Date: 2023-09-17
 Depends: R (>= 3.5.0), mixOmics, ggplot2, reticulate (>= 1.14)
 Imports: vegan, phyloseq, corrplot, psych, quadprog, LDRTools, Matrix, methods, markdown
 Suggests: rmarkdown, knitr
-Authors@R: c(person("Jerome", "Mariette", role = c("aut"), email="jerome.mariette@inrae.fr"),
+Authors@R: c(person("Nathalie", "Vialaneix", role = c("aut", "cre"), email="nathalie.vialaneix@inrae.fr"),
              person("Celine", "Brouard", role = c("aut"), email="celine.brouard@inrae.fr"),
              person("Remi", "Flamary", role = c("aut"), email="remi.flamary@polytechnique.edu"),
-             person("Nathalie", "Vialaneix", role = c("aut", "cre"), email="nathalie.vialaneix@inrae.fr"),
-             person("Julien", "Henry", role = c("aut"), email="julien.henry@inrae.fr"))
+             person("Julien", "Henry", role = c("aut"), email="julien.henry@inrae.fr"),
+             person("Jerome", "Mariette", role = c("aut"), email="jerome.mariette@inrae.fr"))
 Maintainer: Nathalie Vialaneix <nathalie.vialaneix@inrae.fr>
 Author: Jerome Mariette [aut],
   Celine Brouard [aut],
@@ -23,12 +23,12 @@ Description: Kernel-based methods are powerful methods for integrating
     provided to compute a meta-kernel, in a consensus way or in a way that 
     best preserves the original topology of the data. mixKernel also integrates
     kernel PCA to visualize similarities between samples in a non linear space
-    and from the multiple source point of view. Functions to assess and display
-    important variables are also provided in the package. Ref: Jerome Mariette 
-    and Nathalie Villa-Vialaneix (2018) <doi:10.1093/bioinformatics/btx682>.
+    and from the multiple source point of view 
+    <doi:10.1093/bioinformatics/btx682>. A method to select (as well as 
+    funtions to display) important variables is also provided 
+    <doi:10.1093/nargab/lqac014>.
 License: GPL (>= 2)
 Repository: CRAN
-Packaged: 2022-01-13 15:38:01 UTC; nvialaneix
 BugReports: https://forgemia.inra.fr/genotoul-bioinfo/mixKernel/-/issues
 VignetteBuilder: knitr
 Encoding: UTF-8
diff --git a/NEWS.md b/NEWS.md
index 32d3666..d61ab88 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,8 +1,13 @@
 # Version 0.9 [2023-09-08]
 
+* transition to roxygen documentation and fixing the format of some files 
+(CITATION, NEWS, ...)
+* updated references
+* new maintainer
+
 # Version 0.8 [2022-01-13]
 
-* improved documentation and add installation instructions
+* improved documentation and added installation instructions
 
 # Version 0.7 [2021-06-15]
 
@@ -14,8 +19,9 @@
 
 # Version 0.5 [2021-03-01]
 
-* the select.features function has been added. This function replace the ukfs function
-and provides a supervised feature selection method based on the kernel framwork 
+* the select.features function has been added. This function replace the ukfs
+function and provides a supervised feature selection method based on the kernel
+framwork 
 
 # Version 0.4 [2020-02-20]
 
@@ -24,7 +30,8 @@ variables using unsupervised kernel method
 
 # Version 0.3 [2018-11-26]
 
-* fix a bug in kernel.pca.permute with duplicated block variables (reported by Devin Leopold)
+* fix a bug in kernel.pca.permute with duplicated block variables (reported by 
+Devin Leopold)
 
 # Version 0.2 [2017-10-17]
 
-- 
GitLab


From cce7b07ab05e1e11e074065b2aafa6e7995dc2b7 Mon Sep 17 00:00:00 2001
From: Nathalie Vialaneix <nathalie.vialaneix@inrae.fr>
Date: Mon, 18 Sep 2023 07:46:28 +0200
Subject: [PATCH 12/13] fixed invalid "authors" fields

---
 DESCRIPTION | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index 759f175..962c003 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -12,11 +12,6 @@ Authors@R: c(person("Nathalie", "Vialaneix", role = c("aut", "cre"), email="nath
              person("Julien", "Henry", role = c("aut"), email="julien.henry@inrae.fr"),
              person("Jerome", "Mariette", role = c("aut"), email="jerome.mariette@inrae.fr"))
 Maintainer: Nathalie Vialaneix <nathalie.vialaneix@inrae.fr>
-Author: Jerome Mariette [aut],
-  Celine Brouard [aut],
-  Remi Flamary [aut],
-  Nathalie Vialaneix [aut, cre],
-  Julien Henry [aut]
 Description: Kernel-based methods are powerful methods for integrating 
     heterogeneous types of data. mixKernel aims at providing methods to combine
     kernel for unsupervised exploratory analysis. Different solutions are 
-- 
GitLab


From 3e931faca15c6fb4ef0d6dee83b53db38c4e925e Mon Sep 17 00:00:00 2001
From: Nathalie Vialaneix <nathalie.vialaneix@inrae.fr>
Date: Mon, 18 Sep 2023 07:46:46 +0200
Subject: [PATCH 13/13] corrected all references

---
 R/combine.kernels.R       |  2 +-
 R/kernel.pca.permute.R    |  2 +-
 R/select.features.R       |  6 +++---
 inst/CITATION             | 14 ++++++--------
 man/combine.kernels.Rd    |  2 +-
 man/kernel.pca.permute.Rd |  2 +-
 man/select.features.Rd    |  6 +++---
 7 files changed, 16 insertions(+), 18 deletions(-)

diff --git a/R/combine.kernels.R b/R/combine.kernels.R
index f638542..21a5380 100644
--- a/R/combine.kernels.R
+++ b/R/combine.kernels.R
@@ -40,7 +40,7 @@
 #' Nathalie Vialaneix <nathalie.vialaneix@@inrae.fr>
 #' @references Mariette J. and Villa-Vialaneix N. (2018). Unsupervised multiple 
 #' kernel learning for heterogeneous data integration . \emph{Bioinformatics}, 
-#' \bold{34}(6), 1009-1015.
+#' \bold{34}(6), 1009-1015. DOI: \doi{10.1093/bioinformatics/btx682}.
 #' @seealso \code{\link{compute.kernel}}, \code{\link{kernel.pca}}
 #' @export
 #' @examples
diff --git a/R/kernel.pca.permute.R b/R/kernel.pca.permute.R
index ea9ed1d..3469a3d 100644
--- a/R/kernel.pca.permute.R
+++ b/R/kernel.pca.permute.R
@@ -31,7 +31,7 @@
 #' Nathalie Vialaneix <nathalie.vialaneix@@inrae.fr>
 #' @references Mariette J. and Villa-Vialaneix N. (2018). Unsupervised multiple 
 #' kernel learning for heterogeneous data integration. \emph{Bioinformatics}, 
-#' \bold{34}(6), 1009-1015.
+#' \bold{34}(6), 1009-1015. DOI: \doi{10.1093/bioinformatics/btx682}
 #' 
 #' Crone L. and Crosby D. (1995). Statistical applications of a metric on 
 #' subspaces to satellite meteorology. \emph{Technometrics}, \bold{37}(3), 
diff --git a/R/select.features.R b/R/select.features.R
index cee4e2b..2c0e8df 100644
--- a/R/select.features.R
+++ b/R/select.features.R
@@ -43,9 +43,9 @@ if(getRversion() >= "2.15.1")  utils::globalVariables(c("kokfspy"))
 #' @author Celine Brouard <celine.brouard@@inrae.fr>
 #' Jerome Mariette <jerome.mariette@@inrae.fr>
 #' Nathalie Vialaneix <nathalie.vialaneix@@inrae.fr>
-#' @references Brouard C., Mariette J., Flamary R. and Vialaneix N. (2022). Feature selection
-#' for kernel methods in systems biology. \emph{NAR Genomics and Bioinformatics},
-#' 4(1), doi: 10.1093/nargab/lqac014.
+#' @references Brouard C., Mariette J., Flamary R. and Vialaneix N. (2022). 
+#' Feature selection for kernel methods in systems biology. \emph{NAR Genomics
+#' and Bioinformatics}, \bold{4}(1), lqac014. DOI: \doi{10.1093/nargab/lqac014}.
 #' @seealso \code{\link{compute.kernel}}
 #' @export select.features
 #' @examples
diff --git a/inst/CITATION b/inst/CITATION
index 04adede..b7d58ac 100644
--- a/inst/CITATION
+++ b/inst/CITATION
@@ -1,29 +1,27 @@
-
 bibentry(
   bibtype = "Article",
-  textVersion = paste('Mariette, J. and Villa-Vialaneix, N. (2017)',
-                      'Unsupervised multiple kernel learning for heterogeneous data integration.',
-                      'Bioinformatics, 34(6): 1009-1015.'),
-  author = "Jerome Mariette and Nathalie Villa-Vialaneix",
+  header = "To cite adjclust in publications, please use",
+  textVersion = "Mariette J. and Villa-Vialaneix N. (2017) Unsupervised multiple kernel learning for heterogeneous data integration. Bioinformatics, 34(6): 1009-1015.",
+  author = "Mariette, Jerome and Villa-Vialaneix, Nathalie",
   title = "Unsupervised multiple kernel learning for heterogeneous data integration",
   journal = "Bioinformatics",
   year = "2018",
   volume = "34",
   issue = "6", 
   pages = "1009-1015",
+  doi = "10.1093/bioinformatics/btx682"
 )
 
 bibentry(
   bibtype = "Article",
-  textVersion = paste('Brouard, C., Mariette, J., Flamary, R. and Vialaneix, N. (2022)',
-                      'Feature selection for kernel methods in systems biology.',
-                      'NAR Genomics and Bioinformatics. Forthcoming.'),
+  textVersion = "Brouard C., Mariette J., Flamary R., Vialaneix, N. (2022) Feature selection for kernel methods in systems biology. NAR Genomics and Bioinformatics. 4(1).",
   author = "Celine Brouard, Jerome Mariette, Remi Flamary and Nathalie Vialaneix",
   title = "Feature selection for kernel methods in systems biology",
   journal = "NAR Genomics and Bioinformatics",
   year = "2022",
   volume = "4",
   issue = "1",
+  number = "lqac014",
   doi = "10.1093/nargab/lqac014"
 )
 
diff --git a/man/combine.kernels.Rd b/man/combine.kernels.Rd
index 7ce91cd..ae49b1f 100644
--- a/man/combine.kernels.Rd
+++ b/man/combine.kernels.Rd
@@ -73,7 +73,7 @@ meta.kernel <- combine.kernels(phychem = phychem.kernel,
 \references{
 Mariette J. and Villa-Vialaneix N. (2018). Unsupervised multiple 
 kernel learning for heterogeneous data integration . \emph{Bioinformatics}, 
-\bold{34}(6), 1009-1015.
+\bold{34}(6), 1009-1015. DOI: \doi{10.1093/bioinformatics/btx682}.
 }
 \seealso{
 \code{\link{compute.kernel}}, \code{\link{kernel.pca}}
diff --git a/man/kernel.pca.permute.Rd b/man/kernel.pca.permute.Rd
index e6cd253..abd0acf 100644
--- a/man/kernel.pca.permute.Rd
+++ b/man/kernel.pca.permute.Rd
@@ -55,7 +55,7 @@ kernel.pca.result <- kernel.pca.permute(kernel.pca.result,
 \references{
 Mariette J. and Villa-Vialaneix N. (2018). Unsupervised multiple 
 kernel learning for heterogeneous data integration. \emph{Bioinformatics}, 
-\bold{34}(6), 1009-1015.
+\bold{34}(6), 1009-1015. DOI: \doi{10.1093/bioinformatics/btx682}
 
 Crone L. and Crosby D. (1995). Statistical applications of a metric on 
 subspaces to satellite meteorology. \emph{Technometrics}, \bold{37}(3), 
diff --git a/man/select.features.Rd b/man/select.features.Rd
index b682abc..be7d595 100644
--- a/man/select.features.Rd
+++ b/man/select.features.Rd
@@ -96,9 +96,9 @@ data("nutrimouse")
 
 }
 \references{
-Brouard C., Mariette J., Flamary R. and Vialaneix N. (2022). Feature selection
-for kernel methods in systems biology. \emph{NAR Genomics and Bioinformatics},
-4(1), doi: 10.1093/nargab/lqac014.
+Brouard C., Mariette J., Flamary R. and Vialaneix N. (2022). 
+Feature selection for kernel methods in systems biology. \emph{NAR Genomics
+and Bioinformatics}, \bold{4}(1), lqac014. DOI: \doi{10.1093/nargab/lqac014}.
 }
 \seealso{
 \code{\link{compute.kernel}}
-- 
GitLab