This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Intron extraction with Biopython.

Hello,

I would like to extrac intronic sequences from Genbank files.

I need the sequences of the introns in a FASTA format. So far I have a script which extracts the CDS sequences from a Genbank file. I think the complement of the CDS sequences (introns) should be given somehow to complete the task. Could somebody take a look at it?

My script:

from Bio import SeqIO
from Bio import GenBank

for rec in SeqIO.parse("nidulans.gb", "genbank"):
    if rec.features:
        for feature in rec.features:
            if feature.type == "CDS":
                print (feature.location)
                print (feature.location.extract(rec).seq)

Please help me!

Thank you in advance!

biopython intron extract feature genbank

Based on your post, I'm not sure you're understanding is 100%.

I think the complement of the CDS sequences (introns)

This isn't what an intron is. Can you clarify what you mean?

The relevant part of a Genbank file is something like this:

   CDS             join(1..43,270..386,440..471,531..648,699..895,958..1407)
                     /locus_tag="AN5404.2"
                     /codon_start=1
                     /product="hypothetical protein"
                     /protein_id="XP_663008.1"
                     /db_xref="GeneID:2871694"

The CDS is (1..43,270..386,440..471,531..648,699..895,958..1407) → I need the sequences between the CDS: 44...269, 387...439, 472...530, so on..

I don't know if this is different in fungi. But the regions between the coding region aren't neccessarly the introns, because the start codon can between somewhere in the first exon or in a later exon, same for the stop codon.

In your genbank file there should be feature for exons, like this:

 exon            1..43
                 /note="exon_id=EAA62564-1"
 exon            958..1407
                 /note="exon_id=EAA62564-6"

The region between two exons are introns.

fin swimmer

Yes, but you asked for the "complement" of the CDS sequences. Are you sure that's what you meant to say?

0 answers

No answers yet.

Log in to answer this question.