Exemplo 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'.")
Exemplo 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'.")
Exemplo n.º 3
0
    def __init__(self, filename, comments=False, fields=_DEFAULT_FIELDS):
        """Initialize the class."""
        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'."
                )
Exemplo n.º 4
0
 def __init__(self, filename):
     """Initialize the class."""
     SearchIndexer.__init__(self, filename)
     self._handle = UndoHandle(self._handle)
Exemplo n.º 5
0
 def __init__(self, filename, **kwargs):
     """Initialize the class."""
     SearchIndexer.__init__(self, filename)
     # TODO: better way to do this?
     iter_obj = self._parser(self._handle, **kwargs)
     self._meta, self._fallback = iter_obj._meta, iter_obj._fallback
Exemplo n.º 6
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
Exemplo n.º 7
0
 def __init__(self, filename):
     SearchIndexer.__init__(self, filename)
     self._handle = UndoHandle(self._handle)
Exemplo n.º 8
0
 def __init__(self, filename, pslx=False):
     SearchIndexer.__init__(self, filename, pslx=pslx)
Exemplo n.º 9
0
 def __init__(self, filename):
     SearchIndexer.__init__(self, filename)
     self._handle = UndoHandle(self._handle)
Exemplo n.º 10
0
 def __init__(self, filename, **kwargs):
     """Initialize the class."""
     SearchIndexer.__init__(self, filename)
     # TODO: better way to do this?
     iter_obj = self._parser(self._handle, **kwargs)
     self._meta, self._fallback = iter_obj._meta, iter_obj._fallback
Exemplo n.º 11
0
 def __init__(self, filename, pslx=False):
     """Initialize the class."""
     SearchIndexer.__init__(self, filename, pslx=pslx)
Exemplo n.º 12
0
 def __init__(self, filename, pslx=False):
     """Initialize the class."""
     SearchIndexer.__init__(self, filename, pslx=pslx)
Exemplo n.º 13
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
Exemplo n.º 14
0
 def __init__(self, filename, pslx=False):
     SearchIndexer.__init__(self, filename, pslx=pslx)
Exemplo n.º 15
0
 def __init__(self, filename):
     """Initialize the class."""
     SearchIndexer.__init__(self, filename)
     self._handle = UndoHandle(self._handle)
Exemplo n.º 16
0
 def __init__(self, filename):
     """Initialize the class."""
     SearchIndexer.__init__(self, filename)