INNER CODE UNIT · Python

__iter__

Gabaldonlab/redundans · bin/FastaIndex.py:153

    def __iter__(self):
        """Iterate over the keys."""
        for seqid in self.id2stats: 
            yield seqid

    def __getitem__(self, key, start=None, stop=None, name=None, seqonly=False):
        """x.__getitem__(y) <==> x[y]"""
        if key not in self.id2stats:
            raise KeyError
        # get offset info
        size, offset, linebases, linebytes = self.id2stats[key][:4]
        # compute bytes to fetch
        linediff = linebytes - linebases
        seqid = key
        # get sequence slice
        if start and stop:
            reverse_complement = 0
            if start<1:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…