ChAMP input: Beta Matrix?
8
0
Entering edit mode
@shicheng-guo-7973
Last seen 3.4 years ago
United States

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 • 7.1k views
ADD COMMENT
0
Entering edit mode
@daniel-e-weeks-10677
Last seen 12 months ago
Pittsburgh, Pennsylvania, United States…

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 COMMENT
0
Entering edit mode
Yuan Tian ▴ 90
@yuan-tian-9598
Last seen 4.9 years ago

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 COMMENT
0
Entering edit mode
hseepany • 0
@hseepany-8704
Last seen 8.1 years ago
Canada

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 COMMENT
0
Entering edit mode

Hi! I am coming back to this post after a long time it seems. I also have an excel sheet with all the beta values and probe IDs. You are saying that you loaded it using read.table. Does it mean you didn't use champ.load or champ.import? I am very confused about how to load this excel sheet into champ. Could you please share with me how you did that? Thanks a lot! Tahirah

ADD REPLY
0
Entering edit mode
Yuan Tian ▴ 90
@yuan-tian-9598
Last seen 4.9 years ago

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 COMMENT
0
Entering edit mode
hseepany • 0
@hseepany-8704
Last seen 8.1 years ago
Canada

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 COMMENT
0
Entering edit mode
Yuan Tian ▴ 90
@yuan-tian-9598
Last seen 4.9 years ago

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 COMMENT
0
Entering edit mode
hseepany • 0
@hseepany-8704
Last seen 8.1 years ago
Canada

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 COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode
• 0
@坤-24488
Last seen 4.0 years ago

Here is the error message that I get:

myNorm <- champ.norm(beta=myLoad$beta,arraytype="450K",cores=5) [===========================]

<h2>[>>>>> ChAMP.NORM START <<<<<<]</h2>

champ.norm Results will be saved in ./CHAMP_Normalization/ [ SWAN method call for BOTH rgSet and mset input, FunctionalNormalization 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). 5 cores will be used to do parallel BMIQ computing. Error in champ.BMIQ(beta[, x], design.v, sampleID = colnames(beta)[x], : task 1 failed - "could not find function "blc""

Thanks,

ADD COMMENT

Login before adding your answer.

Traffic: 725 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6