audy / richardson-2014

Analysis code for the DIPP microbiome study
http://dipp.utu.fi
0 stars 2 forks source link

Problems with normalize.R #57

Open adriaaula opened 8 years ago

adriaaula commented 8 years ago

One little thing,

Since you calculate the normalization factors but you doesn't use them for 'normalize' the data your return(physeq) simply retrieves a physeq object with the previous counts + 1.

In order to change that, a calculus of the normalization counts has to be done. I have been writing something like that, but it needs to be checked out:

Substitute this:

counts <- t(z[[1]]) For this:

lib.size <- z$samples$lib.size lib.size <- lib.size * z$samples$norm.factors counts <- t(z[[1]] *100 / lib.size)

audy commented 8 years ago

I borrowed the code from here. You might want to take this issue there. I ended up not using this function in my analysis for this work.