<p>It looks like a weird way to represent data. You're right, it does not at all look like a <a href="http://genome.ucsc.edu/FAQ/FAQformat.html#format1" rel="nofollow noreferrer">BED</a>. </p>

<p><a href="https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSM2247316" rel="nofollow noreferrer">Digging in GEO</a> made me find this information:</p>

<blockquote>
  <p>Supplementary_files_format_and_content: Tab-delimited file reports one
  contact per row. Interacting HindIII fragments are represented in bed
  format (chr/start/stop) with bait (or upstream bait, in the case of
  b2b contacts) listed first. The following fields correspond to a
  unique contact ID, fragment IDs for first and second fragments, and
  raw read counts supporting contacts in each replicates.</p>
</blockquote>

<p>So I think the authors merged a BED3 format plus additional BED-unrelated fields generating a tab-separated file - not clearly stated in their <a href="http://www.nature.com/ng/journal/vaop/ncurrent/full/ng.3935.html?foxtrotcallback=true#methods" rel="nofollow noreferrer">methods</a> though. The easiest would be to contact the authors maybe?</p>

<p>Depending on your aims, if you only need the first 3 fields (but I doubt it) I would reformat this "bed" file (to make it processable as a BED file) in two sub-files:</p>

<pre><code>cat original.bed | cut -f 1,2,3 &gt; bait1.txt
cat bait1.txt | head -3
chr1    831895  848168 
chr1    831895  848168 
chr1    831895  848168

cat original.bed | cut -f 4,5,6 &gt; bait2.txt
cat bait2.txt | head -3
chr1    850619  874081  
chr1    889424  903640
chr1    903641  927394
</code></pre>

<p>Not sure if it would fit your aims though. </p>

<p>Also, for visualization of contact matrices, maybe you'll find <a href="https://genomebiology.biomedcentral.com/articles/10.1186/s13059-017-1161-y" rel="nofollow noreferrer">this paper</a> useful. </p>

CC BY-SA 3.0
2017-08-29T18:55:55.107Z
You could simplify your command to `cut -f 1-3 original.bed > bait1.txt` if you like. The `cat` isn't needed, `cut` can take a file path as input and lists of fields can be defined with `x-y`.
terdon
CC BY-SA 3.0
2017-08-29T19:46:14.877Z
This is one of the umpteen ways one can think of representing a contact matrix and is likley particular to the supplemental data in this paper (since it's unusual to store 6 contact matrices in a single file). If OP want to visualize this, then it'll likely need to be munge it into a very different format.
Devon Ryan
CC BY-SA 3.0
2017-08-30T08:45:28.300Z
Thanks for the help, but it's not really what I'm after.
ithinkiam
CC BY-SA 3.0
2017-08-30T08:49:20.767Z
ok, so maybe would be wise to edit your question and make your aims clear, so users can give more meaningful answers. or you just wanted to verify is not some kind of documented format you might have skipped?
aechchiki
CC BY-SA 3.0
2017-08-29T17:45:47.370Z
2017-08-30T08:51:15.747Z
2017-08-30T08:51:15.747Z
aechchiki
<p>Time for guess the bioinformatics file format... :)</p>

<p>I found this '.bed' file on GEO (<a href="https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE84660" rel="nofollow noreferrer">GSE84660</a>), but it's clearly not a BED file. Anyone know what it <em>might</em> be? And what can view it? It's from a HiC expt.</p>

<pre><code>#column headers: bait1_chr, bait1_start, bait1_end, bait2_chr, bait2_start, bait2_end, contact_ID, NA, NA, B1_D0_counts, B1_D3_counts, B1_D6_counts, B2_D0_counts, B2_D3_counts, B2_D6_counts

chr1    831895  848168  chr1    850619  874081  b2b_1   .       .       114     125     127     75      97      92
chr1    831895  848168  chr1    889424  903640  b2b_2   .       .       15      12      16      4       15      20
chr1    831895  848168  chr1    903641  927394  b2b_3   .       .       13      13      10      18      15      8
...
</code></pre>

