I have run a dba analysis on 4 cell types, each with 2 replicates. The way I've setup the call to dba.analyze
results in 10 contrasts. I have two questions about retrieving the results:
1) Is it possible to retrieve the DB peaks from an individual contrast, with the score column reported for all samples, in RPKM?
The code I've used is pasted below. It retrieves peaks for a specified contrast but I've been unable to change the score to RPKM in the output file. By that I mean that the values in the Score column in the output are the same as those in the Score column when I call my_dba$peaks[], rather than the values in the RPKM column.
2) What I would actually like is to export a single bed file/GR object of all DB peaks from all contrasts together,
with the rpkm values for all samples in each contrast. Is this possible?
3) Similarly, for all DB peaks in my analysis (I mean the merged results from all contrasts) is it possible to get the
read counts for the peaks in each contrast across all samples, not just the samples that were in the contrast?
I think that perhaps I can ouput a dba report-based object and retrieve the values I'm looking for from this but I'm just unfamiliar with working with this object type. I appreciate any help you can provide!!
my_dba <- dba(sampleSheet = samples, bRemoveRandom = T, minOverlap = 2) my_dba <- dba.peakset(my_dba, consensus = -DBA_REPLICATE) my_dba <- dba.count(my_dba, peaks = all_consensus$masks$Consensus, score = DBA_SCORE_RPKM) contrast <- dba.contrast(my_dba, categories=DBA_FACTOR, minMembers=2) my_dba <_ dba.analyze(contrast) contrast1_df <- dba.report(my_dba, contrast = 1, bCounts=T, bNormalized=T, DataType=DBA_DATA_FRAME, file="contrast1")