22# coding: utf-8
33import sys
44import os
5- sys .path .append (os .path .abspath ('../../stratipy_cluster ' ))
5+ sys .path .append (os .path .abspath ('../../stratipy ' ))
66from stratipy import (load_data , formatting_data , filtering_diffusion ,
77 nmf_bootstrap , consensus_clustering ,
88 hierarchical_clustering , biostat , biostat_go ,
@@ -21,8 +21,11 @@ def initiation(mut_type, alpha, patient_data, data_folder, ssc_mutation_data,
2121 alpha = 0
2222
2323 if patient_data == 'SSC' :
24+ # result_folder = (
25+ # data_folder + 'result_' + ssc_mutation_data + '_' +
26+ # ssc_subgroups + '_' + gene_data + '_' + ppi_data + '/')
2427 result_folder = (
25- data_folder + 'result_' + ssc_mutation_data + '_' +
28+ data_folder + '/Volumes/Abu3/min/201812_MAF50_alpha0.7/ result_' + ssc_mutation_data + '_' +
2629 ssc_subgroups + '_' + gene_data + '_' + ppi_data + '/' )
2730 else :
2831 result_folder = (data_folder + 'result_' + patient_data + '_' +
@@ -117,55 +120,55 @@ def post_bootstrap(result_folder, mut_type, influence_weight, simplification,
117120 ppi_data , patient_data , data_folder , ssc_subgroups ,
118121 ssc_mutation_data , gene_data , p_val_threshold , compute ,
119122 overwrite ):
120- print ("------------ consensus_clustering.py ------------ {}"
121- .format (datetime .datetime .now ().strftime ('%Y-%m-%d %H:%M:%S' )),
122- flush = True )
123- distance_genes , distance_patients = (
124- consensus_clustering .sub_consensus (
125- result_folder , mut_type , influence_weight , simplification , alpha ,
126- tol , keep_singletons , ngh_max , min_mutation , max_mutation ,
127- n_components , n_permutations , lambd , tol_nmf ,
128- compute_gene_clustering , run_consensus ))
129-
130- print ("------------ hierarchical_clustering.py ------------ {}"
131- .format (datetime .datetime .now ().strftime ('%Y-%m-%d %H:%M:%S' )),
132- flush = True )
133- hierarchical_clustering .hierarchical (
134- result_folder , distance_genes , distance_patients , ppi_data , mut_type ,
135- influence_weight , simplification , alpha , tol , keep_singletons , ngh_max ,
136- min_mutation , max_mutation , n_components , n_permutations , lambd ,
137- tol_nmf , linkage_method , patient_data , data_folder , ssc_subgroups ,
138- ssc_mutation_data , gene_data )
123+ # print("------------ consensus_clustering.py ------------ {}"
124+ # .format(datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')),
125+ # flush=True)
126+ # distance_genes, distance_patients = (
127+ # consensus_clustering.sub_consensus(
128+ # result_folder, mut_type, influence_weight, simplification, alpha,
129+ # tol, keep_singletons, ngh_max, min_mutation, max_mutation,
130+ # n_components, n_permutations, lambd, tol_nmf,
131+ # compute_gene_clustering, run_consensus))
132+ #
133+ # print("------------ hierarchical_clustering.py ------------ {}"
134+ # .format(datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')),
135+ # flush=True)
136+ # hierarchical_clustering.hierarchical(
137+ # result_folder, distance_genes, distance_patients, ppi_data, mut_type,
138+ # influence_weight, simplification, alpha, tol, keep_singletons, ngh_max,
139+ # min_mutation, max_mutation, n_components, n_permutations, lambd,
140+ # tol_nmf, linkage_method, patient_data, data_folder, ssc_subgroups,
141+ # ssc_mutation_data, gene_data)
139142
140143 print ("\n ------------ biostat.py ------------ {}"
141144 .format (datetime .datetime .now ().strftime ('%Y-%m-%d %H:%M:%S' )),
142145 flush = True )
143- # gene_id_ppi, idx_ppi, idx_ppi_only = preprocessing(
144- # data_folder, patient_data, ssc_mutation_data, ssc_subgroups, gene_data,
145- # ppi_data, result_folder, influence_weight, simplification, compute,
146- # overwrite, alpha, tol, ngh_max, keep_singletons, min_mutation,
147- # max_mutation, mut_type)
148- #
149- # biostat.biostat_analysis(
150- # data_folder, result_folder, patient_data, ssc_mutation_data,
151- # ssc_subgroups, ppi_data, gene_data, mut_type, influence_weight,
152- # simplification, alpha, tol, keep_singletons, ngh_max, min_mutation,
153- # max_mutation, n_components, n_permutations, lambd, tol_nmf,
154- # linkage_method, p_val_threshold, gene_id_ppi, idx_ppi, idx_ppi_only)
146+ gene_id_ppi , idx_ppi , idx_ppi_only = preprocessing (
147+ data_folder , patient_data , ssc_mutation_data , ssc_subgroups , gene_data ,
148+ ppi_data , result_folder , influence_weight , simplification , compute ,
149+ overwrite , alpha , tol , ngh_max , keep_singletons , min_mutation ,
150+ max_mutation , mut_type )
151+
152+ biostat .biostat_analysis (
153+ data_folder , result_folder , patient_data , ssc_mutation_data ,
154+ ssc_subgroups , ppi_data , gene_data , mut_type , influence_weight ,
155+ simplification , alpha , tol , keep_singletons , ngh_max , min_mutation ,
156+ max_mutation , n_components , n_permutations , lambd , tol_nmf ,
157+ linkage_method , p_val_threshold , gene_id_ppi , idx_ppi , idx_ppi_only )
155158
156- biostat_go .biostat_go_enrichment (
157- alpha , result_folder , mut_type , patient_data , data_folder , ssc_mutation_data ,
158- ssc_subgroups , gene_data , ppi_data , lambd , n_components , ngh_max , n_permutations )
159+ # biostat_go.biostat_go_enrichment(
160+ # alpha, result_folder, mut_type, patient_data, data_folder, ssc_mutation_data,
161+ # ssc_subgroups, gene_data, ppi_data, lambd, n_components, ngh_max, n_permutations)
159162
160163 print ("\n ------------ biostat_plot.py ------------ {}"
161164 .format (datetime .datetime .now ().strftime ('%Y-%m-%d %H:%M:%S' )),
162165 flush = True )
163166 # no need SSC1/SSC2, no need k
164- biostat_plot .load_plot_biostat_individuals (
165- result_folder , data_folder , ssc_mutation_data ,
166- gene_data , patient_data , ppi_data , mut_type , lambd , influence_weight ,
167- simplification , alpha , tol , keep_singletons , ngh_max , min_mutation ,
168- max_mutation , n_components , n_permutations , tol_nmf , linkage_method )
167+ # biostat_plot.load_plot_biostat_individuals(
168+ # result_folder, data_folder, ssc_mutation_data,
169+ # gene_data, patient_data, ppi_data, mut_type, lambd, influence_weight,
170+ # simplification, alpha, tol, keep_singletons, ngh_max, min_mutation,
171+ # max_mutation, n_components, n_permutations, tol_nmf, linkage_method)
169172###############################################################################
170173###############################################################################
171174###############################################################################
0 commit comments