birewire.sampler.dsg: Efficient generation of a null model for a given dsg.

Description Usage Arguments Details Author(s) References

View source: R/BiRewire.R

Description

Efficient generation of a null model for a given dsg. The routine samples correctly from the null model of a given dsg creating a set of randomized dsgs.

Usage

1
2
birewire.sampler.dsg(dsg,K,path,delimitators=list(negative='-',positive='+'),exact=FALSE,
  verbose=TRUE, max.iter.pos='n',max.iter.neg='n', accuracy=0.00005,MAXITER_MUL=10)

Arguments

dsg

A dsg object: is a list of two incidence matrices (see References), "positive" and "negative", encoding the positive edges and negative edges. This list can be obtained reading a SIF file using birewire.load.dsg function and converting the resulting dataframe using birewire.induced.bipartite.

max.iter.pos

"n" (default) the number of switching steps to be performed on the positive part of dsg (or if exact==TRUE the number of successful switching steps). If equal to "n" then this number is considered equal to the analytically derived lower bound presented in Gobbi et al. (see References): N={e}/{2(1-d)} \ln{((e-de)/δ)} if exact is FALSE, N={e(1-d)}/{2} \ln{((e-de)/δ)} otherwise , where e is the number of edges of g and d its edge density . This bound is much lower than the empirical one proposed in Milo et al. 2003 (see References);

max.iter.neg

"n" (default) the number of switching steps to be performed on the negative part of dsg (or if exact==TRUE the number of successful switching steps). If equal to "n" then this number is considered equal to the analytically derived lower bound presented in Gobbi et al. (see References): N={e}/{2(1-d)} \ln{((e-de)/δ)} if exact is FALSE, N={e(1-d)}/{2} \ln{((e-de)/δ)} otherwise , where e is the number of edges of g and d its edge density . This bound is much lower than the empirical one proposed in Milo et al. 2003 (see References);

accuracy

0.00005 (default) is the desired level of accuracy reflecting the average distance between the Jaccard index at the N-th step and its analytically derived fixed point in terms of fracion of common edges;

verbose

TRUE (default). When TRUE a progression bar is printed during computation.

MAXITER_MUL

10 (default). If exact==TRUE in order to prevent a possible infinite loop the program stops anyway after MAXITER_MUL*max.iter iterations;

exact

FALSE (default). If TRUE the program performs max.iter swithcing steps, otherwise the program will count also the not-performed swithcing steps;

path

The directory in which the routine stores the outputs;

K

The number of network that has to be generated;

delimitators

list(negative='-',positive='+') (default):a list with 'positive' and 'negative' names identifying the character encoding the relation used for writing the ouput with birewire.build.dsg;

Details

The routine creates, starting from a given path, different subfolders in order to have maximum 1000 files for folder; the SIF files are saved using birewire.write.dsg, an internal routine. The set is generated calling birewire.rewire.dsg on the last generated dsg starting from the input dsg.

Author(s)

Andrea Gobbi: <gobbi.andrea@mail.com>

References

Iorio, F. and and Bernardo-Faura, M. and Gobbi, A. and Cokelaer, T.and Jurman, G.and Saez-Rodriguez, J. (2016) Efficient randomization of biologicalnetworks while preserving functionalcharacterization of individual nodes Bioinformatics 2016 1 (17):542 doi: 10.1186/s12859-016-1402-1.

Gobbi, A. and Iorio, F. and Dawson, K. J. and Wedge, D. C. and Tamborero, D. and Alexandrov, L. B. and Lopez-Bigas, N. and Garnett, M. J. and Jurman, G. and Saez-Rodriguez, J. (2014) Fast randomization of large genomic datasets while preserving alteration counts Bioinformatics 2014 30 (17): i617-i623 doi: 10.1093/bioinformatics/btu474.

R. Milo, N. Kashtan, S. Itzkovitz, M. E. J. Newman, U. Alon (2003), On the uniform generation of random graphs with prescribed degree sequences, eprint arXiv:cond-mat/0312028


BiRewire documentation built on Nov. 8, 2020, 8:09 p.m.