Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • buthercup_ch
    Member
    • Apr 2014
    • 41

    #1

    .gb to .ffa by using R Bioconductor

    Hi everyone,

    Experimentalist trying to get introduced to some basic bioinformatics, I've recently started to use R Bioconductor, but getting quite lost yet.
    I'm would like to use this new skills to convert a Genebank file (.gbk) downloaded from ncbi, to a multifasta file containing all genes, nucleotides (.ffn), so it would be great if any now can give me the exact script I have to use:

    1) Import the .gb file
    2) transform .bg to .ffn
    3) Export .ffn to tab file (so I can open it using textedit)

    I know is kind of very basics, but thank you in advance.

    Cristina
  • dpryan
    Devon Ryan
    • Jul 2011
    • 3478

    #2
    This is easier in biopython:

    Code:
    #!/usr/bin/env python
    from Bio import SeqIO
    outfile = open("output.fa", "w") #Change the output name
    for record in SeqIO.read("somefile.gb", "genbank") : #Change the input name
        SeqIO.write(record, outfile, "fasta")
    outfile.close()
    Something like that should work.

    Comment

    • buthercup_ch
      Member
      • Apr 2014
      • 41

      #3
      Hi Ryan, thanks for you answer… but I don't know how to work in Python.
      Should I tape in the Linux terminal?


      Anyway I think I found this script anywhere else, but this is for transforming to "fasta" and I need "ffn".

      Comment

      • dpryan
        Devon Ryan
        • Jul 2011
        • 3478

        #4
        Yes, though you'll need to install the biopython package on your computer as well as just python, which should already be there. If you're typing things in manually, then you can skip the first line (#!/usr/bin/env python). You'll find a basic fluency on python to be rather important in bioinformatics (knowing python and R is sufficient for most things).

        Comment

        • dpryan
          Devon Ryan
          • Jul 2011
          • 3478

          #5
          BTW, ffn is fasta.

          Comment

          • buthercup_ch
            Member
            • Apr 2014
            • 41

            #6
            I know "ffn" is fasta… :-) but multifasta.
            As fas as I understood the fasta format output in python is a unique sequence, the whole genome, from the genbank file, but ffn contains multiple sequences from all genes in the genome.
            Am I right?

            Comment

            • dpryan
              Devon Ryan
              • Jul 2011
              • 3478

              #7
              Python will happily write a multifasta file

              Comment

              • buthercup_ch
                Member
                • Apr 2014
                • 41

                #8
                Really? Oh, that's good then.
                I will look to use python.
                Thanks a lot Ryan!

                Comment

                • maubp
                  Peter (Biopython etc)
                  • Jul 2009
                  • 1544

                  #9
                  See also http://www.warwick.ac.uk/go/peter_co...genbank2fasta/ which discusses converting GenBank to FASTA with Biopython in more detail - including how to pull out the gene sequences.

                  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
                    ...
                    Today, 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, 05:39 AM
                  0 responses
                  9 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, Yesterday, 09:56 AM
                  0 responses
                  11 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 10-09-2026, 11:14 AM
                  0 responses
                  25 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 09-29-2026, 09:51 AM
                  0 responses
                  76 views
                  0 reactions
                  Last Post SEQadmin2  
                  Working...