gravatar for radha.jg

2 hours ago by


I have the following code:

import sys
from BCBio import GFF
file = sys.argv[1]
for record in GFF.parse(file):
      print([record.seqid,record.source, record.start, record.end, record.strand])

My question is how can extract the ids, the chromosome, the coordinates and the strand from a GFF3 files using python/biopython (I'm bounded to python because this is part of a bigger program writen in said language).
I thought since record.seqid, record.source, record.start, record.end, record.strand is used to write new GFF, this could work, but clearly it doesn't.

I need this solved ASAP but also I need to learn, so please, anyone out there, please help.

Thanks in advance


Source link