CC BY-SA 3.0
2017-08-29T18:51:26.737Z
Could you explain what you need it for? I mean, that's just a simple text file so any text editor (or even excel) can view it. What information do you need to extract from it?
terdon
CC BY-SA 3.0
2017-08-29T19:32:33.310Z
Are you trying to visualize the contact matrix? This data comes [from this paper](https://www.nature.com/ng/journal/vaop/ncurrent/full/ng.3935.html).
Devon Ryan
CC BY-SA 3.0
2017-08-29T20:36:28.423Z
@DevonRyan ideally yes, but first I wanted to check that this wasn't some specific format I wasn't aware of. Have any suggestions to visualise a contact matrix?
ithinkiam
CC BY-SA 3.0
2017-08-29T20:39:13.480Z
@ithinkiam I'd suggest [HiCExplorer](https://github.com/maxplanck-ie/HiCExplorer), but I'm biased. To your original question, you'll still need to munge this file, but I'll see if I can come up with some code for that.
Devon Ryan
CC BY-SA 3.0
2017-08-29T20:57:15.080Z
@ithinkiam I take that back, it's not 100% clear what the appropriate way is to go from large bait regions to single positions. Hopefully someone else has a better idea.
Devon Ryan
CC BY-SA 3.0
2017-08-30T10:38:11.523Z
Perhaps it's been called _.bed_ to suggest that the start/end coordinates are to be interpreted in a BED-style 0-based half-open (or equivalently 0-based start, 1-based end) way?  The pair of genomic intervals per record is reminiscent of [BEDPE format](http://bedtools.readthedocs.io/en/latest/content/general-usage.html#bedpe-format), but I'm not familiar with anything HiC so wouldn't comment on whether this is mere coincidence…
John Marshall
<file-formats>
What format is this? Pretty sure it's not a BED file
# What format is this? Pretty sure it's not a BED file

(Asked by: username_0 on 2017-08-29)

Time for guess the bioinformatics file format... :)
I found this '.bed' file on GEO (GSE84660), but it's clearly not a BED file. Anyone know what it might be? And what can view it? It's from a HiC expt.
#column headers: bait1_chr, bait1_start, bait1_end, bait2_chr, bait2_start, bait2_end, contact_ID, NA, NA, B1_D0_counts, B1_D3_counts, B1_D6_counts, B2_D0_counts, B2_D3_counts, B2_D6_counts

chr1    831895  848168  chr1    850619  874081  b2b_1   .       .       114     125     127     75      97      92
chr1    831895  848168  chr1    889424  903640  b2b_2   .       .       15      12      16      4       15      20
chr1    831895  848168  chr1    903641  927394  b2b_3   .       .       13      13      10      18      15      8
...

**Tags:** file-formats
> **Comments:**
> **username_1**: Could you explain what you need it for? I mean, that's just a simple text file so any text editor (or even excel) can view it. What information do you need to extract from it?  
> **username_2**: Are you trying to visualize the contact matrix? This data comes [from this paper](https://www.nature.com/ng/journal/vaop/ncurrent/full/ng.3935.html).  
> **username_0**: @DevonRyan ideally yes, but first I wanted to check that this wasn't some specific format I wasn't aware of. Have any suggestions to visualise a contact matrix?  
> **username_2**: @ithinkiam I'd suggest [HiCExplorer](https://github.com/maxplanck-ie/HiCExplorer), but I'm biased. To your original question, you'll still need to munge this file, but I'll see if I can come up with some code for that.  
> **username_2**: @ithinkiam I take that back, it's not 100% clear what the appropriate way is to go from large bait regions to single positions. Hopefully someone else has a better idea.  
> **username_3**: Perhaps it's been called _.bed_ to suggest that the start/end coordinates are to be interpreted in a BED-style 0-based half-open (or equivalently 0-based start, 1-based end) way?  The pair of genomic intervals per record is reminiscent of [BEDPE format](http://bedtools.readthedocs.io/en/latest/content/general-usage.html#bedpe-format), but I'm not familiar with anything HiC so wouldn't comment on whether this is mere coincidence…  

---

## 1 answers

### Answer by username_4 on 2017-08-29. Score: 6

It looks like a weird way to represent data. You're right, it does not at all look like a BED. 
Digging in GEO made me find this information:

Supplementary_files_format_and_content: Tab-delimited file reports one
  contact per row. Interacting HindIII fragments are represented in bed
  format (chr/start/stop) with bait (or upstream bait, in the case of
  b2b contacts) listed first. The following fields correspond to a
  unique contact ID, fragment IDs for first and second fragments, and
  raw read counts supporting contacts in each replicates.

So I think the authors merged a BED3 format plus additional BED-unrelated fields generating a tab-separated file - not clearly stated in their methods though. The easiest would be to contact the authors maybe?
Depending on your aims, if you only need the first 3 fields (but I doubt it) I would reformat this "bed" file (to make it processable as a BED file) in two sub-files:
cat original.bed | cut -f 1,2,3 > bait1.txt
cat bait1.txt | head -3
chr1    831895  848168 
chr1    831895  848168 
chr1    831895  848168

cat original.bed | cut -f 4,5,6 > bait2.txt
cat bait2.txt | head -3
chr1    850619  874081  
chr1    889424  903640
chr1    903641  927394

Not sure if it would fit your aims though. 
Also, for visualization of contact matrices, maybe you'll find this paper useful.

> **Comments:**
> **username_1**: You could simplify your command to `cut -f 1-3 original.bed > bait1.txt` if you like. The `cat` isn't needed, `cut` can take a file path as input and lists of fields can be defined with `x-y`.  
> **username_2**: This is one of the umpteen ways one can think of representing a contact matrix and is likley particular to the supplemental data in this paper (since it's unusual to store 6 contact matrices in a single file). If OP want to visualize this, then it'll likely need to be munge it into a very different format.  
> **username_0**: Thanks for the help, but it's not really what I'm after.  
> **username_4**: ok, so maybe would be wise to edit your question and make your aims clear, so users can give more meaningful answers. or you just wanted to verify is not some kind of documented format you might have skipped?  

---

