<commit_before>#!/usr/bin/env python3

from . import fileparse
from . import seq
import re
import math


def allcheck(ref_file, vcfdir, gff_file):
    gff_dict = fileparse.gff_read(gff_file)
    reference = seq.Ref(ref_file)
    variants = fileparse.vcf_allread(vcfdir)
    summary = fileparse.v_union(variants, gff_dict)

    header = "\t".join([
        "gene",
        "ref",
        "alt",
        "pos_Pseq",
    ])
    print(header)
    for k, v in summary.items():
        reference.variant = v
        variantlist = reference.provean()
        if len(variantlist) > 0:
            for vinfo in variantlist:
                if vinfo.pref == vinfo.palt:
                    print(vinfo.gene,
                          "\t",
                          vinfo.pref,
                          "\t",
                          vinfo.palt,
                          "\t",
                          vinfo.pvp,
                          )<commit_msg>chfmt<commit_after>#!/usr/bin/env python3

from . import fileparse
from . import seq
import re
import math


def allcheck(ref_file, vcfdir, gff_file):
    gff_dict = fileparse.gff_read(gff_file)
    reference = seq.Ref(ref_file)
    variants = fileparse.vcf_allread(vcfdir)
    summary = fileparse.v_union(variants, gff_dict)

    header = "\t".join([
        "gene",
        "pos_protein",
        "ref_protein",
        "alt_protein",
        "pos_genome",
        "ref_genome",
        "alt_genome",
    ])
    print(header)
    for k, v in summary.items():
        reference.variant = v
        variantlist = reference.provean()
        if len(variantlist) > 0:
            for vinfo in variantlist:
                if vinfo.pref == vinfo.palt:
                    print("\t".join([
                        vinfo.gene,
                        vinfo.pvp,
                        vinfo.pref,
                        vinfo.palt,
                        vinfo.pos,
                        vinfo.ref,
                        vinfo.alt,
                    ]))
{'fraction_non_alphanumeric': 0.10329341317365269, 'fraction_numerical': 0.001996007984031936, 'mean_word_length': 1.312572087658593, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1725063', 'n_tokens_mistral': 630, 'n_tokens_neox': 595, 'n_words': 120}