[gt-users] warnings
Brent Pedersen
bpederse at gmail.com
Tue Jan 5 18:21:54 CET 2010
hi, how can i turn off warnings from within python.
when i do:
import gt
f = gt.FeatureIndexMemory()
f.add_gff3file("some.gff")
it gives the warnings about:
warning: seqid "2" on line 2 in file "some.gff" has not been
previously introduced with a "##sequence-region" line, create such a
line automatically
i also made the change pasted below to stop problems (segfaults) i was
having when running under modwsgi/apache:
diff --git a/gtpython/gt/annotationsketch/feature_index.py
b/gtpython/gt/annotationsketch/feature_index.py
index 9c7d8a8..998a12a 100644
--- a/gtpython/gt/annotationsketch/feature_index.py
+++ b/gtpython/gt/annotationsketch/feature_index.py
@@ -33,7 +33,8 @@ class FeatureIndex:
def __del__(self):
try:
- gtlib.gt_feature_index_delete(self.fi)
+ self.fi
+ gtlib.gt_feature_index_delete(self)
except AttributeError:
pass
@@ -103,6 +104,9 @@ class FeatureIndex:
gtlib.gt_feature_index_get_features_for_seqid.restype = c_void_p
gtlib.gt_feature_index_add_gff3file.argtypes = [c_void_p,
c_char_p, Error]
+ gtlib.gt_feature_index_delete.argtypes = [FeatureIndex]
+ gtlib.gt_feature_index_delete.restype = c_void_p
+
gtlib.gt_feature_index_get_first_seqid.restype = c_char_p
gtlib.gt_feature_index_get_seqids.restype = c_void_p
gtlib.gt_feature_index_has_seqid.argtypes = [c_void_p, c_char_p]
More information about the gt-users
mailing list