-
Notifications
You must be signed in to change notification settings - Fork 16
Description
Hello!
First of all, thank you for this great package!
I am running in to a problem when running the dmrseq function on ALL of my data. I have a filtered object that contains 21mill loci as follows:
An object of type 'BSseq' with
21266393 methylation loci
18 samples
has not been smoothed
All assays are in-memory
Now when I call the dmrseq function as follows:
testCovariate <- "age"
regions <- dmrseq(bs=bs.filt,
cutoff = 0.05,
testCovariate=testCovariate, maxPerms = 1)
The function runs without issue until it gets to chromosome 2 (however i have also replicated this when running dmrseq chrperchunk=5).. dmrseq stops running and gives me the following error:
Error in result[[njob]] <- value : attempt to select less than one element in OneIndex
I am really unsure as to why this is occurring and any advice (or fix) would be greatly appreciated!
When i filter the bs.filt object to the first 50-100,000 loci this error does not occur. This is good for testing the function and general quality of the data however I really need to run this on the entire dataset for differentially methylated regions etc....
Secondly, I am making a PCA plot with prcomp. I saw an example of hierarchical clustering and similarity matrix being carried out on raw data as follows (this comes from the bsseq vignette:
cormat <- round(cor(as.matrix(getMeth(fil, type="raw"))
I was wondering if you could comment on two things:
Why are raw methylation values used? should they not be normalised in any way?
is it advised to make a pca from the raw counts of methlyation percentages as in assay(bs.filt) or should a pca be generated using methylation estimates? thank you for advising on this as it isn't clear cut to me what normalisation output there is and what should be sued for quality control plots!
many thanks in advance!