Answers.Body: <p>The problem was that I was using wrong files. I ran a pipeline from <a href="http://code.databio.org/PEPATAC/" rel="nofollow noreferrer">here</a> and it generates several folders with many files. The <code>.bam</code> files that should be used are located in the <code>aligned_mm10</code> folder and are with the extension: <code>.pe.q10.sort.rmdup.bam</code>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-18T12:02:14.483Z
Answers.Text: This link leads to a page not found. What was the pipeline that you were using?
Answers.UserDisplayName: llrs
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-18T23:44:59.953Z
Answers.Text: I see, it is just a `private` page, so that is why you might not be able to access it. It is this one: https://github.com/databio look for `pepatac`. Then, my answer is useless since no one can access it anyway...
Answers.UserDisplayName: Nikita Vlasenko
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-17T19:07:31.357Z
Answers.LastActivityDate: 2018-12-14T14:56:45.657Z
Answers.LastEditDate: 2018-12-14T14:56:45.657Z
Answers.UserDisplayName: Nikita Vlasenko
Body: <p>I am trying to use <code>DiffBind</code> for my <code>ATACseq</code> experiment going through the <code>vignette</code> for <code>DiffBind</code>. I was able to import the data and make a heatmap with <code>plot(data)</code>. But somehow calling <code>data &lt;- dba.contrast(data, categories=DBA_TISSUE)</code> function is not working for me giving a warning message:</p>
  
  <blockquote>
    <p>Warning message:
    Model must include count data for contrasts. </p>
  </blockquote>
  
  <p>I tried running beforehand: <code>data &lt;- dba.count(data)</code> but it is giving an error:</p>
  
  <blockquote>
    <p>Error: Error processing one or more read files. Check warnings().
    In addition: Warning messages:
    1:<br>
    2:<br>
    3:<br>
    4:<br>
    5:<br>
    6:<br>
    7:  </p>
  </blockquote>
  
  <p>My <code>sample_sheet.csv</code>looks like that:</p>
  
  <p><a href="https://i.sstatic.net/rlftk.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/rlftk.png" alt="enter image description here"></a></p>
  
  <p>I just need to compare <code>Dura</code> vs <code>Microglia</code> which is <code>Tissue</code> column. How could this error be fixed? Any suggestions would be greatly appreciated.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-08-14T08:55:38.147Z
Comments.Text: Note that you have a BED file in the bamReads column rather than the BAM file that you fed to MACS2...
Comments.UserDisplayName: Devon Ryan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-08-14T15:25:55.760Z
Comments.Text: I know but it is written in the documentation that both bed and bam files are fine. I tried supplying bam files too since I have them, but it does not work either.
Comments.UserDisplayName: Nikita Vlasenko
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-08-14T18:33:40.787Z
Comments.Text: Sure it can accept BED files, but they need to be from something like `bedtools bamtobed`. What was the error when you used BAM files?
Comments.UserDisplayName: Devon Ryan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-08-14T21:30:46.863Z
Comments.Text: Wrong suffix error and just empty warnings as shown at the top. My data quality is poor (low mapping rates), so can it just be data quality issue?
Comments.UserDisplayName: Nikita Vlasenko
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-08-14T22:05:43.200Z
Comments.Text: Could be. You might try CSAW instead, it's what we use for differential accessibility with ATAC-seq data.
Comments.UserDisplayName: Devon Ryan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-08-15T16:01:41.510Z
Comments.Text: Can you provide some reproducible data to test and see how to avoid the error?
Comments.UserDisplayName: llrs
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-08-15T19:38:53.073Z
Comments.Text: With the data that I have now it is definitely not working, and the issue is not yet solved either because of the poor quality data, or because something else is going wrong. I will post the answer if I figure out why that was happening. Besides, I am not sure how I can attach `12` files here, or even just `2` for `1` sample.
Comments.UserDisplayName: Nikita Vlasenko
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-08-15T22:28:21.193Z
Comments.Text: Ah, I have definitely run into this issue before - it is resolveable, but I cannot for the life of me remember exactly what the issue was. I think it was related to the file paths, but your data quality is likely not the issue.
Comments.UserDisplayName: Jared Andrews
Tags: <atac-seq>
Title: DiffBind: Model must include count data for contrasts.
ThreadText: # DiffBind: Model must include count data for contrasts.
  
  (Asked by: username_0 on 2018-08-14)
  
  I am trying to use `DiffBind` for my `ATACseq` experiment going through the `vignette` for `DiffBind`. I was able to import the data and make a heatmap with `plot(data)`. But somehow calling `data <- dba.contrast(data, categories=DBA_TISSUE)` function is not working for me giving a warning message:
  
  > Warning message:
  > Model must include count data for contrasts.
  
  I tried running beforehand: `data <- dba.count(data)` but it is giving an error:
  
  > Error: Error processing one or more read files. Check warnings().
  > In addition: Warning messages:
  > 1:  
  > 2:  
  > 3:  
  > 4:  
  > 5:  
  > 6:  
  > 7:
  
  My `sample_sheet.csv`looks like that:
  
  [![enter image description here](https://i.sstatic.net/rlftk.png)](https://i.sstatic.net/rlftk.png)
  
  I just need to compare `Dura` vs `Microglia` which is `Tissue` column. How could this error be fixed? Any suggestions would be greatly appreciated.
  
  **Tags:** atac-seq
  
  > **Comments:**
  > **username_1**: Note that you have a BED file in the bamReads column rather than the BAM file that you fed to MACS2...  
  > **username_0**: I know but it is written in the documentation that both bed and bam files are fine. I tried supplying bam files too since I have them, but it does not work either.  
  > **username_1**: Sure it can accept BED files, but they need to be from something like `bedtools bamtobed`. What was the error when you used BAM files?  
  > **username_0**: Wrong suffix error and just empty warnings as shown at the top. My data quality is poor (low mapping rates), so can it just be data quality issue?  
  > **username_1**: Could be. You might try CSAW instead, it's what we use for differential accessibility with ATAC-seq data.  
  > **username_2**: Can you provide some reproducible data to test and see how to avoid the error?  
  > **username_0**: With the data that I have now it is definitely not working, and the issue is not yet solved either because of the poor quality data, or because something else is going wrong. I will post the answer if I figure out why that was happening. Besides, I am not sure how I can attach `12` files here, or even just `2` for `1` sample.  
  > **username_3**: Ah, I have definitely run into this issue before - it is resolveable, but I cannot for the life of me remember exactly what the issue was. I think it was related to the file paths, but your data quality is likely not the issue.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2018-08-17. Score: 0
  
  The problem was that I was using wrong files. I ran a pipeline from [here](http://code.databio.org/PEPATAC/) and it generates several folders with many files. The `.bam` files that should be used are located in the `aligned_mm10` folder and are with the extension: `.pe.q10.sort.rmdup.bam`.
  
  > **Comments:**
  > **username_2**: This link leads to a page not found. What was the pipeline that you were using?  
  > **username_0**: I see, it is just a `private` page, so that is why you might not be able to access it. It is this one: https://github.com/databio look for `pepatac`. Then, my answer is useless since no one can access it anyway...  
  
  ---
  
  