Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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...

  • #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


    • #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

      • seqadmin
        Current Approaches to Protein Sequencing
        by seqadmin


        Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
        04-04-2024, 04:25 PM
      • seqadmin
        Strategies for Sequencing Challenging Samples
        by seqadmin


        Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
        03-22-2024, 06:39 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, 04-11-2024, 12:08 PM
      0 responses
      22 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-10-2024, 10:19 PM
      0 responses
      24 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-10-2024, 09:21 AM
      0 responses
      19 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-04-2024, 09:00 AM
      0 responses
      50 views
      0 likes
      Last Post seqadmin  
      Working...
      X