Source code for subtype_specific_mutations
'''
Analyzing subtype-specific mutations
======================================
'''
[docs]def run():
'''
This is a simple Python script for computing *p*-values of subtype-specific
mutations. The script requires mutation data and a list of patients and
their respective subtypes, The default parameters here use the BRCA
mutation data in the examples/mutation_data/BRCA directory.
On my machine, it takes 19 minutes to permute iRef **once** using Q=100,
since this requires performing 21,274,600 edge swaps.
'''
# Load required modules
import sys, os
sys.path.insert(1, os.path.abspath('../../lib'))
import permute_ppi_network as P
# Default parameters for this tutorial (CHANGE AT YOUR OWN RISK)
NETWORK_EDGELIST="../network/iref_edgelist"
OUTPUT_DIR="./sample_output/permuted_networks"
NUM_MATRICES=1
args = [ "-n", NETWORK_EDGELIST, "-o", OUTPUT_DIR, "-v" ]
if NUM_MATRICES: args += [ "-c", NUM_MATRICES ]
# Use the permute_mutation_data module to generate the permuted matrices
P.run(P.parse_args(map(str, args)))
if __name__ == "__main__": run()