problems while extracting M values in ChAMP

242 views
Skip to first unread message

Maria Cartolano

unread,
Nov 16, 2016, 10:24:07 AM11/16/16
to Epigenomics forum

Hello,
I am trying to load .idat files in ChAMP while extracting the M values. (arraytype="EPIC")
The actually loading seems to go fine, however when filtering I get the following error message:

Error in hclust(betar_d) : NA/NaN/Inf in foreign function call (arg 11).

Intriguingly, this error is not thrown while extracting B values.

Has anyone experienced a similar error?

Thank you ,

Maria

Yuan Tian

unread,
Nov 20, 2016, 5:35:25 AM11/20/16
to Epigenomics forum
Hello:

Could your give more information about the error? I admit that I developed it merely under beta value situation, so I want to know if anything wrong with M value. And I guess the error should not comes from champ.load() right? Because all clustering methods has been put into champ.QC(), is that correct?

Best
Yuan Tian

Maria Cartolano

unread,
Nov 21, 2016, 3:29:21 AM11/21/16
to Epigenomics forum
Hi, 

thank you for your answer. See below:

myLoad <- champ.load(getwd(),arraytype="EPIC",methValue = "M")


.....


Loading required package: IlluminaHumanMethylationEPICmanifest
Read DataSet Success.

The fraction of failed positions per sample: 
......


Filtering probes with a detection p-value above 0.01 in one or more samples has removed 6866 probes from the analysis. If a large number of probes have been removed, ChAMP suggests you look at the failedSample.txt file to identify potentially bad samples.
Filter DetP Done.

Filtering probes with a beadcount <3 in at least 5% of samples, has removed 6169 from the analysis.
Filter Beads Done.

Filter NoCG Done.

Filtering probes with SNPs as identified in Nordlund et al, has removed 26804 from the analysis.
Filter SNP Done.

Filtering probes that align to multiple locations as identified in Nordlund et al, has removed 7812 from the analysis.
Filter MultiHit Done.

Filtering probes on the X or Y chromosome has removed 18887 from the analysis.
Filter XY chromosome Done.

Error in hclust(betar_d) : NA/NaN/Inf in foreign function call (arg 11)


cheers

Yuan Tian

unread,
Nov 21, 2016, 4:41:25 AM11/21/16
to Epigenomics forum
Hello:

Based on your message, it seems you are not using the latest version of ChAMP. That's why I remember I removed all clustering functions in champ.load() and reset them into champ.QC().

Please try new version champ (2.4.0). Which has been improved a lot, there should have no problem, with clustering on that version of package. You can find the new features in the vignette.


Best
Yuan Tian

Maria Cartolano

unread,
Nov 22, 2016, 7:58:43 AM11/22/16
to Epigenomics forum
Hey,

thank you!

I have updated Bioconductor to version 3.4 and re-installed chAMP. 

I have got the exact same error:

Error in hclust(betar_d) : NA/NaN/Inf in foreign function call (arg 11). 

Also, please note that the blood control for CNA is only for 450K experiments and this is not stated in the vignette.

cheers

Yuan Tian

unread,
Nov 22, 2016, 8:09:19 AM11/22/16
to Epigenomics forum
That's wired... I checked the code yesterday, I did not even included any clustering algorithm in champ.load(), I mean after filtering, the function should be ended directly. Please use sessionInfo() function to check the version of your package, maybe there is something wrong with the installation.

Also have you noticed the message from new version package is different? New version package's message is different from old version, so if you see the same message, it might means you did not installed it successfully. Anyway, please use sessionInfo() to check the version information of the current installed package.

The blood sample in CNA function is only works for 450K, I will included samples for EPIC in the future.

Best
Yuan Tian

Maria Cartolano

unread,
Nov 22, 2016, 9:30:04 AM11/22/16
to Epigenomics forum
Hi,

I used sessionInfo and read ChAMP_2.4.0.

That should be ok,or? This is also the version I see as available on Bioconductor.

cheers

Yuan Tian

unread,
Nov 22, 2016, 9:38:12 AM11/22/16
to Epigenomics forum
So does the message from the champ.load() function changed? Or they are exactly the same?

Best
Yuan Tian

Maria Cartolano

