scripts/validation/fasta_gen_validator.py
def compare_seq_counts(db_counts, fa_counts):
    """
    Compares the number of sequences per family in full_region table with
    the number of sequences written in the distinct fasta files

    db_counts:  A dictionary with the number of sequences per family as
                found in full_region (e.g. {'RFXXXXX':N,...}). Output of
                get_full_region_seq_counts
    fa_counts:  A dictionary with the number of sequences per family fasta
                file (e.g. {'RFXXXXX':N,...}). Output of get_fasta_seq_counts
    """

    faulty_fams = []

    for rfam_acc in db_counts.keys():

        if (db_counts[rfam_acc] != fa_counts[rfam_acc]):
            faulty_fams.append(rfam_acc)

    return faulty_fams

    Compares the number of sequences per family in full_region table with
    the number of sequences written in the distinct fasta files

    db_counts:  A dictionary with the number of sequences per family as
                found in full_region (e.g. {'RFXXXXX':N,...}). Output of
                get_full_region_seq_counts
    fa_counts:  A dictionary with the number of sequences per family fasta
                file (e.g. {'RFXXXXX':N,...}). Output of get_fasta_seq_counts
    
Compares the number of sequences per family in full_region table with
the number of sequences written in the distinct fasta files

A dictionary with the number of sequences per family as
found in full_region . Output of
get_full_region_seq_counts
fa_counts:  A dictionary with the number of sequences per family fasta
file .
Compares the number of sequences per family in full_region table with the number of sequences written in the distinct fasta files A dictionary with the number of sequences per family as found in full_region . Output of get_full_region_seq_counts fa_counts : A dictionary with the number of sequences per family fasta file .
def compare_seq_counts(db_counts, fa_counts):
    faulty_fams = []
    for rfam_acc in db_counts.keys():
        if (db_counts[rfam_acc] != fa_counts[rfam_acc]):
            faulty_fams.append(rfam_acc)
    return faulty_fams
def compare_seq_counts ( db_counts , fa_counts ) : faulty_fams = [ ] for rfam_acc in db_counts . keys ( ) : if ( db_counts [ rfam_acc ] != fa_counts [ rfam_acc ] ) : faulty_fams . append ( rfam_acc ) return faulty_fams
Compares the number of sequences per family in full_region table with
the number of sequences written in the distinct fasta files
Compares the number of sequences per family in full_region table with the number of sequences written in the distinct fasta files
"""
    Compares the number of sequences per family in full_region table with
    the number of sequences written in the distinct fasta files

    db_counts:  A dictionary with the number of sequences per family as
                found in full_region (e.g. {'RFXXXXX':N,...}). Output of
                get_full_region_seq_counts
    fa_counts:  A dictionary with the number of sequences per family fasta
                file (e.g. {'RFXXXXX':N,...}). Output of get_fasta_seq_counts
    """
db_counts
fa_counts