def Count_bases_and_percentages(Fasta_q, Nucleo_Amino_dict = {"A":0,"C":0,"G":0,"T":0,"N":0}):
    """
    This function takes whether the list of the open_fasta_file or open_fastq_file and 
    returns the number of bases or residues processed and the relative abundance of 
    each nucleotide or amino acid.

    PARAMETERS
    ----------
    Fasta_q : Tuple of strings
             Tuple of properties of the different lines in the FASTA/Q file

    RETURNS
    -------
    The total number of bases/residues in the FASTA/Q file and the relative 
    abundance of each nucleotide/amino acid.
    """

    Residues, Nucleo_Amino_s = 0, Nucleo_Amino_dict
    for i in range(len(Fasta_q)):
        Residues += float(len(Fasta_q[i][1]))
        for Nucleo_Amino in Nucleo_Amino_s: Nucleo_Amino_s[Nucleo_Amino] += float(Fasta_q[i][1].count(Nucleo_Amino))

    return "{:,}".format(int(Residues)).replace(",","."),\
           tuple([int((Nucleo_Amino_s[Nucleo_Amino] / Residues) * 100) for Nucleo_Amino in Nucleo_Amino_s])