Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • gaby
    Junior Member
    • Sep 2010
    • 5

    GFF to fasta (intergenic regions and introns)

    Hello everyone!
    I wonder if anyone knows any way of, given a gff file and the corresponding genomic segment in fasta format, extract introns and intergenic sequences in fasta format. I'm just starting to write a script for do the job, but if anyone knows an existing solution would greatly appreciate it.
    Cheers,
    Gabriel
  • aggp11
    Member
    • Jun 2011
    • 87

    #2
    Hi,

    So does the GFF file have the intergenic and intronic coordinates in it? If that's the case, you could try Bedtools's "fastaFromBed" module that needs an input Fasta and a Bed/GFF/VCF file and outputs the target Fasta file.

    Praful

    Comment

    • gaby
      Junior Member
      • Sep 2010
      • 5

      #3
      Hi Praful,
      Thank you very much for your reply. Nop, my gff file doesn't have the intergenic and intronic coordinates. I just have the "exon", "gene", "CDS" and "mRNA". So I was thing to use the exon coordinate to extract the introns and the gene coordinate to extract the intergenic regions...
      Gabriel

      Comment

      • aggp11
        Member
        • Jun 2011
        • 87

        #4
        Gabriel,

        Bedtools also has a "maskFastaFromBed" module. May be you could use this to first mask out the Exons in your Fasta file (using the GFF file) and then just write a short script to pull out the unmasked sequences. I don't know if this would work, but this is something you could try as a quick check.

        Praful

        Comment

        • gaby
          Junior Member
          • Sep 2010
          • 5

          #5
          Thanks Praful,
          Is a good idea to start!

          Comment

          • achal13r
            Junior Member
            • Oct 2012
            • 5

            #6
            GFF-Ex: A genome feature extraction package

            Visit GFF-Ex: http://bioinfo.icgeb.res.in/gff/

            GFF-Ex, a Genome Feature extraction package extracts Gene, Exon, Intron, Upstream Region of Gene (Promoters), Intergenic and CDS/cDNA sequences by just tweeting in the Genome Feature File (gff) along with the corresponding genome/chromosome sequence. GFF-Ex. is a fusion of shell and Perl, developed for platforms supporting UNIX based file system.

            Installation is easy and very user friendly tool. Works well with files in GFF-2 format and will be upgrading to GFF-3 format as well.

            Comment

            • cascoamarillo
              Senior Member
              • Oct 2010
              • 164

              #7
              Hi,
              I'm in the same situation; I want to pull out the introme dataset (eg. fasta file) where my annotation (gff3) file doesn't have Introns as features. So I start usingGFF-Ex. In principle, it seems to work fine extracting all these features into fasta files; but when you take a closer look at the sequences, something goes wrong: the number and intron size for each gene ID looks correct (in you compare with the gap between exons in your reference). But the sequence it self (after blasting in the GBrowser) doesn't match at all with that region, instead it match with some other region of the genome (not related at all). I've checked this thing with several genes in Neurospora crassa. Has anyone experience this? Is there another way to pull out the introns? Thanks.

              Comment

              • gaby
                Junior Member
                • Sep 2010
                • 5

                #8
                Originally posted by cascoamarillo View Post
                Hi,
                I'm in the same situation; I want to pull out the introme dataset (eg. fasta file) where my annotation (gff3) file doesn't have Introns as features. So I start usingGFF-Ex. In principle, it seems to work fine extracting all these features into fasta files; but when you take a closer look at the sequences, something goes wrong: the number and intron size for each gene ID looks correct (in you compare with the gap between exons in your reference). But the sequence it self (after blasting in the GBrowser) doesn't match at all with that region, instead it match with some other region of the genome (not related at all). I've checked this thing with several genes in Neurospora crassa. Has anyone experience this? Is there another way to pull out the introns? Thanks.
                I had the same problems with GFF-Ex. Not sure what is going on with this software. Finally I wrote my own script to do it. It just need some changes to be useful to any case. I can try to do it soon to make it available.

                Comment

                • cascoamarillo
                  Senior Member
                  • Oct 2010
                  • 164

                  #9
                  Originally posted by gaby View Post
                  I had the same problems with GFF-Ex. Not sure what is going on with this software. Finally I wrote my own script to do it. It just need some changes to be useful to any case. I can try to do it soon to make it available.
                  All right, good to know that it doesn't happen only to me. I've also tried with a different referent annotated genome and the same. It would to be good if you find an approach to do this, cos I'm running out of options to get the intron sequences. Let me know if I can help in any aspect. Thanks.

                  Comment

                  • Laval
                    Junior Member
                    • Feb 2013
                    • 4

                    #10
                    I also tried GFF-Ex but it is not working well with large data like Soybean Genome. I am trying to get intron sequences using gff3 (from Phytozome) which have included coordinates for mRNA, UTRs, exons and CDS. Please suggest me any tool or script to get intron sequences from GFF3

                    Comment

                    • AlexReynolds
                      Member
                      • Feb 2013
                      • 45

                      #11
                      Convert GFF3 to BED with gff2bed.

                      This BED data will contain the <feature> type (intron, CDS, etc.), so you could grep on that feature type to filter the BED data down to classes or categories of data, e.g.:

                      HTML Code:
                      $ gff2bed < foo.gff | sort-bed - | grep intron - > introns.foo.bed
                      Then convert from BED to FASTA with bed2fasta or similar scripts.

                      Comment

                      • Laval
                        Junior Member
                        • Feb 2013
                        • 4

                        #12
                        Originally posted by AlexReynolds View Post
                        Convert GFF3 to BED with gff2bed.

                        This BED data will contain the <feature> type (intron, CDS, etc.), so you could grep on that feature type to filter the BED data down to classes or categories of data, e.g.:

                        HTML Code:
                        $ gff2bed < foo.gff | sort-bed - | grep intron - > introns.foo.bed
                        Then convert from BED to FASTA with bed2fasta or similar scripts.

                        I have tried but geting error like - sort-bed: command not found
                        Traceback (most recent call last):
                        File "./gff2bed.py", line 107, in <module>
                        sys.exit(main(*sys.argv))
                        File "./gff2bed.py", line 94, in main
                        cols['attributes']])
                        IOError: [Errno 32] Broken pipe

                        Comment

                        • AlexReynolds
                          Member
                          • Feb 2013
                          • 45

                          #13
                          Install the BEDOPS tools that come packaged with the gff2bed script (follow the gff2bed link for more info). The suite comes with sort-bed, as well as gff2bed.

                          Comment

                          • achal13r
                            Junior Member
                            • Oct 2012
                            • 5

                            #14
                            GFF-Ex: @Laval, @cascoamarillo, @gaby

                            I think you people are mistaken. Though the accuracy of the tool has been tested earlier, still because of the query, I re-verified the results of GFF-Ex. The results are satisfactory.
                            I ran the GFF-Ex with the example files given in the installation directory. After getting the sequence information of the introns, I took a random sequence from the output intron file and aligned it to the corresponding genome file, using BLAST. The results were same as it is specified in the used gff file. What I can visualize or infer from here is, you people might be aligning the different genome reference against the intron sequences, fetched from annotation file (gff) of other version or source.
                            Anyway, there are few things which have to be taken care of when running GFF-Ex.
                            1. The gff file should be in gff2 format. (GFF-Ex version for gff3 format file is in progress, which is to be released soon, Keep visiting GFF-Ex)
                            2. The genome file should be in fasta format.
                            3. Both the input files (gff & genome fasta files) should be of same version and from same source. You cannot use the gff and genome information from either different version or source.
                            GFF-Ex is a user-friendly tool that comes with a jargon of accuracy, speed and sensitivity. GFF-Ex is suitable for extracting sequence information of multiple features either specified (gene, exon, CDS) or un-specified (introns, intergenic and region upstream to genes) within gff file. I would like you all to explore it more and take care of the input files.
                            Personal annotation queries, related to GFF-Ex can also be posted at [email protected]

                            Comment

                            • panos_ed
                              Member
                              • May 2010
                              • 11

                              #15
                              Originally posted by AlexReynolds View Post
                              Install the BEDOPS tools that come packaged with the gff2bed script (follow the gff2bed link for more info). The suite comes with sort-bed, as well as gff2bed.
                              Hello Alex!

                              I've downloaded the precompiled binaries for Linux (64bit) and I still get this "index out range" error. In my case, however, the problem appears to be in the "source" field (the second one), not in the "attributes"...

                              Code:
                              Traceback (most recent call last):
                                File "/home/panos/Programs/temp/bedops-read-only/bin/gff2bed", line 212, in <module>
                                  sys.exit(main(*sys.argv))
                                File "/home/panos/Programs/temp/bedops-read-only/bin/gff2bed", line 162, in main
                                  cols['source'] = elems[1]
                              IndexError: list index out of range
                              You can get one of the gff files I'm using from here.

                              Any ideas?

                              Comment

                              Latest Articles

                              Collapse

                              • SEQadmin2
                                Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                                by SEQadmin2


                                I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.


                                Here are nine questions we think about, in roughly the order they matter, before...
                                06-18-2026, 07:11 AM
                              • SEQadmin2
                                From Collection to Sequencing: Why Sample Preparation and Preservation Define Sequencing Data
                                by SEQadmin2


                                Data variability is still an issue in sequencing technologies despite the advances in reproducibility and accuracy of these platforms. But the problem does not originate in the sequencing itself, but in the previous steps, before the sample reaches the sequencer.


                                The first step is collection, followed by preservation and sample preparation for analysis. Most scientists overlook those steps, but not being careful might just be skewing the experiment’s results.
                                ...
                                06-02-2026, 10:05 AM

                              ad_right_rmr

                              Collapse

                              News

                              Collapse

                              Topics Statistics Last Post
                              Started by SEQadmin2, 06-17-2026, 06:09 AM
                              0 responses
                              32 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-09-2026, 11:58 AM
                              0 responses
                              97 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-05-2026, 10:09 AM
                              0 responses
                              117 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-04-2026, 08:59 AM
                              0 responses
                              109 views
                              0 reactions
                              Last Post SEQadmin2  
                              Working...