DiffBind: error with dba(sampleSheet="samples.csv")
1
0
Entering edit mode
@hemantgujar14-12424
Last seen 4.7 years ago

Hi 

I am new to R and to DiffBind. I am trying to analyse some ChipSeq data. I have aligned reads to the genome and obtained a bam and bed file. Then I obtained peak calls using MACS.

While using diffbinds, I am getting some error message with the dba command. 

The error message is as follows :- 

> test <- dba(sampleSheet="samples.csv")

K1 white NT Media Treated 1 raw

Error in Summary.factor(c(1L, 11112L, 22223L, 28200L, 29311L, 30422L,  :

  ‘max’ not meaningful for factors

 

The first four lines of my samples.csv file looks like this:- 

SampleID,Tissue,Factor,Condition,Treatment,Replicate,bamReads,ControlID,bamControl,Peaks,PeakCaller

K1,White,EZH,Young,Treated,1,sorted_bam_backup/K1_NT_hssorted.bam,K7,sorted_bam_backup/K7_NT_hssorted.bam,peaks/macsNThsK1_peaks.bed,raw

K3,White,EZH,Young,Treated,2,sorted_bam_backup/K3_NT_hssorted.bam,K7,sorted_bam_backup/K7_NT_hssorted.bam,peaks/macsNThsK3_peaks.bed,raw

K5,White,EZH,Young,Treated,3,sorted_bam_backup/K5_NT_hssorted.bam,K7,sorted_bam_backup/K7_NT_hssorted.bam,peaks/macsNThsK5_peaks.bed,raw

 

The first four lines of my MACS bed file looks like this :- 

chr1    11003    11775    MACS_peak_1    210.13
chr1    28497    30226    MACS_peak_2    270.62
chr1    181304    182466    MACS_peak_3    232.53
chr1    198831    200680    MACS_peak_4    313.48

 

I have gone through various help pages already available on the internet but I am still unable to solve this problem. 

 

Can someone please help. 

 

Best Regards

Hemant Gujar. 

 

 

 

R DiffBind • 1.5k views
ADD COMMENT
3
Entering edit mode
Rory Stark ★ 4.1k
@rory-stark-5741
Last seen 20 days ago
CRUK, Cambridge, UK

The peak files you are using are in bed format, with the score in the 5th column. In your sample sheet, you specified the format as "raw", which expects the score in the 4th column. So if you change the values in the last column of samples.csv from "raw" to "bed", it should work.

-Rory

ADD COMMENT
0
Entering edit mode

Thanks a lot that was easy. I really appreciate your quick reply.

 

ADD REPLY
0
Entering edit mode
samples
   SampleID Tissue Condition Replicate            bamReads               Peaks PeakCaller
1      HSC1    HSC    Normal         1   mito_rem/HSC1.bam   mito_rem/HSC1.bed      Homer
2      HSC2    HSC    Normal         2   mito_rem/HSC2.bam   mito_rem/HSC2.bed      Homer
3      HSC3    HSC    Normal         3   mito_rem/HSC3.bam   mito_rem/HSC3.bed      Homer
4      HSC4    HSC    Normal         4   mito_rem/HSC4.bam   mito_rem/HSC4.bed      Homer
5      HSC5    HSC    Normal         5   mito_rem/HSC5.bam   mito_rem/HSC5.bed      Homer
6      HSC6    HSC    Normal         6   mito_rem/HSC6.bam   mito_rem/HSC6.bed      Homer
7      HSC7    HSC    Normal         7   mito_rem/HSC7.bam   mito_rem/HSC7.bed      Homer
8    pHSC10   pHSC   Disease         1 mito_rem/pHSC10.bam mito_rem/pHSC10.bed      Homer
9    pHSC11   pHSC   Disease         2 mito_rem/pHSC11.bam mito_rem/pHSC11.bed      Homer
10   pHSC12   pHSC   Disease         3 mito_rem/pHSC12.bam mito_rem/pHSC12.bed      Homer
11   pHSC13   pHSC   Disease         4 mito_rem/pHSC13.bam mito_rem/pHSC13.bed      Homer

My error "HSC1 HSC Normal 1 Homer

Error in Summary.factor(c(1L, 11112L, 22223L, 33334L, 44445L, 55556L, : ‘max’ not meaningful for factors"

My bed-file format

  chr1    817341   817503 pHSC_2  17.7 
     chr1    827437   827599 pHSC_3  45.8 
     chr1    858022   858184 pHSC_4   5.62
     chr1    858816   858978 pHSC_5   4.73
     chr1    861023   861185 pHSC_6   5.62
     chr1    869955   870117 pHSC_7  23.6

Not sure what is going wrong you said about "raw" what is it Im not able to resolve the issue.

ADD REPLY
0
Entering edit mode

You should add a column called PeakFormat, with the values set to bed.

ADD REPLY

Login before adding your answer.

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