def app_profile_msi(*args, **kwargs): logger.getLogger(__name__) app_name = "cancersig profile msi" raw_msisensor_out = kwargs['raw_msisensor_out'] raw_msisensor_out_somatic = kwargs['raw_msisensor_out_somatic'] sample_id = kwargs['sample_id'] output_file = kwargs['output_file'] disp.new_section_txt("S T A R T < " + app_name + " >") required_params = OrderedDict() required_params[ 'msisensor output (--raw_msisensor_out)'] = raw_msisensor_out required_params[ 'msisensor somatic (--raw_msisensor_out_somatic)'] = raw_msisensor_out_somatic required_params['sample id (--sample_id)'] = sample_id required_params['output file name (-o/--output_file)'] = output_file optional_params = OrderedDict() disp.show_config( app_description=APP_PROFILE_MSI_DESCRIPTION, required_params=required_params, optional_params=optional_params, ) disp.new_section_txt("E X E C U T E < " + app_name + " >") msi_profiler = MSIProfiler() msi_profiler.profile( raw_msisensor_out, raw_msisensor_out_somatic, sample_id, output_file, ) logger.getLogger(__name__) disp.new_section_txt("F I N I S H < " + app_name + " >")
def app_profile_sv(*args, **kwargs): logger.getLogger(__name__) app_name = "cancersig profile sv" input_vcf_file = kwargs['input_vcf_file'] output_file = kwargs['output_file'] sample_id = kwargs['sample_id'] disp.new_section_txt("S T A R T < " + app_name + " >") required_params = OrderedDict() required_params[ 'input vcf file name (-i/--input_vcf_file)'] = input_vcf_file required_params['output file name (-o/--output_file)'] = output_file optional_params = OrderedDict() optional_params['sample id (--sample_id)'] = sample_id disp.show_config( app_description=APP_PROFILE_SV_DESCRIPTION, required_params=required_params, optional_params=optional_params, ) disp.new_section_txt("E X E C U T E < " + app_name + " >") sv_profiler = SVProfiler() sv_profiler.profile( input_vcf_file, output_file, sample_id, ) logger.getLogger(__name__) disp.new_section_txt("F I N I S H < " + app_name + " >")
def app_profile_snv(*args, **kwargs): logger.getLogger(__name__) app_name = "cancersig profile snv" input_vcf_file = kwargs['input_vcf_file'] ref_genome_file = kwargs['ref_genome_file'] output_file = kwargs['output_file'] gt_format = kwargs['gt_format'] sample_id = kwargs['sample_id'] disp.new_section_txt("S T A R T < " + app_name + " >") required_params = OrderedDict() required_params[ 'input vcf file name (-i/--input_vcf_file)'] = input_vcf_file required_params['reference genome (-r/--reference)'] = ref_genome_file required_params['output file name (-o/--output_file)'] = output_file optional_params = OrderedDict() optional_params['sample id (--sample_id)'] = sample_id optional_params['genotype format (-g/--gt_format)'] = gt_format disp.show_config( app_description=APP_PROFILE_SNV_DESCRIPTION, required_params=required_params, optional_params=optional_params, ) disp.new_section_txt("E X E C U T E < " + app_name + " >") snv_profiler = SNVProfiler() snv_profiler.profile( input_vcf_file, ref_genome_file, output_file, gt_format, sample_id, ) logger.getLogger(__name__) disp.new_section_txt("F I N I S H < " + app_name + " >")
def app_profile_merge(*args, **kwargs): logger.getLogger(__name__) app_name = "cancersig profile merge" input_dirs = kwargs['input_dirs'].split(",") output_file = kwargs['output_file'] profile_types = kwargs['profile_types'] disp.new_section_txt("S T A R T < " + app_name + " >") required_params = OrderedDict() required_params['input directories (-i/--input_dirs)'] = input_dirs required_params['output file name (-o/--output_file)'] = output_file optional_params = OrderedDict() optional_params[ 'profile types to be merged (--profile_types)'] = profile_types disp.show_config( app_description=APP_PROFILE_MERGE_DESCRIPTION, required_params=required_params, optional_params=optional_params, ) disp.new_section_txt("E X E C U T E < " + app_name + " >") profile_merger = ProfileMerger() profile_merger.merge( input_dirs, output_file, profile_types, ) logger.getLogger(__name__) disp.new_section_txt("F I N I S H < " + app_name + " >")
def app_signature_visualize(*args, **kwargs): logger.getLogger(__name__) app_name = "cancersig signature visualize" mutation_profiles = kwargs['mutation_profiles'] signatures_probabilities = kwargs['signatures_probabilities'] output_dir = kwargs['output_dir'] disp.new_section_txt("S T A R T < " + app_name + " >") required_params = OrderedDict() required_params['input mutation profiles (-i/--mutation_profiles)'] = mutation_profiles required_params['deciphered cancer signatures probabilities (--signatures_probabilities)'] = signatures_probabilities required_params['output directory (-o/--output_dir)'] = output_dir optional_params = OrderedDict() disp.show_config(app_description=APP_SIGNATURE_VISUALIZE_DESCRIPTION, required_params=required_params, optional_params=optional_params, ) disp.new_section_txt("E X E C U T E < " + app_name + " >") vz = Visualizer() vz.visualize(mutation_profiles, signatures_probabilities, output_dir, ) logger.getLogger(__name__) disp.new_section_txt("F I N I S H < " + app_name + " >")
def app_signature_decipher(*args, **kwargs): logger.getLogger(__name__) app_name = "cancersig signature decipher" mutation_profiles = kwargs['mutation_profiles'] output_prefix = kwargs['output_prefix'] min_signatures = kwargs['min_signatures'] max_signatures = kwargs['max_signatures'] disp.new_section_txt("S T A R T < " + app_name + " >") required_params = OrderedDict() required_params['input mutation profiles (-i/--mutation_profiles)'] = mutation_profiles required_params['output file prefix (-o/--output_prefix)'] = output_prefix optional_params = OrderedDict() optional_params['minimum number of signatures (--min_signatures)'] = min_signatures optional_params['maximum number of signatures (--max_signatures)'] = max_signatures disp.show_config(app_description=APP_SIGNATURE_DECIPHER_DESCRIPTION, required_params=required_params, optional_params=optional_params, ) disp.new_section_txt("E X E C U T E < " + app_name + " >") cancersig_nmf_controller = CancerSigNMFController() cancersig_nmf_controller.decipher(mutation_profiles, output_prefix, min_signatures, max_signatures, ) logger.getLogger(__name__) disp.new_section_txt("F I N I S H < " + app_name + " >")