I got a rescue dog who had spent the first three months of his life in a chicken coop. I got him when he was about four months old. When he was about a year old he snapped at me and growled. I did some research and found out that the time he spent in the chicken coop was the very time that he needed human interaction but did not get it. So, it sort of messed him up.
I would suggest talking to your vet and seeing if he or she could recommend an animal behaviorist.