Search code examples
rmachine-learningartificial-intelligencebioconductor

WGCNA : Choosing a soft-threshold power


powers = c(c(1:10), seq(from = 12, to=20, by=2));

While going through WGCNA i came across this code which i am not able to understand, can anybody explain me the meaning of that piece of code


Solution

  • The code will create a vector of numbers stored in powers.

    Specifically: 1:10 creates the numbers 1 2 3 4 5 6 7 8 9 10 (can read as 1 through 10) and seq(from = 12, to = 20, by = 2) creates a sequence of every other number from 12 to 20, i.e. 12 14 16 18 20.

    Powers will contain the following 15 numbers: 1 2 3 4 5 6 7 8 9 10 12 14 16 18 20

    I am not familiar with the WGCNApackage or if powers is an argument to a function, but this is what powers contains.