Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(8)  |  Derive(0)  |  Import(0)
High level interface to write GFF3 files from SeqRecords and SeqFeatures.

If include_fasta is True, the GFF3 file will include sequence information
using the ##FASTA directive.

        def write(recs, out_handle, include_fasta=False):
    """High level interface to write GFF3 files from SeqRecords and SeqFeatures.

    If include_fasta is True, the GFF3 file will include sequence information
    using the ##FASTA directive.
    """
    writer = GFF3Writer()
    return writer.write(recs, out_handle, include_fasta)
        


src/e/d/edge-HEAD/example/gb2gff.py   edge(Download)
def main(gb_file):
    out_file = "%s.gff" % os.path.splitext(gb_file)[0]
    with open(out_file, "w") as out_handle:
        GFF.write(SeqIO.parse(gb_file, "genbank"), out_handle, include_fasta=True)
 

src/e/d/edge-HEAD/src/edge/io.py   edge(Download)
 
        with open(filename, "w") as out_handle:
            GFF.write(records, out_handle, include_fasta=True)
 

src/b/c/bcbb-HEAD/gff/Scripts/gff/genbank_to_gff.py   bcbb(Download)
def main(gb_file):
    out_file = "%s.gff" % os.path.splitext(gb_file)[0]
    with open(out_file, "w") as out_handle:
        GFF.write(SeqIO.parse(gb_file, "genbank"), out_handle)
 

src/b/c/bcbb-HEAD/gff/Tests/test_GFFSeqIOFeatureAdder.py   bcbb(Download)
        recs = SeqIO.to_dict(GFF.parse(self._test_gff_file))
        out_handle = StringIO.StringIO()
        GFF.write(recs.values(), out_handle)
        wrote_handle = StringIO.StringIO(out_handle.getvalue())
        recs_two = SeqIO.to_dict(GFF.parse(wrote_handle))
        recs = SeqIO.to_dict(GFF.parse(self._wormbase_file))
        out_handle = StringIO.StringIO()
        GFF.write(recs.values(), out_handle)
        wrote_handle = StringIO.StringIO(out_handle.getvalue())
        # check some tricky lines in the GFF2 file
        rec.features = [top_feature]
        out_handle = StringIO.StringIO()
        GFF.write([rec], out_handle)
        wrote_info = out_handle.getvalue().split("\n")
        assert wrote_info[0] == "##gff-version 3"
                                   qualifiers=qualifiers)]
        out_handle = StringIO.StringIO()
        GFF.write([rec], out_handle, include_fasta=True)
        wrote_info = out_handle.getvalue().split("\n")
        fasta_parts = wrote_info[3:]
                                   qualifiers=qualifiers)]
        out_handle = StringIO.StringIO()
        GFF.write([rec], out_handle, include_fasta=True)
        wrote_info = out_handle.getvalue().split("\n")
        gff_line = wrote_info[2]