def main(config_file): with open(config_file) as in_handle: config = yaml.load(in_handle) ref_index = novoalign.refindex(config["ref"], kmer_size=13, step_size=1) create_dirs(config) for cur in config["input"]: in_fastq = cur["fastq"] if cur.get("old_style_barcodes", False): in_fastq = convert_illumina_oldstyle(in_fastq) bc_files = demultiplex(in_fastq, cur["barcodes"], config["dir"]["tmp"], config) with cpmap(config["algorithm"]["cores"]) as cur_map: for _ in cur_map(process_fastq, ((bc_file, ref_index, cur, config, config_file) for bc_file in bc_files)): pass
def _index_ref_genome(config, cur): ref = config.get("ref", cur.get("ref", None)) return novoalign.refindex(ref, kmer_size=13, step_size=1)