HCBravoLab / metagenomeSeq

Statistical analysis for sparse high-throughput sequencing
64 stars 20 forks source link

fitZig error missing value #74

Closed marion-b closed 4 years ago

marion-b commented 4 years ago

Hi,

When I use Fitzig function, I got an error message about missing values : "Error in if (any(pos)) { : valeur manquante là où TRUE / FALSE est requis"

However, when I opened the required arguments, I did not find any missing values, furthermore, in the MRexperiments object there are no samples with zero counts, and there are no features with zero counts over all the samples.

Below the script I used on an MRexperiments object ('cinetique_SD_IgG_IAV_D049_to_D063') with 11 samples and 1140 features

zootechnical variable

Age_Weaning_to_D063_SD_IgG_IAV_D049_metagenomeseq=pData(cinetique_SD_IgG_IAV_D049_to_D063)$Age_Weaning Batch_to_D063_SD_IgG_IAV_D049_metagenomeseq=pData(cinetique_SD_IgG_IAV_D049_to_D063)$Batch Sex_to_D063_SD_IgG_IAV_D049_metagenomeseq=pData(cinetique_SD_IgG_IAV_D049_to_D063)$Sex

varialbe of interest

SD_IgG_IAV_D049_from_D063_metagenomeseq=pData(cinetique_SD_IgG_IAV_D049_to_D063)$SD_IgG_IAV_D049

normfactor:

normFactor_D063_GP_from_SD_IgG_IAV_D049=normFactors(cinetique_SD_IgG_IAV_D049_to_D063) normFactor_D063_GP_from_SD_IgG_IAV_D049=log2(normFactor_D063_GP_from_SD_IgG_IAV_D049/median(normFactor_D063_GP_from_SD_IgG_IAV_D049)+1)

mod_D063_GP_batch_age_weaning_sex_SD_IgG_IAV_D049_89_extrem = model.matrix(~ SD_IgG_IAV_D049_from_D063_metagenomeseq + Batch_to_D063_SD_IgG_IAV_D049_metagenomeseq + Age_Weaning_to_D063_SD_IgG_IAV_D049_metagenomeseq + Sex_to_D063_SD_IgG_IAV_D049_metagenomeseq + normFactor_D063_GP_from_SD_IgG_IAV_D049)

settings=zigControl(maxit=10,verbose=FALSE)

fit_D063_from_SD_IgG_IAV_D049_89extrem = fitZig(obj=cinetique_SD_IgG_IAV_D049_to_D063, mod=mod_D063_GP_batch_age_weaning_sex_SD_IgG_IAV_D049_89_extrem, control=settings)

Could anybody help me to solve this problem? Thanks!

hcorrada commented 4 years ago

Can you provide a reproducible example that throws this error?

marion-b commented 4 years ago

Hi,

I tried to supress ‘Batch_to_D063_SD_IgG_IAV_D049_metagenomeseq’ from the model, cause when I opened the former model, I saw that in three of the five Batch (Batch_to_D063_SD_IgG_IAV_D049_metagenomeseq) there was only one individual observed in these batches. All the remaining 8 individuals being present in two batches. By suppressing this variable (Batch_to_D063_SD_IgG_IAV_D049_metagenomeseq) from the model, I managed to run fitzig function. So I supposed that there were not enough individuals in each batches to run the former model.

Below the written former and new model.

Thanks, Marion

former model : mod_D063_GP_batch_age_weaning_sex_SD_IgG_IAV_D049_89_extrem = model.matrix(~ SD_IgG_IAV_D049_from_D063_metagenomeseq

new model : mod_D063_GP_batch_age_weaning_sex_SD_IgG_IAV_D049_89_extrem = model.matrix(~ SD_IgG_IAV_D049_from_D063_metagenomeseq

De : hcorrada notifications@github.com Envoyé : mercredi 27 novembre 2019 23:14 À : HCBravoLab/metagenomeSeq metagenomeSeq@noreply.github.com Cc : Marion Borey marion.borey@inra.fr; Author author@noreply.github.com Objet : Re: [HCBravoLab/metagenomeSeq] fitZig error missing value (#74)

Can you provide a reproducible example that throws this error?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/HCBravoLab/metagenomeSeq/issues/74?email_source=notifications&email_token=ANUQC2ZEEHQOUTF6OJ7BFSLQV3WLVA5CNFSM4JHGN7C2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFK4FXQ#issuecomment-559268574, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANUQC2326FDATGDRPMBFKNLQV3WLVANCNFSM4JHGN7CQ.

hcorrada commented 4 years ago

Sounds good. Thank you.