hansenlab / bsseq

Devel repository for bsseq
35 stars 25 forks source link

BSmooth.tstat error, Error in preplot.locfit.raw(.... #90

Open shawpa opened 4 years ago

shawpa commented 4 years ago

I am trying to run the BSmooth.tstat command. My data is not WGBS. It is targeted methylation data (which may be the issue). I was following directions from an Agilent bulletin to use this program with targeted data. When I run the BSmooth.tstat command on the smoothed data I get the following error:

[BSmooth.tstat] computing stats across groups ... Error in preplot.locfit.raw(object, newdata, where, what, band) :
  NA/NaN/Inf in foreign function call (arg 2)
In addition: Warning messages:
1: In lfproc(x, y, weights = weights, cens = cens, base = base, geth = geth,  :
  max_nr reduction problem
2: In lfproc(x, y, weights = weights, cens = cens, base = base, geth = geth,  :
  max_nr reduction problem
3: In lfproc(x, y, weights = weights, cens = cens, base = base, geth = geth,  :
  max_nr reduction problem
4: In lfproc(x, y, weights = weights, cens = cens, base = base, geth = geth,  :
  max_nr reduction problem
5: In lfproc(x, y, weights = weights, cens = cens, base = base, geth = geth,  :
  max_nr reduction problem
6: In lfproc(x, y, weights = weights, cens = cens, base = base, geth = geth,  :
  max_nr reduction problem
7: In lfproc(x, y, weights = weights, cens = cens, base = base, geth = geth,  :
  max_nr reduction problem
8: In lfproc(x, y, weights = weights, cens = cens, base = base, geth = geth,  :
  max_nr reduction problem
9: In lfproc(x, y, weights = weights, cens = cens, base = base, geth = geth,  :
  max_nr reduction problem
10: In lfproc(x, y, weights = weights, cens = cens, base = base, geth = geth,  :
  max_nr not converged

I've looked online and in this forum for this error message and haven't found any fix. I am attaching a list of the commands I have run for reference. I mainly want to use this program for visualization purposes and not for DMR detection.

bssmooth_commands.txt

PeteHaitch commented 4 years ago

Are you able to share a small subset of your data that you can reproduce this error on?

shawpa commented 4 years ago

Is there a command for me to output the BSseq object so that I can send a small portion? I know how to subset it within the program, but not sure what file type to send.

Annie

From: Peter Hickey notifications@github.com Sent: Wednesday, March 18, 2020 6:30 PM To: hansenlab/bsseq bsseq@noreply.github.com Cc: Shaw, Patricia shawpa@mwri.magee.edu; Author author@noreply.github.com Subject: Re: [hansenlab/bsseq] BSmooth.tstat error, Error in preplot.locfit.raw(.... (#90)

Are you able to share a small subset of your data that you can reproduce this error on?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/hansenlab/bsseq/issues/90#issuecomment-600891437, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACED6ANOX4ENEO5B34T7HRTRIFDQHANCNFSM4LOSILLA.

Confidential UPMC, Magee-Womens Research Institute & Foundation Information. Any unauthorized or improper disclosure, copying, distribution or use of the contents of this email or any attachments is prohibited. The information contained in this email message is intended only for the personal and confidential use of the recipient(s) named above. If you have received this communication in error, please notify the sender immediately by email and delete the original message.

PeteHaitch commented 4 years ago

Once you've subsetted the object to make, say, bsseq_subset, you can run saveRDS(bsseq_subset, "your_directory/bsseq_subset.rds") and then share the your_directory/bsseq_subset.rds file. It'll probably be too large to upload directly to this issue, so you may need to use Dropbox or similar.

PeteHaitch commented 4 years ago

Also, please post the output of BiocManager::valid() from an R session where the error occurs.

shawpa commented 4 years ago

I am attempting to upload the file to some cloud server. Trying google drive or one drive but upload says it will take 20 hours. Unfortunately my business one drive will not allow me to share with anyone outside my organization. The "small" file is 1.5Gb. If you had a server, I could send it via scp from my server. The output from the BiocManager command is attached. If you have any other suggestions as to how I could transfer the file, please let me know.

biocmanager.txt

kasperdanielhansen commented 4 years ago

Here are some points, which may not be clear to you

  1. You don't need to compute the t-stats if all you want is plotting. The t-stats are for finding DMRs.
  2. I think that we only do smoothing in the t-stats code when local.correct=TRUE. You should try disabling this. I am not sure this piece of correcting is a good idea for targeted data anyway.
  3. If you still want to run t-stats and local.correct=TRUE I would guess this error comes when you have very isolated CpGs. With targeted data I would have two hypotheses a) do you have chromosomes (for example Un) which are very small. Try removing them. b) The clustering we do, might not be so good with targeted data. What is your maxGap setting?

On Fri, Mar 20, 2020 at 8:27 AM shawpa notifications@github.com wrote:

I am attempting to upload the file to some cloud server. Trying google drive or one drive but upload says it will take 20 hours. Unfortunately my business one drive will not allow me to share with anyone outside my organization. The "small" file is 1.5Gb. If you had a server, I could send it via scp from my server. The output from the BiocManager command is attached. If you have any other suggestions as to how I could transfer the file, please let me know.

biocmanager.txt https://github.com/hansenlab/bsseq/files/4359482/biocmanager.txt

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hansenlab/bsseq/issues/90#issuecomment-601674590, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABF2DH4TQ7ULTMRKB5EOIADRINOKNANCNFSM4LOSILLA .

-- Best, Kasper

shawpa commented 4 years ago

Thank you for the pointers. I will definitely try plotting to see if it works. I was just following the steps on the website. I did remove all the extraneous contigs (chrUn) from the data. I was able to isolate it to chr6 as the issue. Everything else tstat runs fine. That is the file I am attempting to upload. I used 1x10^8 for max gap. Other relevant settings were ns=20, h=500. Would you still like for me to send my data. It is uploading a little faster than expected at this point. Is there an email address to share it with?