Pursuing a Masters, trying to figure out the potential effects of my undergraduate transcript on PhD admissions Long story short, my transcript is quite the spectacle: I started off getting really good grades, but due to a lot of personal issues ended up graduating with a respectable, but lackluster GPA.  Unfortunately, I have a downward trend.  While my final GPA is slightly below 3.5, I have failed quite a few courses.  I'm getting a MSE in computer science, coming from an applied math background.  My undergraduate computer science GPA is really high, but my GPA in everything else is pretty low.  I'm confident that I will do exceptionally well in the CS MSE, but I have a few questions:


Are undergraduate courses unrelated to one's discipline factored into the PhD admissions decision making process?
Despite doing poorly in some math classes in my undergrad, will taking graduate level math courses and doing well in them essentially negate the fact that I did poorly in some classes as an undergraduate (did well in most of them)?


For reference:
I'm currently conducting research and should have good to outstanding recommendations.

I understand that for PhD programs, a common order of applicant evaluation is: 


Recommendations
Research
Transcript


and that I have valid reasons for my poor performance, nonetheless, I'm scared that they're going to look at my undergraduate transcript and just get scared off.  Any insight or advice would be greatly appreciated.
You're right to be concerned. Some places will be scared off—or more accurately, won't even see your application—because of your undergraduate record. But some won't. Some will see your strong record in computer science, in graduate classes, and in research, at the expense of other classes as a sign of passion/focus/geekery (which is a strong advantage in research) combined with immaturity (which most people grow out of).

PhD admission is a random process, a numbers game.  You have a high-variance record, so to be reasonably confident of admission, you should apply to a wider spectrum of places than someone with a more consistent record with the same average.

I strongly recommend discussing your concerns directly with your letter writers.  They have to make the case that the admissions committee should ignore the black marks in your record and focus on your considerable strengths—good performance in graduate classes, excellence in your chosen field, strong research ability, and so on.  (You can't really make that case yourself.) Your references may also be willing to contact colleagues directly, to convince them to pull strings on your behalf.

Also: PUBLISH!

Best of luck!