Question: How detect complement reverse sequence in a EMBL/Genbank file with biopython?
0
gravatar for uguy
4.1 years ago by
uguy0
France
uguy0 wrote:

Hi,

I'm trying to parse GenBank file and extract the genes sequences, but I didn't find how to detect the complement sequences. I tried regex by searching "complenent" in "feature.location" but that didn't work.

If you are some ideas you're welcome :)

genome • 1.3k views
ADD COMMENTlink modified 4.1 years ago • written 4.1 years ago by uguy0
2
gravatar for Peter
4.1 years ago by
Peter5.8k
Scotland, UK
Peter5.8k wrote:

Each feature object has a .strand (actually an alias for the feature's location's strand, .location.strand), e.g.

from Bio import SeqIO
for record in SeqIO.parse(filename, "embl"):
    printrecord.id)
    for feature in record.features:
        print(feature.strand)
        print(feature.extract(record.seq))

The last line of the example shows how to get the sequence associated with the feature.

See also the SeqFeature built in documentation, also available at http://biopython.org/DIST/docs/api/Bio.SeqFeature-module.html

As explained there and in the Biopython Tutorial http://biopython.org/DIST/docs/tutorial/Tutorial.html the .strand will be -1 for features on the complement strand.

 

ADD COMMENTlink modified 4.1 years ago • written 4.1 years ago by Peter5.8k
0
gravatar for uguy
4.1 years ago by
uguy0
France
uguy0 wrote:

Thanks a lot, that's what I need, and this tutorial is very hepfull too.

ADD COMMENTlink written 4.1 years ago by uguy0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1505 users visited in the last hour