Example #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'.")
Example #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'.")
Example #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'."
                )
Example #4
0
 def __init__(self, filename):
     """Initialize the class."""
     SearchIndexer.__init__(self, filename)
     self._handle = UndoHandle(self._handle)
Example #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
Example #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
Example #7
0
 def __init__(self, filename):
     SearchIndexer.__init__(self, filename)
     self._handle = UndoHandle(self._handle)
Example #8
0
 def __init__(self, filename, pslx=False):
     SearchIndexer.__init__(self, filename, pslx=pslx)
Example #9
0
 def __init__(self, filename):
     SearchIndexer.__init__(self, filename)
     self._handle = UndoHandle(self._handle)
Example #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
Example #11
0
 def __init__(self, filename, pslx=False):
     """Initialize the class."""
     SearchIndexer.__init__(self, filename, pslx=pslx)
Example #12
0
 def __init__(self, filename, pslx=False):
     """Initialize the class."""
     SearchIndexer.__init__(self, filename, pslx=pslx)
Example #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
Example #14
0
 def __init__(self, filename, pslx=False):
     SearchIndexer.__init__(self, filename, pslx=pslx)
Example #15
0
 def __init__(self, filename):
     """Initialize the class."""
     SearchIndexer.__init__(self, filename)
     self._handle = UndoHandle(self._handle)
Example #16
0
 def __init__(self, filename):
     """Initialize the class."""
     SearchIndexer.__init__(self, filename)