Links OMIA groups to OMIM equivalents.
        :param row:
        :return:
10270
def _process_omia_omim_map(self, row):
        
        # omia_id, omim_id, added_by
        model = Model(self.graph)
        omia_id = 'OMIA:' + row['omia_id']
        omim_id = 'OMIM:' + row['omim_id']

        # also store this for use when we say that a given animal is
        # a model of a disease
        if omia_id not in self.omia_omim_map:
            self.omia_omim_map[omia_id] = set()
        self.omia_omim_map[omia_id].add(omim_id)

        if self.test_mode and omia_id not in self.test_ids['disease']:
            return

        model.addXref(omia_id, omim_id)

        return
22463
def _row_to_str(self, row):
        # type: (List[str]) -> str
        
        _row_text = ''
        for col, width in self.col_widths.items():
            _row_text += self.COLUMN_SEP
            l_pad, r_pad = self._split_int(width - len(row[col]))
            _row_text += '{0}{1}{2}'.format(' ' * (l_pad + self.PADDING),
                                            row[col],
                                            ' ' * (r_pad + self.PADDING))

        _row_text += self.COLUMN_SEP + '\n'

        return _row_text
272170
def links
      rows.map do |row|
        attributes = Link::ATTRS.dup - [:url]
        Link.new(row.shift, Hash[row.map { |v| [attributes.shift, v] }])
      end
    end
741932
def addRow(self, *row):
        
        row     = [ str(item) for item in row ]
        len_row = [ len(item) for item in row ]
        width   = self.__width
        len_old = len(width)
        len_new = len(row)
        known   = min(len_old, len_new)
        missing = len_new - len_old
        if missing > 0:
            width.extend( len_row[ -missing : ] )
        elif missing < 0:
            len_row.extend( [0] * (-missing) )
        self.__width = [ max( width[i], len_row[i] ) for i in compat.xrange(len(len_row)) ]
        self.__cols.append(row)
1214791
def rowgroupmap(table, key, mapper, header=None, presorted=False,
                buffersize=None, tempdir=None, cache=True):
    

    return RowGroupMapView(table, key, mapper, header=header,
                           presorted=presorted,
                           buffersize=buffersize, tempdir=tempdir, cache=cache)
590655
def _join(self, rows):
    '''
    
    '''
    rval = {}
    for row in rows:
      if row:
        for value,count in row.items():
          rval[ value ] = count + rval.get(value,0)
    return rval
1251822
def appendRow(self, *args, **kwargs):
		
		row = self.RowType(*args, **kwargs)
		self.append(row)
		return row
602516
def ParseRow(header,
             row):
  
  precondition.AssertDictType(row, Text, Text)

  result = rdf_osquery.OsqueryRow()
  for column in header.columns:
    result.values.append(row[column.name])
  return result
858825
def path_from_row_pks(row, pks, use_rowid, quote=True):
    
    if use_rowid:
        bits = [row['rowid']]
    else:
        bits = [
            row[pk]["value"] if isinstance(row[pk], dict) else row[pk]
            for pk in pks
        ]
    if quote:
        bits = [urllib.parse.quote_plus(str(bit)) for bit in bits]
    else:
        bits = [str(bit) for bit in bits]

    return ','.join(bits)
677743
def get_row_dict(self, row_idx):
        

        try:
            row = self._rows[row_idx]
        except TypeError:
            row = self._rows[self._row_name_idx[row_idx]]

        if isinstance(row, dict):
            return row

        else:
            if row_idx not in self._row_memo:
                self._row_memo[row_idx] = dict((self._column_name_list[idx], v) for idx, v in enumerate(row) if v != self._default_value)

            return self._row_memo[row_idx]
577076
def add_rows(self, rows, header=True):
        

        # nb: don't use 'iter' on by-dimensional arrays, to get a
        #     usable code for python 2.1
        if header:
            if hasattr(rows, '__iter__') and hasattr(rows, 'next'):
                self.header(rows.next())
            else:
                self.header(rows[0])
                rows = rows[1:]
        for row in rows:
            self.add_row(row)
        return self
81478
def rows(self, table, cols):
        '''
        
        '''
        if self.orng_tables:
            data = []
            for ex in self.orng_tables[table]:
                data.append([ex[str(col)] for col in cols])
            return data
        else:
            return self.fetch(table, cols)
1074012
def row_to_dict(self, row):
        
        constellation = self.parse_constellation(row[0])
        name = self.parse_name(row[1])
        ra, dec = self.parse_coordinates(row[2])
        variable_type = row[3].strip()
        max_magnitude, symbol = self.parse_magnitude(row[4])
        min_magnitude, symbol = self.parse_magnitude(row[5])
        if symbol == '(' and max_magnitude is not None:
            # this is actually amplitude
            min_magnitude = max_magnitude + min_magnitude
        epoch = self.parse_epoch(row[8])
        period = self.parse_period(row[10])
        return {
            'constellation': constellation,
            'name': name,
            'ra': ra,
            'dec': dec,
            'variable_type': variable_type,
            'max_magnitude': max_magnitude,
            'min_magnitude': min_magnitude,
            'epoch': epoch,
            'period': period,
        }
756508
def _transform_row(self, in_row, out_row):
        
        tmp_row = {}

        for step in self._steps:
            park_info, ignore_info = step(in_row, tmp_row, out_row)
            if park_info or ignore_info:
                return park_info, ignore_info

        return None, None
1302135
def dict_row_strategy(column_names):
    
    # replace empty column names with indices
    column_names = [(name or idx) for idx, name in enumerate(column_names)]

    def row_factory(row):
        return dict(zip(column_names, row))

    return row_factory
630080
def build_row_contexts
      rows = @data.size
      row_contexts = [:default] * rows
      offset = 0
      @contexts.each do |ctx|
        if ctx == :default
          break
        end
        size = ctx[:rows]
        row_contexts[offset...(size + offset)] = [ctx[:id]] * size
        offset += size
      end
      @contexts.reverse_each do |ctx|
        if ctx == :default
          break
        end
        size = ctx[:rows]
        row_contexts[(rows - size)...rows] = [ctx[:id]] * size
        rows -= size
      end
      row_contexts
    end
99250
def __get_tokens(self, row):
        """"""
        row_tokenizer = RowTokenizer(row, self.config)

        line = row_tokenizer.next()
        while line:
            # print("RETURN line", line[0:100])
            yield line
            line = row_tokenizer.next()