Question: ChAMP input: Beta Matrix?
0
gravatar for Shicheng Guo
3.5 years ago by
United States
Shicheng Guo0 wrote:

Hi ChAMP users:

Can we start the DMR analysis from Beta-matrix, rather than idat, by ChAMP? You know sometimes, we don't have idat, only have beta-matrix (case-control).

Thanks. 

champ dmr analysis • 2.0k views
ADD COMMENTlink modified 2.8 years ago by hseepany0 • written 3.5 years ago by Shicheng Guo0
Answer: ChAMP input: Beta Matrix?
0
gravatar for Daniel E. Weeks
3.3 years ago by
Pittsburgh, Pennsylvania, United States of America
Daniel E. Weeks0 wrote:

Look at the help page for champ.process().

Looks to me like you should do this:

champ.process(fromIDAT=FALSE, fromFile=TRUE)

and then it will try to read the data in from 'beta.txt' and 'sampleSheet.txt'

> ChAMP:::champ.read
function (betaFile = "beta.txt", sampleSheet = "sampleSheet.txt", 
    resultsDir) 
{
    beta <- read.table(betaFile, header = T, sep = "\t")
    pd <- read.table(sampleSheet, header = T, sep = "\t")
    if (file.exists(resultsDir)) {
        message("The directory ", resultsDir, " already exists. To avoid overwriting please rename in the arguments or delete this folder.")
    }
    else {
        dir.create(resultsDir)
    }
    return(list(beta = beta, pd = pd))
}
<environment: namespace:ChAMP>​
ADD COMMENTlink written 3.3 years ago by Daniel E. Weeks0
Answer: ChAMP input: Beta Matrix?
0
gravatar for Yuan Tian
2.8 years ago by
Yuan Tian80
London
Yuan Tian80 wrote:

Hello Shicheng:

 

The latest version of ChAMP support solo beta matrix input, you may try it to solve your problem.I made most function in ChAMP2 support isolated beta matrix and covirate instead of IDAT file.

http://bioconductor.org/packages/release/bioc/html/ChAMP.html

 

Best

Yuan Tian

ADD COMMENTlink written 2.8 years ago by Yuan Tian80
Answer: ChAMP input: Beta Matrix?
0
gravatar for hseepany
2.8 years ago by
hseepany0
Canada
hseepany0 wrote:

Hi,

I have the same problem. I have an excel sheet with all the beta values and probe IDs. I loaded it using read.table but when I run the champ.norm, it does not work and all the subsequent codes fail. Please let me know how to go about it.

Thanks!

ADD COMMENTlink written 2.8 years ago by hseepany0
Answer: ChAMP input: Beta Matrix?
0
gravatar for Yuan Tian
2.8 years ago by
Yuan Tian80
London
Yuan Tian80 wrote:

Hello:

Could you provide more information about how to exactly do it? I use ChAMP analysis GEO data and TCGA data, all are isolated datasets and works fine. Could you do following things below:

(1): use sessionInfo() to check if you installed latest package (2.2).

(2):paste the error message from champ.norm() here.

Best

Yuan Tian

ADD COMMENTlink written 2.8 years ago by Yuan Tian80
Answer: ChAMP input: Beta Matrix?
0
gravatar for hseepany
2.8 years ago by
hseepany0
Canada
hseepany0 wrote:

Now I am wondering if my data in the excel is not in the right format. I have first column with all the probeIDs, followed by Sample Names in the first row and all subsequent rows have the Beta values.

I do have Champ 2.2 and it works fine if I start with IDAT files. I think my problem is with working with the excel/txt file of beta values.

Here is the error message that I get:

