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
        Recent Advances in Sequencing Analysis Tools
        by seqadmin


        The sequencing world is rapidly changing due to declining costs, enhanced accuracies, and the advent of newer, cutting-edge instruments. Equally important to these developments are improvements in sequencing analysis, a process that converts vast amounts of raw data into a comprehensible and meaningful form. This complex task requires expertise and the right analysis tools. In this article, we highlight the progress and innovation in sequencing analysis by reviewing several of the...
        Today, 07:48 AM
      • seqadmin
        Essential Discoveries and Tools in Epitranscriptomics
        by seqadmin




        The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...
        04-22-2024, 07:01 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, Today, 07:17 AM
      0 responses
      8 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 05-02-2024, 08:06 AM
      0 responses
      19 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-30-2024, 12:17 PM
      0 responses
      20 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-29-2024, 10:49 AM
      0 responses
      28 views
      0 likes
      Last Post seqadmin  
      Working...
      X