Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • 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

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


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


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


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

          Comment


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


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


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


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


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


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


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


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


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


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

                              • 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
                              • seqadmin
                                Techniques and Challenges in Conservation Genomics
                                by seqadmin



                                The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

                                Avian Conservation
                                Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
                                03-08-2024, 10:41 AM

                              ad_right_rmr

                              Collapse

                              News

                              Collapse

                              Topics Statistics Last Post
                              Started by seqadmin, Yesterday, 06:37 PM
                              0 responses
                              8 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, Yesterday, 06:07 PM
                              0 responses
                              8 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 03-22-2024, 10:03 AM
                              0 responses
                              49 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 03-21-2024, 07:32 AM
                              0 responses
                              66 views
                              0 likes
                              Last Post seqadmin  
                              Working...
                              X