Returns the name of the input handler for seqs.
178631
def guess_input_handler(seqs, add_seq_names=False):
    """"""
    if isinstance(seqs, str):
        if '\n' in seqs:  # can't be a filename...
            return '_input_as_multiline_string'
        else:  # assume it was a filename
            return '_input_as_string'

    if isinstance(seqs, list) and len(seqs) and isinstance(seqs[0], tuple):
        return '_input_as_seq_id_seq_pairs'

    if add_seq_names:
        return '_input_as_seqs'

    return '_input_as_lines'
883538
def get_raw_input_register(self, name):
        """"""
        if self._update_on_read:
            self.update()
        return self._input_regs[name]
665299
def count(cls, name):
        """"""
        counter = cls.collection.find_one({'name': name}) or {}
        return counter.get('seq', 0)
444200
def get_seqs_type(seqs):
    
    region_p = re.compile(r'^(.+):(\d+)-(\d+)$')
    if isinstance(seqs, Fasta):
        return "fasta"
    elif isinstance(seqs, list):
        if len(seqs) == 0:
            raise ValueError("empty list of sequences to scan")
        else:
            if region_p.search(seqs[0]):
                return "regions"
            else:
                raise ValueError("unknown region type")
    elif isinstance(seqs, str) or isinstance(seqs, unicode):
        if os.path.isfile(seqs):
            ftype = determine_file_type(seqs)
            if ftype == "unknown":
                raise ValueError("unknown type")
            elif ftype == "narrowpeak":
                raise ValueError("narrowPeak not yet supported in this function")
            else:
                return ftype + "file"
        else:
            raise ValueError("no file found with name {}".format(seqs))
    else:
        raise ValueError("unknown type {}".format(type(seqs).__name__))
530681
def get_seq_number_from_id(id, id_template, prefix, **kw):
    
    separator = kw.get("separator", "-")
    postfix = id.replace(prefix, "").strip(separator)
    postfix_segments = postfix.split(separator)
    seq_number = 0
    possible_seq_nums = filter(lambda n: n.isalnum(), postfix_segments)
    if possible_seq_nums:
        seq_number = possible_seq_nums[-1]

    # Check if this id has to be expressed as an alphanumeric number
    seq_number = get_alpha_or_number(seq_number, id_template)
    seq_number = to_int(seq_number)
    return seq_number
1240879
protected function _getHandlerName()
    {
        $handler = $this->get('handler');
        if (class_exists($handler)) {
            $handler = new $handler();
            $info = $handler->info();
            if (!empty($info['name'])) {
                return $info['name'];
            }
        }

        return $this->get('handler');
    }
1058946
public static final KeyPressHandler getNumericWithSeparatorsKeyPressHandler() { // NOPMD
    if (HandlerFactory.numericWsKeyPressHandler == null) {
      synchronized (NumericWithSeparatorsKeyPressHandler.class) {
        if (HandlerFactory.numericWsKeyPressHandler == null) {
          HandlerFactory.numericWsKeyPressHandler = new NumericWithSeparatorsKeyPressHandler();
        }
      }
    }
    return HandlerFactory.numericWsKeyPressHandler;
  }
228358
def _get_seqtype_from_ext(handle):
    ''''''
    if isinstance(handle, basestring):
        name = handle
    elif hasattr(handle, 'filename'):
        name = handle.filename
    elif hasattr(handle, 'name'):
        name = handle.name
    else:
        raise ValueError("Unknown datatype for handle!")

    modifier = ''
    dummy, ext = path.splitext(name.lower())
    if ext == ".gz":
        modifier = 'gz-'
        dummy, ext = path.splitext(dummy)

    if not ext:
        ext = "." + dummy

    if ext in (".gbk", ".gb", ".genbank", ".gbff"):
        return modifier + "genbank"
    elif ext in (".embl", ".emb"):
        return modifier + "embl"
    elif ext in (".fa", ".fasta", ".fna", ".faa", ".fas"):
        return modifier + "fasta"
    else:
        raise ValueError("Unknown file format '%s'." % ext)
124144
def seq_str(self):
        """"""

        if not self.seq:
            return None

        return ssbio.protein.sequence.utils.cast_to_str(self.seq)
32177
def find_seq_id(block, name, case_sensitive=True):
    
    # logging.warn("DEPRECATED: Try to use cma.find_seq_rec instead")
    rec = find_seq_rec(block, name, case_sensitive)
    return rec['id']
1013526
def get_inputs(node, kwargs):
    """"""
    name = node["name"]
    proc_nodes = kwargs["proc_nodes"]
    index_lookup = kwargs["index_lookup"]
    inputs = node["inputs"]
    attrs = node.get("attrs", {})

    input_nodes = []
    for ip in inputs:
        input_node_id = index_lookup[ip[0]]
        input_nodes.append(proc_nodes[input_node_id].name)

    return name, input_nodes, attrs
543865
def sequence(self):
        
        self.open()
        seq = lvm_vg_get_seqno(self.handle)
        self.close()
        return seq
1346512
def _build_instance_handler_mapping(cls, instance, handle_d):
        """"""
        res = {}
        for member_name, sig_name in handle_d.items():
            if sig_name in res:
                sig_handlers = res[sig_name]
            else:
                sig_handlers = res[sig_name] = []
            sig_handlers.append(getattr(instance, member_name))
        return res
415831
function getKinesisSequenceNumber(record) {
  return record && record.kinesis && record.kinesis.sequenceNumber ? record.kinesis.sequenceNumber : '';
}
688879
def _extract_seq(extractor, seq):
    """"""
    subtype = Any
    if seq.__args__ and seq.__args__[0] is not Any:
        subtype = seq.__args__[0]
    return _array_type(extractor.extract(subtype))
1225990
def _handleEsc(self):
        
        if self._typingSms:
            self.serial.write(self.ESC_CHARACTER)
            self._typingSms = False
            self.inputBuffer = []
            self.cursorPos = 0
46879
function getHandlers(handlers) {
        if (typeof handlers === 'string') {
          prev[c.script].handlers.push(handlers)
        } else if (Array.isArray(c.handlers)) {
          c.handlers.forEach(h => {
            prev[c.script].handlers.push(h)
          })
        } else {
          Object.keys(handlers).forEach(k => getHandlers(handlers[k]))
        }
      }