def merge_radia(job, perchrom_rvs):
    job.fileStore.logToMaster('Running merge_radia')
    work_dir = job.fileStore.getLocalTempDir()
    input_files = {filename: jsid for perchrom_files in perchrom_rvs.values()
                   for filename, jsid in perchrom_files.items()}
    input_files = get_files_from_filestore(job, input_files, work_dir,
                                           docker=False)
    chromosomes = [''.join(['chr', str(x)]) for x in range(1, 23) + ['X', 'Y']]
    with open('/'.join([work_dir, 'radia_calls.vcf']), 'w') as radfile, \
            open('/'.join([work_dir, 'radia_filter_passing_calls.vcf']), 'w') as radpassfile:
        for chrom in chromosomes:
            with open(input_files[''.join(['radia_filtered_', chrom, '.vcf'])], 'r') as filtradfile:
                for line in filtradfile:
                    line = line.strip()
                    if line.startswith('
                        if chrom == 'chr1':
                            print(line, file=radfile)
                            print(line, file=radpassfile)
                        continue
                    else:
                        print(line, file=radfile)
                        line = line.split('\t')
                        if line[6] == 'PASS' and 'MT=GERM' not in line[7]:
                            print('\t'.join(line), file=radpassfile)
    with open(radpassfile.name, 'r') as radpassfile, \
            open('/'.join([work_dir, 'radia_parsed_filter_passing_calls.vcf']),
                 'w') as parsedradfile:
        parse_radia_multi_alt(radpassfile, parsedradfile)
    output_files = defaultdict()
    for radia_file in [radfile.name, parsedradfile.name]:
        output_files[os.path.basename(radia_file)] = job.fileStore.writeGlobalFile(radia_file)
    return output_files