def load_mutation_heat(args): samples = hnio.load_samples(args.sample_file) if args.sample_file else None genes = hnio.load_genes(args.gene_file) if args.gene_file else None snvs = hnio.load_snvs(args.snv_file, genes, samples) cnas = hnio.load_cnas(args.cna_file, genes, samples) if args.cna_file else [] if args.cna_filter_threshold: cnas = hnheat.filter_cnas(cnas, args.cna_filter_threshold) if not samples: samples = set([snv.sample for snv in snvs] + [cna.sample for cna in cnas]) return hnheat.mut_heat(len(samples), snvs, cnas, args.min_freq), None
def load_mutation_heat(args): genes = hnio.load_genes(args.gene_file) if args.gene_file else None samples = hnio.load_samples(args.sample_file) if args.sample_file else None snvs = hnio.load_snvs(args.snv_file, genes, samples) cnas = hnio.load_cnas(args.cna_file, genes, samples) if args.cna_file else [] if args.cna_filter_threshold: cnas = hnheat.filter_cnas(cnas, args.cna_filter_threshold) if not samples: samples = set([snv.sample for snv in snvs] + [cna.sample for cna in cnas]) if not genes: genes = set([snv.gene for snv in snvs] + [cna.gene for cna in cnas]) return hnheat.mut_heat(genes, len(samples), snvs, cnas, args.min_freq)