I have a template with lots of missing residues. I want to thread my target sequence onto the aligned parts of the template that are present without moving my target structure in these areas. 

In my target sequence, I also wish to know how to skip modeling the missing parts altogether, thus making the job a mere threading of aligned unknown regions onto the known ones. 

Is there a simple way to accomplish my task without doing too much manual alignment and residue listing? Please do post a code snippet if you can.

Thanks a lot.