Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SuzuBell
    Member
    • Nov 2013
    • 22

    #1

    Convert .gff3 file to 12-column .bed file

    Hello:

    I would like to convert .gff3 file to 12-column .bed file, as in this link under "BED Format" (http://genome.ucsc.edu/FAQ/FAQformat.html#format1).

    I have thusfar used Galaxy from Penn State, but it outputs a 6-column .bed file.

    Any advice is greatly appreciated! Thank you...
  • daniel_g
    Junior Member
    • Sep 2013
    • 7

    #2
    It depends on the complexity of your task, but if all you want to do is remove or rearrange columns (e.g. changing a 6-column bed to a 4-column bed) I usually find awk to be the quickest tool.

    A short tutorial: http://www.hcs.harvard.edu/~dholland/computers/awk.html

    Comment

    • SuzuBell
      Member
      • Nov 2013
      • 22

      #3
      Daniel:

      Thank you, I did try to do that(simply rearrange columns), but am still uncertain for how to create certain columns of the .bed file. I think I can create Columns 1 2, 3, 5, 6, 7, 8: Bed(Col1) = Gff3 (Col1)
      Bed(Col2) = Gff3(Col4)
      Bed(Col3) = Gff3(Col5)
      Bed(Col5) = Gff3(Col6)
      Bed(Col6) = Gff3(Col7)
      Bed(Col7) = Bed(Col2) [at least in online examples, it seemed repeated]
      Bed(Col8) = Bed(Col3) [at least in online examples, it seemed repeated]

      But then, I am left with Columns 4, 9, 10, 11, 12. For Col 4, I don't know how to get the "name" from the Gff3 file. For Col 9, I don't know how to get the "itemRGB" from the Gff3 file. For Col 10, I am not sure what the "BlockCount" is. At first, I thought there could only be 0 or 1 exons on the line, and so this column could either be "0" or "1". But that would not make sense for Col 11 and Col 12, because these require comma-separated lists for each element in the blockCount (meaning, I assume, Col 10 has the potential to be >1).

      **************************************************************************************************

      Just in case, here is a head of my .gff3 file:

      PdomScaf0001 maker gene 15 1963 . - . Name=PdomGene00025;ID=1;Dbxref=MAKER:maker-PdomScaf0001-snap-gene-0.274

      PdomScaf0001 maker mRNA 15 1963 . - . Name=PdomMRNA00025.1;Parent=1;ID=2;_QI=216%7C0%7C0.2%7C0.6%7C0.5%7C0.6%7C5%7C0%7C98;_eAED=0.43;_AED=0.43;Dbxref=MAKER:maker-PdomScaf0001-snap-gene-0.274-mRNA-1

      PdomScaf0001 maker exon 15 100 -0.094 - . Parent=2;ID=3

      PdomScaf0001 maker CDS 15 100 . - 2 Parent=2;ID=4

      PdomScaf0001 maker exon 223 300 21.8 - . Parent=2;ID=5

      PdomScaf0001 maker CDS 223 300 . - 2 Parent=2;ID=6

      PdomScaf0001 maker exon 717 765 22.4 - . Parent=2;ID=7

      **************************************************************************************************

      And a head of my .bed file, created using gff2bed (same as you suggested):

      PdomScaf0001 14 100 3 -0.094 - maker exon . Parent=2;ID=3

      PdomScaf0001 14 100 4 . - maker CDS 2 Parent=2;ID=4

      PdomScaf0001 14 1963 1 . - maker gene . Name=PdomGene00025;ID=1;Dbxref=MAKER:maker-PdomScaf0001-snap-gene-0.274

      PdomScaf0001 14 1963 2 . - maker mRNA . Name=PdomMRNA00025.1;Parent=1;ID=2;_QI=216%7C0%7C0.2%7C0.6%7C0.5%7C0.6%7C5%7C0%7C98;_eAED=0.43;_AED=0.43;Dbxref=MAKER:maker-PdomScaf0001-snap-gene-0.274-mRNA-1

      PdomScaf0001 222 300 5 21.8 - maker exon . Parent=2;ID=5

      PdomScaf0001 222 300 6 . - maker CDS 2 Parent=2;ID=6

      PdomScaf0001 716 765 7 22.4 - maker exon . Parent=2;ID=7

      PdomScaf0001 716 765 8 . - maker CDS 0 Parent=2;ID=8

      PdomScaf0001 906 947 9 4.85 - maker exon . Parent=2;ID=9

      PdomScaf0001 906 947 10 . - maker CDS 2 Parent=2;ID=10

      Comment

      Latest Articles

      Collapse

      • SEQadmin2
        Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
        by SEQadmin2



        Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

        Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
        ...
        10-14-2026, 09:55 AM
      • SEQadmin2
        New Genomics Technologies Take Aim at Long-Standing Limits
        by SEQadmin2


        Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

        We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
        ...
        09-28-2026, 10:25 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by SEQadmin2, Today, 11:13 AM
      0 responses
      11 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, Today, 10:48 AM
      0 responses
      10 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 10-15-2026, 10:52 AM
      0 responses
      32 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 10-14-2026, 05:39 AM
      0 responses
      40 views
      0 reactions
      Last Post SEQadmin2  
      Working...