Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

836 lignes
24 KiB

  1. from cpython cimport PyBytes_FromStringAndSize
  2. from libc.stdio cimport printf, feof, fgets
  3. from libc.string cimport strcpy, strlen, memcmp, memcpy, memchr, strstr, strchr
  4. from libc.stdlib cimport free, malloc, calloc, realloc
  5. from libc.stdlib cimport atoi, atol, atof
  6. from pysam.libcutils cimport force_bytes, force_str, charptr_to_str
  7. from pysam.libcutils cimport encode_filename, from_string_and_size
  8. import collections
  9. import copy
  10. cdef char *StrOrEmpty(char * buffer):
  11. if buffer == NULL:
  12. return ""
  13. else: return buffer
  14. cdef int isNew(char * p, char * buffer, size_t nbytes):
  15. """return True if `p` is located within `buffer` of size
  16. `nbytes`
  17. """
  18. if p == NULL:
  19. return 0
  20. return not (buffer <= p <= buffer + nbytes)
  21. cdef class TupleProxy:
  22. '''Proxy class for access to parsed row as a tuple.
  23. This class represents a table row for fast read-access.
  24. Access to individual fields is via the [] operator.
  25. Only read-only access is implemented.
  26. '''
  27. def __cinit__(self, encoding="ascii"):
  28. self.data = NULL
  29. self.fields = NULL
  30. self.nbytes = 0
  31. self.is_modified = 0
  32. self.nfields = 0
  33. # start counting at field offset
  34. self.offset = 0
  35. self.encoding = encoding
  36. def __dealloc__(self):
  37. cdef int x
  38. if self.is_modified:
  39. for x from 0 <= x < self.nfields:
  40. if isNew(self.fields[x], self.data, self.nbytes):
  41. free(self.fields[x])
  42. self.fields[x] = NULL
  43. if self.data != NULL:
  44. free(self.data)
  45. if self.fields != NULL:
  46. free(self.fields)
  47. def __copy__(self):
  48. if self.is_modified:
  49. raise NotImplementedError(
  50. "copying modified tuples is not implemented")
  51. cdef TupleProxy n = type(self)()
  52. n.copy(self.data, self.nbytes, reset=True)
  53. return n
  54. def compare(self, TupleProxy other):
  55. '''return -1,0,1, if contents in this are binary
  56. <,=,> to *other*
  57. '''
  58. if self.is_modified or other.is_modified:
  59. raise NotImplementedError(
  60. 'comparison of modified TupleProxies is not implemented')
  61. if self.data == other.data:
  62. return 0
  63. if self.nbytes < other.nbytes:
  64. return -1
  65. elif self.nbytes > other.nbytes:
  66. return 1
  67. return memcmp(self.data, other.data, self.nbytes)
  68. def __richcmp__(self, TupleProxy other, int op):
  69. if op == 2: # == operator
  70. return self.compare(other) == 0
  71. elif op == 3: # != operator
  72. return self.compare(other) != 0
  73. else:
  74. err_msg = "op {0} isn't implemented yet".format(op)
  75. raise NotImplementedError(err_msg)
  76. cdef take(self, char * buffer, size_t nbytes):
  77. '''start presenting buffer.
  78. Take ownership of the pointer.
  79. '''
  80. self.data = buffer
  81. self.nbytes = nbytes
  82. self.update(buffer, nbytes)
  83. cdef present(self, char * buffer, size_t nbytes):
  84. '''start presenting buffer.
  85. Do not take ownership of the pointer.
  86. '''
  87. self.update(buffer, nbytes)
  88. cdef copy(self, char * buffer, size_t nbytes, bint reset=False):
  89. '''start presenting buffer of size *nbytes*.
  90. Buffer is a '\0'-terminated string without the '\n'.
  91. Take a copy of buffer.
  92. '''
  93. # +1 for '\0'
  94. cdef int s = sizeof(char) * (nbytes + 1)
  95. self.data = <char*>malloc(s)
  96. if self.data == NULL:
  97. raise ValueError("out of memory in TupleProxy.copy()")
  98. memcpy(<char*>self.data, buffer, s)
  99. if reset:
  100. for x from 0 <= x < nbytes:
  101. if self.data[x] == b'\0':
  102. self.data[x] = b'\t'
  103. self.update(self.data, nbytes)
  104. cpdef int getMinFields(self):
  105. '''return minimum number of fields.'''
  106. # 1 is not a valid tabix entry, but TupleProxy
  107. # could be more generic.
  108. return 1
  109. cpdef int getMaxFields(self):
  110. '''return maximum number of fields. Return
  111. 0 for unknown length.'''
  112. return 0
  113. cdef update(self, char * buffer, size_t nbytes):
  114. '''update internal data.
  115. *buffer* is a \0 terminated string.
  116. *nbytes* is the number of bytes in buffer (excluding
  117. the \0)
  118. Update starts work in buffer, thus can be used
  119. to collect any number of fields until nbytes
  120. is exhausted.
  121. If max_fields is set, the number of fields is initialized to
  122. max_fields.
  123. '''
  124. cdef char * pos
  125. cdef char * old_pos
  126. cdef int field
  127. cdef int max_fields, min_fields, x
  128. assert strlen(buffer) == nbytes, \
  129. "length of buffer (%i) != number of bytes (%i)" % (
  130. strlen(buffer), nbytes)
  131. if buffer[nbytes] != 0:
  132. raise ValueError("incomplete line at %s" % buffer)
  133. #################################
  134. # remove line breaks and feeds and update number of bytes
  135. x = nbytes - 1
  136. while x > 0 and (buffer[x] == b'\n' or buffer[x] == b'\r'):
  137. buffer[x] = b'\0'
  138. x -= 1
  139. self.nbytes = x + 1
  140. #################################
  141. # clear data
  142. if self.fields != NULL:
  143. free(self.fields)
  144. for field from 0 <= field < self.nfields:
  145. if isNew(self.fields[field], self.data, self.nbytes):
  146. free(self.fields[field])
  147. self.is_modified = self.nfields = 0
  148. #################################
  149. # allocate new
  150. max_fields = self.getMaxFields()
  151. # pre-count fields - better would be
  152. # to guess or dynamically grow
  153. if max_fields == 0:
  154. for x from 0 <= x < nbytes:
  155. if buffer[x] == b'\t':
  156. max_fields += 1
  157. max_fields += 1
  158. self.fields = <char **>calloc(max_fields, sizeof(char *))
  159. if self.fields == NULL:
  160. raise ValueError("out of memory in TupleProxy.update()")
  161. #################################
  162. # start filling
  163. field = 0
  164. self.fields[field] = pos = buffer
  165. field += 1
  166. old_pos = pos
  167. while 1:
  168. pos = <char*>memchr(pos, b'\t', nbytes)
  169. if pos == NULL:
  170. break
  171. if field >= max_fields:
  172. raise ValueError(
  173. "parsing error: more than %i fields in line: %s" %
  174. (max_fields, buffer))
  175. pos[0] = b'\0'
  176. pos += 1
  177. self.fields[field] = pos
  178. field += 1
  179. nbytes -= pos - old_pos
  180. if nbytes < 0:
  181. break
  182. old_pos = pos
  183. self.nfields = field
  184. if self.nfields < self.getMinFields():
  185. raise ValueError(
  186. "parsing error: fewer than %i fields in line: %s" %
  187. (self.getMinFields(), buffer))
  188. def _getindex(self, int index):
  189. '''return item at idx index'''
  190. cdef int i = index
  191. if i < 0:
  192. i += self.nfields
  193. if i < 0:
  194. raise IndexError("list index out of range")
  195. # apply offset - separating a fixed number
  196. # of fields from a variable number such as in VCF
  197. i += self.offset
  198. if i >= self.nfields:
  199. raise IndexError(
  200. "list index out of range %i >= %i" %
  201. (i, self.nfields))
  202. return force_str(self.fields[i], self.encoding)
  203. def __getitem__(self, key):
  204. if type(key) == int:
  205. return self._getindex(key)
  206. # slice object
  207. start, end, step = key.indices(self.nfields)
  208. result = []
  209. for index in range(start, end, step):
  210. result.append(self._getindex(index))
  211. return result
  212. def _setindex(self, index, value):
  213. '''set item at idx index.'''
  214. cdef int idx = index
  215. if idx < 0:
  216. raise IndexError("list index out of range")
  217. if idx >= self.nfields:
  218. raise IndexError("list index out of range")
  219. if isNew(self.fields[idx], self.data, self.nbytes):
  220. free(self.fields[idx])
  221. self.is_modified = 1
  222. if value is None:
  223. self.fields[idx] = NULL
  224. return
  225. # conversion with error checking
  226. value = force_bytes(value)
  227. cdef char * tmp = <char*>value
  228. self.fields[idx] = <char*>malloc((strlen( tmp ) + 1) * sizeof(char))
  229. if self.fields[idx] == NULL:
  230. raise ValueError("out of memory" )
  231. strcpy(self.fields[idx], tmp)
  232. def __setitem__(self, index, value):
  233. '''set item at *index* to *value*'''
  234. cdef int i = index
  235. if i < 0:
  236. i += self.nfields
  237. i += self.offset
  238. self._setindex(i, value)
  239. def __len__(self):
  240. return self.nfields
  241. def __iter__(self):
  242. return TupleProxyIterator(self)
  243. def __str__(self):
  244. '''return original data'''
  245. # copy and replace \0 bytes with \t characters
  246. cdef char * cpy
  247. if self.is_modified:
  248. # todo: treat NULL values
  249. result = []
  250. for x in xrange(0, self.nfields):
  251. result.append(StrOrEmpty(self.fields[x]).decode(self.encoding))
  252. return "\t".join(result)
  253. else:
  254. cpy = <char*>calloc(sizeof(char), self.nbytes+1)
  255. if cpy == NULL:
  256. raise ValueError("out of memory")
  257. memcpy(cpy, self.data, self.nbytes+1)
  258. for x from 0 <= x < self.nbytes:
  259. if cpy[x] == b'\0':
  260. cpy[x] = b'\t'
  261. result = cpy[:self.nbytes]
  262. free(cpy)
  263. r = result.decode(self.encoding)
  264. return r
  265. cdef class TupleProxyIterator:
  266. def __init__(self, proxy):
  267. self.proxy = proxy
  268. self.index = 0
  269. def __iter__(self):
  270. return self
  271. def __next__(self):
  272. if self.index >= self.proxy.nfields:
  273. raise StopIteration
  274. cdef char *retval = self.proxy.fields[self.index]
  275. self.index += 1
  276. return force_str(retval, self.proxy.encoding) if retval != NULL else None
  277. def toDot(v):
  278. '''convert value to '.' if None'''
  279. if v is None:
  280. return "."
  281. else:
  282. return str(v)
  283. def quote(v):
  284. '''return a quoted attribute.'''
  285. if isinstance(v, str):
  286. return '"%s"' % v
  287. else:
  288. return str(v)
  289. cdef class NamedTupleProxy(TupleProxy):
  290. map_key2field = {}
  291. def __setattr__(self, key, value):
  292. '''set attribute.'''
  293. cdef int idx
  294. idx, f = self.map_key2field[key]
  295. if idx >= self.nfields:
  296. raise KeyError("field %s not set" % key)
  297. TupleProxy.__setitem__(self, idx, str(value))
  298. def __getattr__(self, key):
  299. cdef int idx
  300. idx, f = self.map_key2field[key]
  301. if idx >= self.nfields:
  302. raise KeyError("field %s not set" % key)
  303. if f == str:
  304. return force_str(self.fields[idx],
  305. self.encoding)
  306. return f(self.fields[idx])
  307. cdef dot_or_float(v):
  308. if v == "" or v == b".":
  309. return None
  310. else:
  311. try:
  312. return int(v)
  313. except ValueError:
  314. return float(v)
  315. cdef dot_or_int(v):
  316. if v == "" or v == b".":
  317. return None
  318. else:
  319. return int(v)
  320. cdef dot_or_str(v):
  321. if v == "" or v == b".":
  322. return None
  323. else:
  324. return force_str(v)
  325. cdef int from1based(v):
  326. return atoi(v) - 1
  327. cdef str to1based(int v):
  328. return str(v + 1)
  329. cdef class GTFProxy(NamedTupleProxy):
  330. '''Proxy class for access to GTF fields.
  331. This class represents a GTF entry for fast read-access.
  332. Write-access has been added as well, though some care must
  333. be taken. If any of the string fields (contig, source, ...)
  334. are set, the new value is tied to the lifetime of the
  335. argument that was supplied.
  336. The only exception is the attributes field when set from
  337. a dictionary - this field will manage its own memory.
  338. '''
  339. separator = "; "
  340. # first value is field index, the tuple contains conversion
  341. # functions for getting (converting internal string representation
  342. # to pythonic value) and setting (converting pythonic value to
  343. # interval string representation)
  344. map_key2field = {
  345. 'contig' : (0, (str, str)),
  346. 'source' : (1, (dot_or_str, str)),
  347. 'feature': (2, (dot_or_str, str)),
  348. 'start' : (3, (from1based, to1based)),
  349. 'end' : (4, (int, int)),
  350. 'score' : (5, (dot_or_float, toDot)),
  351. 'strand' : (6, (dot_or_str, str)),
  352. 'frame' : (7, (dot_or_int, toDot)),
  353. 'attributes': (8, (str, str))}
  354. def __cinit__(self):
  355. # automatically calls TupleProxy.__cinit__
  356. self.attribute_dict = None
  357. cpdef int getMinFields(self):
  358. '''return minimum number of fields.'''
  359. return 9
  360. cpdef int getMaxFields(self):
  361. '''return max number of fields.'''
  362. return 9
  363. def to_dict(self):
  364. """parse attributes - return as dict
  365. The dictionary can be modified to update attributes.
  366. """
  367. if not self.attribute_dict:
  368. self.attribute_dict = self.attribute_string2dict(
  369. self.attributes)
  370. self.is_modified = True
  371. return self.attribute_dict
  372. def as_dict(self):
  373. """deprecated: use :meth:`to_dict`
  374. """
  375. return self.to_dict()
  376. def from_dict(self, d):
  377. '''set attributes from a dictionary.'''
  378. self.attribute_dict = None
  379. attribute_string = force_bytes(
  380. self.attribute_dict2string(d),
  381. self.encoding)
  382. self._setindex(8, attribute_string)
  383. def __str__(self):
  384. cdef char * cpy
  385. cdef int x
  386. if self.is_modified:
  387. return "\t".join(
  388. (self.contig,
  389. toDot(self.source),
  390. toDot(self.feature),
  391. str(self.start + 1),
  392. str(self.end),
  393. toDot(self.score),
  394. toDot(self.strand),
  395. toDot(self.frame),
  396. self.attributes))
  397. else:
  398. return super().__str__()
  399. def invert(self, int lcontig):
  400. '''invert coordinates to negative strand coordinates
  401. This method will only act if the feature is on the
  402. negative strand.'''
  403. if self.strand[0] == '-':
  404. start = min(self.start, self.end)
  405. end = max(self.start, self.end)
  406. self.start, self.end = lcontig - end, lcontig - start
  407. def keys(self):
  408. '''return a list of attributes defined in this entry.'''
  409. if not self.attribute_dict:
  410. self.attribute_dict = self.attribute_string2dict(
  411. self.attributes)
  412. return self.attribute_dict.keys()
  413. def __getitem__(self, key):
  414. return self.__getattr__(key)
  415. def setAttribute(self, name, value):
  416. '''convenience method to set an attribute.
  417. '''
  418. if not self.attribute_dict:
  419. self.attribute_dict = self.attribute_string2dict(
  420. self.attributes)
  421. self.attribute_dict[name] = value
  422. self.is_modified = True
  423. def attribute_string2dict(self, s):
  424. return collections.OrderedDict(
  425. self.attribute_string2iterator(s))
  426. def __cmp__(self, other):
  427. return (self.contig, self.strand, self.start) < \
  428. (other.contig, other.strand, other.start)
  429. # python 3 compatibility
  430. def __richcmp__(GTFProxy self, GTFProxy other, int op):
  431. if op == 0:
  432. return (self.contig, self.strand, self.start) < \
  433. (other.contig, other.strand, other.start)
  434. elif op == 1:
  435. return (self.contig, self.strand, self.start) <= \
  436. (other.contig, other.strand, other.start)
  437. elif op == 2:
  438. return self.compare(other) == 0
  439. elif op == 3:
  440. return self.compare(other) != 0
  441. else:
  442. err_msg = "op {0} isn't implemented yet".format(op)
  443. raise NotImplementedError(err_msg)
  444. def dict2attribute_string(self, d):
  445. """convert dictionary to attribute string in GTF format.
  446. """
  447. aa = []
  448. for k, v in d.items():
  449. if isinstance(v, str):
  450. aa.append('{} "{}"'.format(k, v))
  451. else:
  452. aa.append("{} {}".format(k, str(v)))
  453. return self.separator.join(aa) + ";"
  454. def attribute_string2iterator(self, s):
  455. """convert attribute string in GTF format to records
  456. and iterate over key, value pairs.
  457. """
  458. # remove comments
  459. attributes = force_str(s, encoding=self.encoding)
  460. # separate into fields
  461. # Fields might contain a ";", for example in ENSEMBL GTF file
  462. # for mouse, v78:
  463. # ...; transcript_name "TXNRD2;-001"; ....
  464. # The current heuristic is to split on a semicolon followed by a
  465. # space, see also http://mblab.wustl.edu/GTF22.html
  466. # Remove white space to prevent a last empty field.
  467. fields = [x.strip() for x in attributes.strip().split("; ")]
  468. for f in fields:
  469. # strip semicolon (GTF files without a space after the last semicolon)
  470. if f.endswith(";"):
  471. f = f[:-1]
  472. # split at most once in order to avoid separating
  473. # multi-word values
  474. d = [x.strip() for x in f.split(" ", 1)]
  475. n, v = d[0], d[1]
  476. if len(d) > 2:
  477. v = d[1:]
  478. if v[0] == '"' and v[-1] == '"':
  479. v = v[1:-1]
  480. else:
  481. ## try to convert to a value
  482. try:
  483. v = float(v)
  484. v = int(v)
  485. except ValueError:
  486. pass
  487. except TypeError:
  488. pass
  489. yield n, v
  490. def __getattr__(self, key):
  491. """Generic lookup of attribute from GFF/GTF attributes
  492. """
  493. # Only called if there *isn't* an attribute with this name
  494. cdef int idx
  495. idx, f = self.map_key2field.get(key, (-1, None))
  496. if idx >= 0:
  497. # deal with known attributes (fields 0-8)
  498. if idx == 8:
  499. # flush attributes if requested
  500. if self.is_modified and self.attribute_dict is not None:
  501. s = self.dict2attribute_string(self.attribute_dict)
  502. TupleProxy._setindex(self, idx, s)
  503. self.attribute_dict = None
  504. return s
  505. if f[0] == str:
  506. return force_str(self.fields[idx],
  507. self.encoding)
  508. else:
  509. return f[0](self.fields[idx])
  510. else:
  511. # deal with generic attributes (gene_id, ...)
  512. if self.attribute_dict is None:
  513. self.attribute_dict = self.attribute_string2dict(
  514. self.attributes)
  515. return self.attribute_dict[key]
  516. def __setattr__(self, key, value):
  517. '''set attribute.'''
  518. # Note that __setattr__ is called before properties, so __setattr__ and
  519. # properties don't mix well. This is different from __getattr__ which is
  520. # called after any properties have been resolved.
  521. cdef int idx
  522. idx, f = self.map_key2field.get(key, (-1, None))
  523. if idx >= 0:
  524. if value is None:
  525. s = "."
  526. elif f[1] == str:
  527. s = force_bytes(value,
  528. self.encoding)
  529. else:
  530. s = str(f[1](value))
  531. TupleProxy._setindex(self, idx, s)
  532. else:
  533. if self.attribute_dict is None:
  534. self.attribute_dict = self.attribute_string2dict(
  535. self.attributes)
  536. self.attribute_dict[key] = value
  537. self.is_modified = True
  538. # for backwards compatibility
  539. def asDict(self, *args, **kwargs):
  540. return self.to_dict(*args, **kwargs)
  541. def fromDict(self, *args, **kwargs):
  542. return self.from_dict(*args, **kwargs)
  543. cdef class GFF3Proxy(GTFProxy):
  544. def dict2attribute_string(self, d):
  545. """convert dictionary to attribute string."""
  546. return ";".join(["{}={}".format(k, v) for k, v in d.items()])
  547. def attribute_string2iterator(self, s):
  548. """convert attribute string in GFF3 format to records
  549. and iterate over key, value pairs.
  550. """
  551. for f in (x.strip() for x in s.split(";")):
  552. if not f:
  553. continue
  554. key, value = f.split("=", 1)
  555. value = value.strip()
  556. ## try to convert to a value
  557. try:
  558. value = float(value)
  559. value = int(value)
  560. except ValueError:
  561. pass
  562. except TypeError:
  563. pass
  564. yield key.strip(), value
  565. cdef class BedProxy(NamedTupleProxy):
  566. '''Proxy class for access to Bed fields.
  567. This class represents a BED entry for fast read-access.
  568. '''
  569. map_key2field = {
  570. 'contig' : (0, str),
  571. 'start' : (1, int),
  572. 'end' : (2, int),
  573. 'name' : (3, str),
  574. 'score' : (4, float),
  575. 'strand' : (5, str),
  576. 'thickStart' : (6, int),
  577. 'thickEnd' : (7, int),
  578. 'itemRGB' : (8, str),
  579. 'blockCount': (9, int),
  580. 'blockSizes': (10, str),
  581. 'blockStarts': (11, str), }
  582. cpdef int getMinFields(self):
  583. '''return minimum number of fields.'''
  584. return 3
  585. cpdef int getMaxFields(self):
  586. '''return max number of fields.'''
  587. return 12
  588. cdef update(self, char * buffer, size_t nbytes):
  589. '''update internal data.
  590. nbytes does not include the terminal '\0'.
  591. '''
  592. NamedTupleProxy.update(self, buffer, nbytes)
  593. if self.nfields < 3:
  594. raise ValueError(
  595. "bed format requires at least three columns")
  596. # determines bed format
  597. self.bedfields = self.nfields
  598. # do automatic conversion
  599. self.contig = self.fields[0]
  600. self.start = atoi(self.fields[1])
  601. self.end = atoi(self.fields[2])
  602. # __setattr__ in base class seems to take precedence
  603. # hence implement setters in __setattr__
  604. #property start:
  605. # def __get__( self ): return self.start
  606. #property end:
  607. # def __get__( self ): return self.end
  608. def __str__(self):
  609. cdef int save_fields = self.nfields
  610. # ensure fields to use correct format
  611. self.nfields = self.bedfields
  612. retval = super().__str__()
  613. self.nfields = save_fields
  614. return retval
  615. def __setattr__(self, key, value):
  616. '''set attribute.'''
  617. if key == "start":
  618. self.start = value
  619. elif key == "end":
  620. self.end = value
  621. cdef int idx
  622. idx, f = self.map_key2field[key]
  623. TupleProxy._setindex(self, idx, str(value))
  624. cdef class VCFProxy(NamedTupleProxy):
  625. '''Proxy class for access to VCF fields.
  626. The genotypes are accessed via a numeric index.
  627. Sample headers are not available.
  628. '''
  629. map_key2field = {
  630. 'contig' : (0, str),
  631. 'pos' : (1, int),
  632. 'id' : (2, str),
  633. 'ref' : (3, str),
  634. 'alt' : (4, str),
  635. 'qual' : (5, str),
  636. 'filter' : (6, str),
  637. 'info' : (7, str),
  638. 'format' : (8, str) }
  639. def __cinit__(self):
  640. # automatically calls TupleProxy.__cinit__
  641. # start indexed access at genotypes
  642. self.offset = 9
  643. cdef update(self, char * buffer, size_t nbytes):
  644. '''update internal data.
  645. nbytes does not include the terminal '\0'.
  646. '''
  647. NamedTupleProxy.update(self, buffer, nbytes)
  648. self.contig = self.fields[0]
  649. # vcf counts from 1 - correct here
  650. self.pos = atoi(self.fields[1]) - 1
  651. def __len__(self):
  652. '''return number of genotype fields.'''
  653. return max(0, self.nfields - 9)
  654. property pos:
  655. '''feature end (in 0-based open/closed coordinates).'''
  656. def __get__(self):
  657. return self.pos
  658. def __setattr__(self, key, value):
  659. '''set attribute.'''
  660. if key == "pos":
  661. self.pos = value
  662. value += 1
  663. cdef int idx
  664. idx, f = self.map_key2field[key]
  665. TupleProxy._setindex(self, idx, str(value))
  666. __all__ = [
  667. "TupleProxy",
  668. "NamedTupleProxy",
  669. "GTFProxy",
  670. "GFF3Proxy",
  671. "BedProxy",
  672. "VCFProxy"]