Skip to content

pyNBS.data_import_tools

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

data_import_tools is a module that contains functions for loading various types of files used in the core pyNBS algorithm as well as other helper or sub-functions relating to the loading of the somatic mutation data or the molecular network.

Functions in this module

This module contains the following functions (bolded functions are key pyNBS functions):

  • degree_shuffNet: This function can be called from load_network_file to perform a degree-preserved shuffling of the network that is to be loaded. All node degrees will be preserved, but nodes will be randomly connected to other nodes in the network, instead of as defined by the network file.

  • filter_weighted_network: This function filters a 3 (or more)-column network text file where each additional column beyond the 2 required as a numeric edge attribute. This function will create a new binary edge list from all edges in the network file that are larger than a specific quantile.

  • label_shuffNet: This function can be called from load_network_file to perform a label shuffling of the network that is to be loaded. The network topology will remain exactly the same as the network to be loaded, but the labels assigned to each node will be randomly shuffled across the entire network.

  • load_binary_mutation_data: This function helps load binary somatic mutation data into a Pandas DataFrame usable by the pyNBS algorithm. The file format required for this function can be found here.

  • load_network_file: This function helps load the molecular network from a text edgelist into a NetworkX Graph object usable by the pyNBS algorithm. The file format required for this function can be found here.

  • load_params: This function is used in the command line execution of pyNBS to read and set internal parameters for the pyNBS algorithm from a pre-specified file. The file format required for this function can be found here.

  • process_TCGA_MAF: This function is a helper function used to construct a somatic mutation data file usable by pyNBS from the mutation annotation file (MAF) file format from The Broad Institute's Firehose.

Clone this wiki locally