[===========================]
[>>>>> 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).
3 cores will be used to do parallel BMIQ computing.
Error in champ.BMIQ(beta[, x], design.v, sampleID = colnames(beta)[x],  : 
  task 1 failed - "cannot take a sample larger than the population when 'replace = FALSE'"

 

Thanks,

Harshika

ADD COMMENTlink written 2.8 years ago by hseepany0
Answer: ChAMP input: Beta Matrix?
0
gravatar for Yuan Tian
2.8 years ago by
Yuan Tian80
London
Yuan Tian80 wrote:

Hello Harshika:

What dataset are you using? This error often happens when you assign wrong "arraytype" parameter to your dataset. Which means you may inputted EPIC array data, but forget to assign arraytype as "EPIC". So the function would get 450K annotation automatically and do analysis on that. Please check if this is the problem.

Also, I am not very sure if your excel file is correct, but I suggest you to do two things:

(1):Check the format of your matrix, it must be a Matrix or a Dataframe. If so, there should have no problem with Excel file.

(2):Overlap probeID in your file with annotation of 450K or EPIC array, to see if there are some unmatched probes in it, which may cause problem.

Best

Yuan Tian

ADD COMMENTlink written 2.8 years ago by Yuan Tian80
Answer: ChAMP input: Beta Matrix?
0
gravatar for hseepany
2.8 years ago by
hseepany0
Canada
hseepany0 wrote:

Thanks Yuan,

However it still not working for me. I also downloaded some GEO data matrix and I am getting the same error:

 

<< Normalizing data with BMIQ Method >>
Note that,BMIQ function may fail for bad quality samples (Samples did not even show beta distribution).
Error in FUN(X[[i]], ...) : 
  only defined on a data frame with all numeric variables

Not sure whats going on here. Is it somehow assuming the first row i.e. probe IDs also as a part of the data?

Anyways, thank you so much for all the help.

Harshika

ADD COMMENTlink written 2.8 years ago by hseepany0

Hello Harshika:

In the error, it seems shows the matrix you input is not numeria. Have you checked your data format? If it's list, it will not work, please make sure it's matrix or dataframe. Because BMIQ function will do normalization by sample, in other word, by each column. And also please remove all NA value in your dataset (Maybe 0 as well), you can use champ.impute() function to do it.

 

The probe ID should be the rowname, and sample name would be the colname.

 

Best

Yuan Tian

ADD REPLYlink written 2.8 years ago by Yuan Tian80

So after I made sure that the probe ID is  rowname, and sample name is in the colname, now I get the following error.

<< Normalizing data with BMIQ Method >>
Note that,BMIQ function may fail for bad quality samples (Samples did not even show beta distribution).
3 cores will be used to do parallel BMIQ computing.
Error in champ.BMIQ(beta[, x], design.v, sampleID = colnames(beta)[x],  : 
  task 1 failed - "need at least 2 points to select a bandwidth automatically"

Sorry, its so frustrating, not sure where I am doing wrong. Also How do you arrange the sample sheet? Does the col names correspond to the Sample name (does it matter)?

Thanks,

Harshika

ADD REPLYlink written 2.8 years ago by hseepany0

Hello Harshika:

This error happens because you are using BMIQ method doing normalization, and BMIQ method requires sample have beta distribution, if your data's quality is not very good (For example some sample has too many low quality probes), your sample's beta value may not sure beta distribution. I think I wrote this problem both in the vignette and in the hint message given by champ.norm.

 

I suggest you check the QC.GUI() on your loaded dataset, in the third tab, you will find distribution plot for each sample,in which, you could find which sample is low quality.

Or you can run champ.nrom() again, but this time, please assign "cores" parameter as 1, that no parallel will be used, then you can see the processing on each sample in BMIQ, at the sample which have low quality, BMIQ would fail.

 

In theory, you may use other methods, SWAN or PBC to do normalization, but I have to say, based on my test, BMIQ works best among them, and since you have low quality sample, even if you can "successfully" run normalization with other methods, it does not means your sample is qualified to analysis. So I suggest you check each of your sample's distribution (with QC.GUI() function), then remove those low quality samples (Samples do not show beta distribution), then retry champ.norm() with BMIQ method still.

 

I don't know what you mean by "arrange the sample sheet". I think at the time IDAT file get loaded, colname should have been correpated with data and phenotype, isn't it?

 

Best

Yuan Tian

ADD REPLYlink written 2.8 years ago by Yuan Tian80
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 192 users visited in the last hour