def __setitem__(self, k, ns):
        self.seqlist.append(ns)
        if isinstance(k, types.StringType):
            # Allow build with a string object.
            self._cache[k] = (ns.id, ns, 0)
        elif k is not None:
            self._cache[k.pathForward] = (ns.id, ns, 0)
save mapping of seq to the specified NLMSASequence
dataset/ETHPy150Open cjlee112/pygr/pygr/nlmsa_utils.py/NLMSASeqDict.__setitem__