This function calculates correlation between one k-mer and a matrix of k-mers under sparsity assumption

sparse_cor(y_name, xy, candidates_sums, n)

Arguments

y_name

a character name of reference k-mer

xy

a vector of sums of xy products (between y and x(s))

candidates_sums

a vector of sums of k-mers

n

a numeric number of observations

Value

a numeric vector of correlations between y and x's.