Boyfriends cat attacks me

I have a huge and actually pretty deep scratch on my leg from about a week ago his cat grabbed ahold of me and attacked me, he just bit me just then, like really hard, and with his claws dug into me, again he drew blood. He's also been more vicious with me lately, like I can't go near him. 
Like is it the baby? Does he realize there's a baby inside of me and he don't like it?
He's never been like this before, I mean he's always been a cranky cat, but not like this.