Diffbind plotting options
1
0
Entering edit mode
Helene • 0
@helene-18644
Last seen 5.2 years ago

Hello,

I am working with data set that has 29 different samples with 9 different conditions (all in Condition column), for a total of 28 contrasts (conditions have 1 to 4 samples).

I am trying to make a PCA plot that shows all samples, but only uses the peaks that are differentially bound in contrast #19 in the PCA calculations. My code is as follows:

dba.plotPCA(proj_contrast_analysis, mask=1:29, label = DBA_CONDITION, labelSize = 0.65, contrast = 19)

Being very new to Diffbind, I would really appreciate if someone could confirm that it is correct. Also, if my code is correct, could someone provide me some advice on how to color each condition separately. Currently the PCA shows all samples, but it uses one color for each of the conditions in contrast 19, and one more color for all other samples (labeled "Other" in the plot).

Thank you very much in advance!

diffbind • 557 views
ADD COMMENT
0
Entering edit mode
Rory Stark ★ 5.2k
@rory-stark-5741
Last seen 5 days ago
Cambridge, UK

In the call to dba.plotPCA(), set attributes=DBA_CONDITION (instead of label). You can set label to something else if that is helpful.

For example, consider the sample data:

    data(tamoxifen_counts)
    tamoxifen <- dba.contrast(tamoxifen, 
                              group1=3:5, name1="MCF7_Reponsive",
                              group2=8:9, name2="MCF7_Resistant")

    tamoxifen <- dba.analyze(tamoxifen)

    dba.plotPCA(tamoxifen, contrast=1, mask=1:11, 
                attributes=c(DBA_TISSUE), label=DBA_CONDITION)
ADD COMMENT

Login before adding your answer.

Traffic: 866 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