Scottish actor James McAvoy poses during a photocall to present his new film 'Wanted' in Berlin June 10, 2008. REUTERS/Johannes Eisele

LOS ANGELES (Hollywood Reporter) - In his first role since last summer's hit Wanted, James McAvoy has signed on to star in an untitled cancer-themed comedy that Nicole Holofcener will direct.

Formerly titled I'm With Cancer, the Mandate Pictures project is being produced by Seth Rogen, Evan Goldberg and Ben Karlin.

McAvoy stars as a 25-year-old who learns he has cancer. It's a character based on the real experiences of screenwriter Will Reiser, who was diagnosed with the disease in his mid-20s and successfully battled it over several years.

Rogen also has a role in the film.

Holofcener is known for directing character-driven comedies such as Lovely & Amazing and Friends With Money. Her next film, which is completed, is Please Give, starring Catherine Keener and Rebecca Hall.

McAvoy broke through with his role in The Last King of Scotland and starred with Keira Knightley in Atonement. It was his role as a reluctant assassin opposite Angelina Jolie in Wanted, however, that introduced him to broader audiences.

(Editing by SheriLinden at Reuters)