openvax / pyensembl

Python interface to access reference genome features (such as genes, transcripts, and exons) from Ensembl
Apache License 2.0
365 stars 68 forks source link

Genbank file with feature output for gene? #258

Open harijay opened 2 years ago

harijay commented 2 years ago

I am quite new to pyensembl and really like the ease of use for getting introns, exons and transcripts for a gene. Is it possible right now to get a Genbank file for a pyensembl Gene object?

class GbFileFromGeneName(object):

    def __init__(self,gene_name):
        """Creates a PyEnsembl gene object given a gene name"""
        data = pyensembl.EnsemblRelease(104)
        self.gene = data.genes_by_name(gene_name)[0]

    def get_file(self):
    # Dont see any support for output in Gene object
        pass

I am currently planning to manually compute ann the CCDS and other Features for a genbank file for a gene--I am vary of re-inventing the wheel. Apologies if I missed it in the documentation.