Calculate a Pedigree A little genetics lesson

When you only have access to someone's visible traits or phenotype, a pedigree of their family history is often used to figure out the actual genetic information or, genotype of each family member. 

When dealing with simple dominance as we will be, a simple pedigree chart will be enough to figure out the alleles, or the version of the genes that they have, of each person. In simple dominance a person with a dominant allele (denoted with a capital letter) will always have the trait that that version represents, no matter the other allele. It takes two recessive alleles (denoted with a lowercase letter) to have that version expressed. In other words the dominant allele always masks the recessive version of that gene. Here is an example of a pedigree chart:



Each row here is a generation. Circles are female, males squares, horizontal  lines are marriage, vertical lines children. Pretty simple. Black means recessive phenotype, white, dominant. Starting from the top, (assume the alleles are A and a), we know person 2 has aa, homozygous recessive because that is the only possible option for the recessive phenotype. Now even though person one could be either Aa or AA to be dominant phenotype, because he has a recessive child, he must be Aa, or heterozygous. You can do this for all the other people. In the event you don't have any information that enables you to figure out the second allele, it can be done like so: A_.

Your Task


You will receive a pedigree chart in the form of a list of generations like [GenI, GenII, etc.] in any sane format.
Each generation will be a list of strings, each string representing a person.
The people are made up of three parts - an ID, their phenotype, and their "connections".
Their ID is a single printable ascii character that is unique in the entire tree other than A or a. (No, there won't be more than 95 people in the chart).
Their phenotype is one of A or a, A being the dominant allele, and a being recessive.
Their connections are a sequence of ID's of other people that they have connections with.
A connection in the same generation is marriage, in different generations is child and parent.
The connections are repeated on both sides (i.e. the husband has say he is a husband of wife, and wife says she is husband of wife).
You have to figure out the genotypes of everyone as much as possible.
Return the same list, except instead of people, put their genotypes in the same position.
The genotype has to be outputted in order so Aa instead of aA.
A little leeway on the input format is fine.
This is code-golf so shortest answer in bytes wins.


Examples

[["0A1234", "1a0234"], ["2A01", "3a01", "4A015678",
"5a4678"], ["6a45", "7A45","8A45"]] (The one above)   -&gt;

[["Aa", "aa"], ["Aa", "aa", "Aa", "aa"], ["aa", "Aa", "Aa"]]

[["0A12", "1A02"], ["2A301", "3a2"]]    -&gt;

[["A_", "A_"], ["A_", "aa"]]


Bonus


-30 bytes if you deal with incomplete and co-dominance also. On the detection of three phenotypes instead of two in the entire chart, apply incomplete/co dominance to your algorithm.
05AB1E, 39 bytes
εNUε'aåi„aaë¯.øX&lt;X&gt;‚è˜y2£lSδåPài„Aaë„A_

Port of my Java answer.
Try it online or verify all test cases.
Explanation:

ε                     # Map over the rows of the (implicit) input-list:
 NU                   #  Store the outer-map index in variable `X`
   ε                  #  Map over the strings `y` of the current row:
    'aåi             '#   If the current string contains an &quot;a&quot;:
        „aa           #    Push string &quot;aa&quot;
       ë              #   Else (it contains an &quot;A&quot; instead):
        ¯.ø           #    Surround the (implicit) input-list with two empty lists
                      #    (05AB1E has automatic wrap-around when indexing lists,
                      #     so this is to prevent that)
           X&lt;X&gt;‚      #    Push `X-1` and `X+1` and pair them together
                è     #    Index both into the list to get (potential) parent and child rows
                 ˜    #    Flatten it to a single list
        y             #    Push the current string we're mapping again
         2£           #    Only leave the first 2 characters (its id and the letter &quot;A&quot;)
           l          #    Lowercase the &quot;A&quot; to &quot;a&quot;
            S         #    And convert it to a list of characters: [id, &quot;A&quot;]
             δå       #    Check in each string whether it contains the id and &quot;A&quot;
               P      #    Check for each whether it contained BOTH the id AND &quot;A&quot;
                ài    #    If a child/parent is found for which this is truthy:
                  „Aa #     Push string &quot;Aa&quot;
                 ë    #    Else:
                  „A_ #     Push string &quot;A_&quot;
                      # (after which the mapped result is output implicitly)