Skip to content

Instantly share code, notes, and snippets.

@juanesarango
Last active December 24, 2018 19:38
Show Gist options
  • Save juanesarango/94b1fc1c2710627e6aca26d42ea9a5d3 to your computer and use it in GitHub Desktop.
Save juanesarango/94b1fc1c2710627e6aca26d42ea9a5d3 to your computer and use it in GitHub Desktop.

Revisions

  1. juanesarango revised this gist Dec 24, 2018. No changes.
  2. juanesarango created this gist Dec 24, 2018.
    23 changes: 23 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    Having a bedfile like:

    `initial.bed`
    ```
    chr8 41510743 41513272 uc003xoi.3_exon_0_0_chr8_41510744_r 0 -
    chr8 41518947 41519082 uc003xoi.3_exon_1_0_chr8_41518948_r 0 -
    chr8 41519393 41519459 uc003xoi.3_exon_2_0_chr8_41519394_r 0 -
    chr8 41521176 41521260 uc003xoi.3_exon_3_0_chr8_41521177_r 0 -
    ```

    I want to get it like:

    `expected.bed`
    ```
    8 41510743 41513272 uc003xoi.3_exon_0_0_chr8_41510744_r 0 -
    8 41518947 41519082 uc003xoi.3_exon_1_0_chr8_41518948_r 0 -
    8 41519393 41519459 uc003xoi.3_exon_2_0_chr8_41519394_r 0 -
    8 41521176 41521260 uc003xoi.3_exon_3_0_chr8_41521177_r 0 -
    ```

    Run:
    `sed 's/^chr//g' initial.bed > expected.bed`