Determinants of antigenicity and specificity in immune response for protein sequences