Ejemplo n.º 1
0
    def __init__(self, filename, comments=False, fields=_DEFAULT_FIELDS):
        SearchIndexer.__init__(self, filename, comments=comments, fields=fields)

        # if the file doesn't have comments,
        # get index of column used as the key (qseqid / qacc / qaccver)
        if not self._kwargs['comments']:
            if 'qseqid' in fields:
                self._key_idx = fields.index('qseqid')
            elif 'qacc' in fields:
                self._key_idx = fields.index('qacc')
            elif 'qaccver' in fields:
                self._key_idx = fields.index('qaccver')
            else:
                raise ValueError("Custom fields is missing an ID column. "
                        "One of these must be present: 'qseqid', 'qacc', or 'qaccver'.")
Ejemplo n.º 2
0
    def __init__(self, filename, comments=False, fields=_DEFAULT_FIELDS):
        SearchIndexer.__init__(self,
                               filename,
                               comments=comments,
                               fields=fields)

        # if the file doesn't have comments,
        # get index of column used as the key (qseqid / qacc / qaccver)
        if not self._kwargs['comments']:
            if 'qseqid' in fields:
                self._key_idx = fields.index('qseqid')
            elif 'qacc' in fields:
                self._key_idx = fields.index('qacc')
            elif 'qaccver' in fields:
                self._key_idx = fields.index('qaccver')
            else:
                raise ValueError(
                    "Custom fields is missing an ID column. "
                    "One of these must be present: 'qseqid', 'qacc', or 'qaccver'."
                )
Ejemplo n.º 3
0
 def __init__(self, filename):
     SearchIndexer.__init__(self, filename)
     self._handle = UndoHandle(self._handle)
Ejemplo n.º 4
0
 def __init__(self, filename):
     SearchIndexer.__init__(self, filename)
     self._handle = UndoHandle(self._handle)
Ejemplo n.º 5
0
 def __init__(self, filename):
     SearchIndexer.__init__(self, filename)
     # TODO: better way to do this?
     iter_obj = self._parser(self._handle)
     self._meta, self._fallback = iter_obj._meta, iter_obj._fallback
Ejemplo n.º 6
0
 def __init__(self, filename, pslx=False):
     SearchIndexer.__init__(self, filename, pslx=pslx)
Ejemplo n.º 7
0
 def __init__(self, filename):
     SearchIndexer.__init__(self, filename)
     # TODO: better way to do this?
     iter_obj = self._parser(self._handle)
     self._meta, self._fallback = iter_obj._meta, iter_obj._fallback
Ejemplo n.º 8
0
 def __init__(self, filename, pslx=False):
     SearchIndexer.__init__(self, filename, pslx=pslx)