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
  • $\begingroup$ 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? $\endgroup$
    – terdon
    Aug 29, 2017 at 18:51
  • $\begingroup$ Are you trying to visualize the contact matrix? This data comes from this paper. $\endgroup$
    – Devon Ryan
    Aug 29, 2017 at 19:32
  • $\begingroup$ @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? $\endgroup$
    – ithinkiam
    Aug 29, 2017 at 20:36
  • 1
    $\begingroup$ @ithinkiam I'd suggest 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. $\endgroup$
    – Devon Ryan
    Aug 29, 2017 at 20:39
  • 1
    $\begingroup$ 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, but I'm not familiar with anything HiC so wouldn't comment on whether this is mere coincidence… $\endgroup$ Aug 30, 2017 at 10:38

1 Answer 1


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.

  • $\begingroup$ 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. $\endgroup$
    – terdon
    Aug 29, 2017 at 18:55
  • $\begingroup$ 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. $\endgroup$
    – Devon Ryan
    Aug 29, 2017 at 19:46
  • $\begingroup$ Thanks for the help, but it's not really what I'm after. $\endgroup$
    – ithinkiam
    Aug 30, 2017 at 8:45
  • $\begingroup$ 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? $\endgroup$
    – aechchiki
    Aug 30, 2017 at 8:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.