Skip to content

pyNBS.data_import_tools.load_binary_mutation_data

Justin Huang edited this page Jan 27, 2018 · 3 revisions

This function loads binary mutation data from a file. The binary mutation data can be in either matrix or list format. See Somatic Mutation Data File Format for details on mutation data format. The resulting DataFrame constructed by this function will be used throughout the pyNBS algorithm.


Function Call:

load_binary_mutation_data(filename, filetype='list', delimiter='\t', verbose=True)

Parameters:

  • filename (required, str): Path to binary mutation matrix file. May be a csv or 2-column list where each line is a sample and the gene mutated separated by a common delimiter.
  • filetype (optional, str, default='list'): File structure of binary mutation data. There are two options: matrix or list. See Somatic Mutation Data File Format for details on mutation data format.
  • delimiter (optional, str, default='\t'): Delimiter used in binary mutation file.
  • verbose (optional, bool, default=False): Verbosity flag for reporting on function progress.

Returns:

  • binary_mat (Pandas.DataFrame): Pandas DataFrame of binary mutation matrix with header. Rows are samples/patients, columns are genes.
Clone this wiki locally