This is a major release, which comes with new features, improvements, bugfixes, and reformatted R code.
The commit history has been considerably revised to follow general conventions, which is why the commit hashes have changed and are not in line with the old "master" branch anymore.
New features
-
renameTaxa(): New function for renaming taxa in a taxonomic table.
It comes with functionality for
making unknown and unclassified taxa unique and substituting them by the next
higher known taxonomic level. E.g., an unknown genus "g__", where family is the
next higher known level, can automatically be renamed to
"1_Streptococcaceae(F)". User-defined patterns determine the format
of known and substituted names. Unknown names (e.g., NAs) and unclassified taxa
can be handled separately. Duplicated names within one or more chosen ranks can
also be made unique by numbering them consecutively. -
editLabels(): New function for editing node labels, i.e., shortening to a
certain length and removing unwanted characters. It is used by NetCoMi's plot
functions plot.microNetProps() and plot.diffnet(). -
In
netCompare()
: The adjusted Rand index is also computed for the
largest connected component (LCC). The summary method has been adapted. -
Argument "testRand" added to
netCompare()
. Performing a permutation
test for the adjusted Rand index can now be disabled to save run time. -
Graphlet-based network measures implemented. NetCoMi contains two new
exported functionscalcGCM()
andcalcGCD()
to compute the Graphlet
Correlation Matrix (GCM) of a network and the Graphlet Correlation Distance
(GCD) between two networks.
Orbits for graphlets with up to four nodes are considered.
Furthermore, the GCM is computed withnetAnalyze()
and the
GCD withnetCompare()
(for the whole network and the largest connected
component, respectively). Also the orbit counts are returned. The GCD is added
to the summary for classmicroNetComp
objects returned bynetCompare()
. -
Significance test for the GCD: If permutation tests are conducted with
netCompare()
, the GCD is tested for being significantly different from zero. -
New function
testGCM()
to test graphlet-based measures for
significance. For a single GCM, the correlations are tested for being
significantly different from zero.
If two GCMs are given, it is tested if the correlations are
significantly different between the two groups, that is, the absolute
differences between correlations ($|gc1_{ij}-gc2_{ij}|$ ) are tested
for being different from zero. -
New function
plotHeat()
for plotting a mixed heatmap where, for
instance, values are shown in the upper triangle and corresponding p-values or
significance codes in the lower triangle. The function is used for plotting
heatmaps of the GCMs, but could also be used for association matrices. -
netAnalyze()
now by default returns a heatmap of the GCM(s) with
graphlet correlations in the upper triangle and significance codes in the lower
triangle. -
Argument "doPlot" added to
plot.microNetProps()
to suppress the plot if
only the return value is of interest. -
New "show" arguments are added to the summary methods for class
microNetProps
andmicroNetComp
objects. They specify which network
properties should be printed in the summary. See the help pages of
summary.microNetProps
andsummary.microNetComp()
for details. -
New zero replacement method "pseudoZO" available in
netConstruct()
.
Instead of adding the desired pseudo count to the whole count matrix, it is
added to zero counts only ifpseudoZO
is chosen. The behavior of "pseudo"
(a further available method where a pseudo count is added to all counts) has not
changed. Adding a pseudo count only to zeros preserves the ratios between
non-zero counts, which is desirable. -
createAssoPerm()
now accepts objects of classmicroNet
as input (in
addition to objects of classmicroNetProps
). -
SPRING's
fast version of latent correlation computation (implemented in
mixedCCA) is available again.
It can be used by setting thenetConstruct()
parametermeasurePar$Rmethod
to "approx", which is now the default again. -
The function
multAdjust()
now has an argumentpTrueNull
to pre-define
the proportion of true null hypotheses for the adaptive BH method. -
netConstruct()
has a new argumentassoBoot
, which enables the
computation of bootstrap association matrices outside netConstruct() if
bootstrapping is used for sparsification. An example has been added to the
help page?netConstruct
. This feature might be useful for very large
association matrices (for which the working memory might reach its limit).
Bug fixes
-
In
netConstruct()
:- Using "bootstrap" as sparsification method in
combination with one of the association methods "bicor", "cclasso", "ccrepe", or
"gcoda" led to the error:argument "verbose" is missing, with no default
,
which has been fixed. - The "signedPos" transformation did not work properly.
Dissimilarities corresponding to negative correlations were set to zero instead
of infinity.
- Using "bootstrap" as sparsification method in
-
In
editLabels()
: The function (and thus alsoplot.microNetProps
)
threw an error if taxa have been renamed with
renameTaxa
and the data contain more than 9 taxa with equal names, so that
double-digit numbers were added to avoid duplicates. -
Issues in network analysis and plotting if association matrices are used
for network construction, but row and/or column names are missing.
(issue #65) -
diffnet()
threw an error if association matrices are used for network
construction instead of count matrices.
(issue #66) -
In
plot.microNetProps()
:- The function now directly returns an error if
x
has not the
expected class. - The
cut
parameter could not be changed.
- The function now directly returns an error if
-
In
cclasso()
: In rare cases, the function produced complex numbers,
which led to an error.
Further changes
-
In permutation tests: The permuted group labels must now be different from
the original group vector. In other words, the original group vector is strictly
avoided in the matrix with permuted group labels. So far, only duplicates were
avoided. Only in exact permutation tests (ifnPerm
equals the possible number
of permutations), the original group vector is still included in the permutation
matrix. The calculation of p-values has been adapted to the new behavior:
p=B/N for exact p-values and p=(B+1)/(N+1) for approximated p-values, where
B is the number of permutation test statistics being larger than or equal to
the observed one, and N is the number of permutations. So far, p=(B+1)/(N+1)
has been used in all cases. -
In
plot.microNetProps()
:- The default of
shortenLabels
is now "none", i.e. the labels are not
shortened by default, to avoid confusion about the node labels. - The edge filter (specified via
edgeFilter
andedgeInvisFilter
) now
refers to the estimated association/dissimilarities instead of edge weights.
E.g., setting the threshold to 0.3 for an association network hides edges
with a corresponding absolute association below 0.3 even though the edge
weight might be different (depending on the transformation used for network
construction). (issue #26) - If two networks are constructed and the
cut
parameter is not
user-defined, the mean of the two determined cut parameters is now used for
both networks so that edge thicknesses are comparable.
- The default of
-
More expressive messages and errors in
diffnet
andplot.diffnet
if no
differential associations are detected. -
New function
.suppress_warnings()
to suppress certain warnings returned
by external functions. -
In
netConstruct
if "multRepl" is used for zero handling:
The warning about the proportion of zeros is suppressed by setting the
multRepl()
parameter "z.warning" to 1. -
The functions
makeCluster
andstopCluster
fromparallel
package
are now used for parallel computation because those fromsnow
package
sometimes led to problems on Unix machines.
Style
-
The whole R code has been reformatted to follow general conventions.
-
The element
"clustering_lcc"
as part of thenetAnalyze
output has changed
to"clusteringLCC"
to be in line with the remaining output. -
Input argument checking of exported function has been revised. New functions
.checkArgsXxx()
are added to perform argument checking outside the main
functions. -
Non-exported functions have been renamed to follow general naming conventions,
i.e. that of Bioconductor:- Use camelCase for all functions.
- Non-exported functions have prefix "."
- See the NEWS file for an overview of the changed function names.