I have tried the tutorial of diffbind after installing and re-stalling the Rstudio, bioconductor and diffbind...but the dba function doesn´t go...it always come Error: could not find function "dba". I am an idiot with line command, so pelase, can somone tell me what to do? All I want is to compare two data sets, controll and treatment for differential peaks....
Sorry with such simple things but I installed Diffbind and got this:
package ‘DiffBind’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\mmarins\AppData\Local\Temp\RtmpcPzIwo\downloaded_packages
Then I typed
> library(DiffBind)
and got this
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called ‘ShortRead’
Error: package or namespace load failed for ‘DiffBind’
Dear Rory,
Thanks. The dba function is now there after the manual instalation. But now I got the second basic step. I have a control file (control.bed) and test experiment (test.bed) which I got from Macs2. I don't understand how to build that samplesheetfile or proceed to a differential analysis with them after following the diffbind tutorial for tamoxifen. Any tips besides getting a course?
This one will probably get to the top of your patience! Sorry.
Mozart
The peak caller name MACS2 is not recognized, it defaults to raw, which looks for the peak score in the fourth column (chromosome, start, end, score). I'm not sure what the format of your Peaks files. If it is really BED format, it should have five columns: chromosome, start, end, name, score (score in the fifth column). In this case, you can enter bed instead of MACS2 in the PeakCaller column. Alternatively, you can add another column, ScoreCol, and include the column number with the scores (5).
Another option is to use the .xls files from MACS2 instead of the bed files, and set the PeakCaller to macs.
If you're still having a problem, post the first two or three lines from one of the peak files here and I'll help sort it out.
Officially BED scores should be integers between 0 and 1000 (according to the UCSC genome browser site) but DiffBind will happily tolerate higher (and fractional) scores.
I fixed the last error by taking the tamoxifen sample sheet and opening it in Excell. When I open it, all the data is in one column (A1) separated by comma. When I did my samplesheet I have put each data in one column and saved as a CSV file. Now, I did exactly as in the tamoxifen samplesheet and now I get this error
U2OS U2OS p53 not-treated DMSO 1 raw
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec, :
line 26 did not have 3 elements
In addition: Warning messages:
1: In readLines(fn, n = 1) : line 1 appears to contain an embedded nul
2: In readLines(file, skip) : line 1 appears to contain an embedded nul
Please, any advice? And once again thank you for your patience.
I'm not sure what you're doing here, but the bed file output by MACS2 should be read in properly as-is if the PeakCaller or PeakFormat fields are set to bed. I can see the format is still being set to raw, probably because you have the PeakCaller set to MACS2 which is unrecognized and don't have a PeakFormat field present to indicate that the format is actually bed.
Alternatively, you can specify the peak format when you load the sample sheet:
Thanks...I got it. It loaded. Wrong labelling from a stupid beginner with line commands in R. I used
peakFormat="bed" and it worked. Then I went once again to see what was wrong and I got it...PeaksCaller instead of PeakCaller...in the computers grammar world, they do (up to now) what you tell them to do!!!
Thank you for your patience and help. Let´s see what the next error will be.
This is BED format. Either set the
PeakCaller
values tobed
, or add aPeakFormat
column and set those values tobed
.