jchen1981 / GMPR

Calculate the normalizing factors for zeroinflated sequencing data such as microbiome sequencing data
14 stars 10 forks source link

GMPR.R and GMPR_0.1.3.tar.gz size factor differences #5

Open vmaffei opened 4 years ago

vmaffei commented 4 years ago

Hello! Thank you for developing this easy to use normalization technique!

The size factors calculated between the provided C library and R script appear to be slightly different. Example code and results are below.

library(vegan)
library(GMPR) # C library
source('GMPR.R') # R script

data(throat.otu.tab)
data(throat.meta)

# Calculate GMPR size factor
# Row - features, column - samples

otu.tab <- t(throat.otu.tab)
gmpr.size.factor <- GMPR(otu.tab)
gmpr.size.factor.1 <- GMPR::GMPR(t(otu.tab))

> head(gmpr.size.factor)
 ESC_1.1_OPL  ESC_1.3_OPL  ESC_1.4_OPL  ESC_1.5_OPL  ESC_1.6_OPL ESC_1.10_OPL
   0.4131797    1.2472462    1.3175530    1.3269073    1.0525362    1.2882773

> head(gmpr.size.factor.1)
 ESC_1.1_OPL  ESC_1.3_OPL  ESC_1.4_OPL  ESC_1.5_OPL  ESC_1.6_OPL ESC_1.10_OPL
   0.3837041    1.4402244    1.4374717    1.5486711    1.2279985    1.3421698

By chance is one of these a later version than the other? Which of these would you recommend for use?

Thank you for your time!

Vince

jchen1981 commented 4 years ago

Please use the R version first. I will find the cause of the discrepancy.

Best, Jun

On Mon, Jun 22, 2020 at 10:16 AM Vince Maffei notifications@github.com wrote:

Hello! Thank you for developing this easy to use normalization technique!

The size factors calculated between the provided C library and R script appear to be slightly different. Example code and results are below.

library(vegan) library(GMPR) # C library source('GMPR.R') # R script

data(throat.otu.tab) data(throat.meta)

Calculate GMPR size factor# Row - features, column - samples

otu.tab <- t(throat.otu.tab)gmpr.size.factor <- GMPR(otu.tab)gmpr.size.factor.1 <- GMPR::GMPR(t(otu.tab))

head(gmpr.size.factor) ESC_1.1_OPL ESC_1.3_OPL ESC_1.4_OPL ESC_1.5_OPL ESC_1.6_OPL ESC_1.10_OPL 0.4131797 1.2472462 1.3175530 1.3269073 1.0525362 1.2882773 head(gmpr.size.factor.1) ESC_1.1_OPL ESC_1.3_OPL ESC_1.4_OPL ESC_1.5_OPL ESC_1.6_OPL ESC_1.10_OPL 0.3837041 1.4402244 1.4374717 1.5486711 1.2279985 1.3421698

By chance is one of these a later version than the other? Which of these would you recommend for use?

Thank you for your time!

Vince

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jchen1981/GMPR/issues/5, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHOPVREESGUDGV4HMXKILTRX5YTBANCNFSM4OEY2YEQ .