INNER CODE UNIT · Python

pat_path

nloyfer/wgbs_tools · src/python/bam2pat.py:98

        pat_path = out_path + PAT_SUFF
        cmd = f'sort {out_path} -k2,2n -k3,3 '
        if temp_dir:
            cmd += f' -T {temp_dir} '
        if long:
            cmd += " | awk -v OFS='\t' '{print $1,$2,$3,1,$4}'"
        else:
            cmd += " | uniq -c | awk -v OFS='\t' '{print $2,$3,$4,$1}'"
        cmd += f' | bgzip -f > {pat_path}'
        subprocess_wrap(cmd, debug)

        return pat_path
    except IllegalArgumentError:
        return None

def blueprint_legacy(genome, region, paired_end):
    if not op.isfile(genome.genome_path):
        eprint(f'[ wt bam2pat ] Error: not genome reference fasta file: {genome.genome_path}')

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…