DiffBind contrasts issue
Entering edit mode
rbronste ▴ 60
Last seen 23 months ago

Trying to set up a contrast based on some masks and having some problems. The dba.count looks as follows: 

12 Samples, 1054182 sites in matrix (2657422 total):

     ID Tissue Factor Condition Treatment Replicate Caller Intervals

1  MBV1  BN1     DR      MALE   VEHICLE         1 narrow    500000

2  MBV2  BN1     DR      MALE   VEHICLE         2 narrow    281265

3  MBV3  BN1     DR      MALE   VEHICLE         3 narrow    500000

4  FBV1  BN3     DR    FEMALE   VEHICLE         1 narrow    500000

5  FBV2  BN3     DR    FEMALE   VEHICLE         2 narrow    500000

6  FBV3  BN3     DR    FEMALE   VEHICLE         3 narrow    439016

7  MBE7  BN2     DR      MALE  TREATMENT         1 narrow    500000

8  MBE8  BN2     DR      MALE  TREATMENT         2 narrow    500000

9  MBE9  BN2     DR      MALE  TREATMENT         3 narrow    500000

10 FBE1  BN4     DR    FEMALE  TREATMENT         1 narrow    500000

11 FBE2  BN4     DR    FEMALE  TREATMENT         2 narrow    500000

12 FBE3  BN4     DR    FEMALE  TREATMENT         3 narrow    500000

I would like to set up a comparison where I pair male or female with vehicle or treatment. Have the following dba.masks written:

CHIP_adult_BN_mask_MaleVeh<-dba.mask(CHIP_adult_BN_count, attribute = DBA_CONDITION, DBA_TREATMENT, combine = "MALE and VEHICLE")
 CHIP_adult_BN_mask_FemaleVeh<-dba.mask(CHIP_adult_BN_count, attribute = DBA_CONDITION, DBA_TREATMENT, combine = "FEMALE and VEHICLE")
CHIP_adult_BN_mask_MaleTRE<-dba.mask(CHIP_adult_BN_count, attribute = DBA_CONDITION, DBA_TREATMENT, combine = "MALE and TREATMENT")
 CHIP_adult_BN_mask_FemaleTRE<-dba.mask(CHIP_adult_BN_count, attribute = DBA_CONDITION, DBA_TREATMENT, combine = "FEMALE and TREATMENT")

After this tried setting up the following dba.contrast prior to analysis: 

CHIP_adult_BN_Malecontrast<-dba.contrast(CHIP_adult_BN_count, group1 = CHIP_adult_BN_mask_MaleVeh, group2 = CHIP_adult_BN_mask_MaleTRE, minMembers = 3)

Error: Warning message:
Unable to add redundant contrast

Any ideas? Thanks!

diffbind chipseq • 875 views
Entering edit mode
Rory Stark ★ 4.1k
Last seen 13 days ago
CRUK, Cambridge, UK

The parameters in the calls to dba.mask() are incorrect. The attribute parameter is being set to DBA_CONDITION only; the third parameter, value, is being set to DBA_TREAMENT, which doesn't make sense, and combine should be set to one of "or", "and", "nor", or "nand".

There is a much easier way to accomplish what I think you are trying to do using the pre-defined masks: 

> masks <- CHIP_adult_BN_count$masks
> CHIP_adult_BN_mask_MaleVeh   <- masks$MALE & masks$VEHICLE
> CHIP_adult_BN_mask_FemaleVeh <- masks$FEMALE & masks$VEHICLE 
> CHIP_adult_BN_mask_MaleTRE   <- masks$MALE & masks$TREATMENT
> CHIP_adult_BN_mask_FemaleTRE <- masks$FEMALE & masks$TREATMENT
> CHIP_adult_BN_Malecontrast   <- 
                   group1 = CHIP_adult_BN_mask_MaleVeh, 
                   group2 = CHIP_adult_BN_mask_MaleTRE)

You shouldn't use the minMembers parameter when  specifying contrasts, as this parameter is only used when contrasts are generated automatically. 

Entering edit mode

Thanks very much for the help! 

Another question, will this setup allow me to look at interactions as I do in DESeq alone with sex:treatment etc? (In addition to pairwise comparisons)


Login before adding your answer.

Traffic: 270 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6