Pregnancy test ?

How soon should you take a pregnancy test ? I had unprotected sex a week ago while, I was on my period is there a chance I could be pregnant?