Menu

#5 BED off by one projection error.

1.0
open
nobody
None
2018-03-23
2018-03-22
Dan Bolser
No

BED format is zero based while the chain file is 1-based. This leads to off by one errors when projecting BED.

Discussion

  • Liguo Wang

    Liguo Wang - 2018-03-22

    This error couldn't happen if your bed and chain files follow the specifications. Could you please provide an example?

     
  • Dan Bolser

    Dan Bolser - 2018-03-23

    Hi Liguo,

    Thanks for getting back to me .

    The chain file I'm using is here:
    ftp://ftp.ensemblgenomes.org/pub/current/plants/assembly_chain/sorghum_bicolor/Sorghum_bicolor_v2_to_Sorghum_bicolor_NCBIv3.chain.gz

    Our internal (1-based) database has the following mapping:
    V2: 64231291 to 64603896 ->
    V3: 71417888 to 71790493

    When I use our assembly converter tool (backed by crossmap) to 'see' this mapping using BED format, inputting this works:
    1 64231291 64603896

    but if I 'properly' 0-base the bed file:
    1 64231290 64603895

    I get 'no results found'.

     

    Last edit: Dan Bolser 2018-03-23
  • Dan Bolser

    Dan Bolser - 2018-03-23

    To be honest, I don't know how to read the chain file format. It's possible it's incorrectly representing our 1-based database data.

     

    Last edit: Dan Bolser 2018-03-23
    • Liguo Wang

      Liguo Wang - 2018-03-26

      Hi,
      I can get your region properly mapped using your chain file. Did you use the latest version (0.2.7)?

      $ cat test.bed
      1 64231290 64603895

      $CrossMap.py BED ~/Downloads/Sorghum_bicolor_v2_to_Sorghum_bicolor_NCBIv3.chain test.bed
      1 64231290 64603895 -> 1 71417887 71790492

      the attached chain_to_table.py can print a chain file into a table which is more human readable.

       

Log in to post a comment.

MongoDB Logo MongoDB