unread,
Nov 22, 2016, 10:46:02 AM11/22/16
to Epigenomics forum
Hey,

you mean the error message? 

no, it is the same:

Error in hclust(betar_d) : NA/NaN/Inf in foreign function call (arg 11).

I understand you did not include clustering after filtering but I guess that the package version I am using should give us the clue. 


Is ChAMP_2.4.0 the most updated version?

cheers and thank you for your help!

Yuan Tian

unread,
Nov 23, 2016, 1:05:41 AM11/23/16
to Epigenomics forum
Yes, champ_2.4.0 is the latest version.

I mean not only the error message, but some other information message while you are running champ.load(), I know that I modified a lot of message in new version package. Like if you are running champ.load(), it will tell you ">>CHAMP.LOAD START<<" e.g. So if you can see these message, it means you are definitely using new version package, otherwise, maybe it means you are using older version.

That is wired, because your sessionInfo() shows you are using champ_2.4.0, which should be the correct version.

Best
Yuan Tian

Maria Cartolano

unread,
Nov 23, 2016, 7:49:03 AM11/23/16
to Epigenomics forum
Hi,

I have repeated the analysis and now it works. I can load M values.

Even though sessionInfo() retrieved champ_2.4.0, R was actually running the older version. Dunno why...


Thank you for you time and help.

Maria

Paula Rovira Lorente

unread,
Apr 19, 2017, 3:48:24 AM4/19/17
to Epigenomics forum
Dear Yuan

I'm working with R version 3.3.3 and ChAMPdata_2.6.0. I'm analyzing data from EPIC beadchip. The program was able to run the champ load step but when I run the BMIQ normalization using the following command: mynorm<-champ.norm(beta=myload$beta,arraytype="EPIC",cores=1) it stops and an error message is present: 

 > mynorm<-champ.norm(beta=myload$beta,arraytype="EPIC",cores=1,plotBMIQ=F) 
[===========================]
[>>>>> ChAMP.NORM START <<<<<<]
-----------------------------
champ.norm Results will be saved in ./CHAMP_Normalization/
[ SWAN method call for BOTH rgSet and mset input, FunctionNormalization call for rgset only , while PBC and BMIQ only needs beta value. Please set parameter correctly. ]

<< Normalizing data with BMIQ Method >>
Note that,BMIQ function may fail for bad quality samples (Samples did not even show beta distribution).
[1] "Fitting EM beta mixture to type1 probes"
[1] Inf
[1] 0.03220882
[1] 0.03563693
[1] 0.01558148
[1] 0.4998898
[1] "Done"
Error in density.default(beta1.v[class1.v == 3]) : 
  need at least 2 points to select a bandwidth automatically
Además: Warning messages:
1: In min(beta1.v[rand.idx[subsetclass1.v == 2]]) :
  ningún argumento finito para min; retornando Inf
2: In max(beta1.v[rand.idx[subsetclass1.v == 2]]) :
  ningun argumento finito para max; retornando -Inf
3: In min(beta1.v[rand.idx[subsetclass1.v == 3]]) :
  ningún argumento finito para min; retornando Inf

Could you help me? I've tryed with plotBMIQ=F and also without core specification in the command line.

Thanks in advance!!!

Best,

Paula

Yuan Tian

unread,
Apr 19, 2017, 4:15:24 AM4/19/17
to Epigenomics forum
Hello:

I think the reason might be you have some sample's quality is not good. champ.norm() take BMIQ method as default normalization option, and BMIQ would fail if sample's distribution is not beta distribution. This error would be triggered if some of your sample's distribution is odd.

You may use QC.GUI() function check the distribution of all your samples, and see if some sample's quality is not good. You shall see it clearly out in the density plot. Then you remove them, redo champ.norm() it should be OK. This is the best option, it's happens sometimes that in a data set, only 1-2 samples's not good. So we need to do QC test.

Or you can use other normalization method: SWAN, PBC in champ.norm() function. (FunctionNormlization is only for 450K), but based on my test, BMIQ works best. And if indeed there are some sample not suitable to be analysed in your data set. You should remove them.

Best
Yuan Tian

--
You received this message because you are subscribed to a topic in the Google Groups "Epigenomics forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/epigenomicsforum/gieyffqltpQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to epigenomicsfor...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages