J.S.
You haven't done anything wrong. Some people show affection in ways that are not physical. You're a hugger and a toucher, you're a family of touchers, and you expect that that's how others (including any children you have) will and should be hugging touchers too. You seem to think that if someone doesn't hug you back or feel like holding hands, avoiding touch, they can't be affectionate and therefore you've done something wrong to the point that she doesn't like you much. She then shows some independence and you take THAT as her not liking her dad much.
Perhaps she's simply not that into hugging and touching and THERE'S NOTHING WRONG WITH THAT. You did nothing wrong.
It's also perfectly acceptable for her to want to be with her friends and not want a parent to tag along. That means you did something right.
I would then have to ask if she shows affection in other ways. Does she draw you pictures or make things for you? Does she sing for you? Does she smile? Does she tell you she loves you? Does she occasionally snuggle up with you?
Now... as a mom to a daughter that has Autism Spectrum Disorder and has a comorbid diagnosis of Sensory Processing Disorder, I could take this teensy snapshot you've shared and say:
There's a possibility that she has some Sensory Processing issues, which would mean you'd have to learn about SPD in order to help her (not change her). You would want to learn WHY she has it. There's a great book you could probably borrow from the library called "Raising a Sensory Smart Child" that you may or may not recognize your child in.
As a mom to a daughter that has ASD, SPD, and other issues, I will also tell you that even if I tell you that she may just not be a hugging toucher and be developmentally on target for showing some independence, you absolutely MUST LISTEN to your Mom Instincts. If they tell you something is "off" developmentally and she might need some help and/or you need help in understanding her then talk to your pediatrician. Get her a neuro-psych evaluation from a specialist: Pediatric Neurologist; Developmental-Behavioral Pediatrician; Child Psychiatrist. Any of them can give your daughter an indepth evaluation and diagnosis that you could then, if there's something, bring it to her school and set up a Planning and Placement Team meeting (PPT) to request an Individualized Education Plan (IEP) where they can get her started with some therapies and help her in target areas if needed. You can also get her some outside therapies if needed to help her build tolerance to certain sensory issues.
Does she have issues with food textures and odors and flavors? Clothing textures? How loud sounds are? Types of sounds? Does she seem to react to the weather? Make eye contact? Does she perseverate/stim? Have OCD behaviors? Is she rigid regarding routines and/or her expectations with upcoming expected changes in routines? Does she have great difficulty when it comes to changes in her schedule and routine? Are mornings with wake up and getting ready for school difficult? Is she developmentally on target or consistently delayed?
Those will be just some of the questions you'll be asked during the evaluation process. Talk to your pediatrician about these things if they occur.