Skip to content

Parsing of COSMIC database is potentially suboptimal #290

Description

@mtiberti

While parsing the COSMIC database, we get:

/data/user/teo/devel/cancermuts/cancermuts/datasources.py:1678: ParserWarning: Falling back to the 'python' engine because the 'c' engine does not support regex separators (separators > 1 char and different from '\s+' are interpreted as regex); you can avoid this warning by specifying engine='python'.
  df_tmp = pd.read_csv(file, sep='\\t', dtype='str', na_values='NS', usecols=self._use_cols_database_files, encoding=self._encoding)
/data/user/teo/devel/cancermuts/cancermuts/datasources.py:1678: ParserWarning: Falling back to the 'python' engine because the 'c' engine does not support regex separators (separators > 1 char and different from '\s+' are interpreted as regex); you can avoid this warning by specifying engine='python'.
  df_tmp = pd.read_csv(file, sep='\\t', dtype='str', na_values='NS', usecols=self._use_cols_database_files, encoding=self._encoding)

in fact our call to read_csv uses sep='\\t', which the engine interprets as a regexp, which forces us into using the python parser which is significantly slower than the c parser. We should probably just have sep='\t' so we can take advantage of the c parser

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions