http://www.cgrcpaonline.com/MENU/news/residentaliens/residentaliens.asp
Resident Aliens ... You are a resident alien of the United States for tax purposes if you meet either the green card test or the substantial presence test for the calendar year (January 1–December 31). ...
Green Card Test ...
the option of Dual-Status Aliens may be applicable to your situation