Skip to content

Instantly share code, notes, and snippets.

View brentp's full-sized avatar

Brent Pedersen brentp

View GitHub Profile
diff --git a/src/extended/gff3_visitor.c b/src/extended/gff3_visitor.c
index 8246680..9e87612 100644
--- a/src/extended/gff3_visitor.c
+++ b/src/extended/gff3_visitor.c
@@ -197,32 +197,52 @@ static int store_ids(GtGenomeNode *gn, void *data, GtError *err)
AddIDInfo add_id_info;
int had_err = 0;
GtStr *id;
+ /* Q: is this const ok? */
+ const char *idstring;
diff --git a/src/extended/gff3_out_stream.c b/src/extended/gff3_out_stream.c
index 6dbbc23..f813e8f 100644
--- a/src/extended/gff3_out_stream.c
+++ b/src/extended/gff3_out_stream.c
@@ -18,6 +18,7 @@
#include "extended/gff3_out_stream.h"
#include "extended/gff3_visitor.h"
#include "extended/node_stream_rep.h"
+#include "core/cstr_table.h"
diff --git a/src/extended/gff3_out_stream.c b/src/extended/gff3_out_stream.c
index 6dbbc23..f813e8f 100644
--- a/src/extended/gff3_out_stream.c
+++ b/src/extended/gff3_out_stream.c
@@ -18,6 +18,7 @@
#include "extended/gff3_out_stream.h"
#include "extended/gff3_visitor.h"
#include "extended/node_stream_rep.h"
+#include "core/cstr_table.h"
"""
# optional gff file as first arg.
>>> fi = FeatureIndexMemory('tests/data/grape.gff3')
>>> for i, (fid, feature) in enumerate(fi.iteritems()):
... if i > 3: break
... feature
FeatureNode('GSVIV00028344001', 3699817..3700731, strand='+', seqid='10')
FeatureNode('GSVIV00029007001', 9837193..9850255, strand='-', seqid='1')
FeatureNode('GSVIV00029792001', 6527551..6530322, strand='+', seqid='10')
FeatureNode('GSVIV00030315001', 2976811..2980733, strand='-', seqid='1')
diff --git a/src/extended/gff3_out_stream.c b/src/extended/gff3_out_stream.c
index 6dbbc23..f813e8f 100644
--- a/src/extended/gff3_out_stream.c
+++ b/src/extended/gff3_out_stream.c
@@ -18,6 +18,7 @@
#include "extended/gff3_out_stream.h"
#include "extended/gff3_visitor.h"
#include "extended/node_stream_rep.h"
+#include "core/cstr_table.h"
"""
>>> from ihash import dumps, loads
>>> loads(dumps(0, 32))
(0, 32)
>>> loads(dumps(1025, 2048))
(1024, 2048)
>>> loads(dumps(1024, 2048))
def dumps(int imin, int imax, int rng=67108864):
cdef char ilist[32]
cdef int i = 0
rng >>= 1
cdef int mid = rng
while rng > 1:
rng >>=1
if imin <= mid and imax <= mid:
mid -= rng
ilist[i] = '0'
diff --git a/lib/tc/test/__init__.py b/lib/tc/test/__init__.py
index 60722cd..d7e3f7a 100644
--- a/lib/tc/test/__init__.py
+++ b/lib/tc/test/__init__.py
@@ -3,9 +3,10 @@ import unittest, sys, os
def suite():
suites = []
- import hdb, bdb
+ import hdb, bdb, tdb
var ctx = $('#canvas')[0].getContext("2d");
var off = jQuery('#canvas').offset();
jQuery._canvas = {'x': off.left, 'y': off.top};
ctx.fillStyle = "rgba(255, 0, 0, 1)";
ctx.beginPath();
ctx.arc(75, 75, 10, 0, Math.PI*2, true);
ctx.closePath();
ctx.stroke();
# interval_new.pyx
cpdef class Interval:
cdef public int start
cdef public int end
def __init__(self, start, end):
self.start = start
self.end = end
cdef extern from "pnew.h":