If a hard rock song is in a particular key can the riffs involved in them be in a different key? For instance in the song welcome to the jungle by guns n roses, on the line "we are the people that can find"(about 53 seconds in the song) on the word people there is a riff that starts and I was wondering if that riff is in the same key as the song ( E minor). I want to find this out because lets say you were messing around on your guitar and you happened to stumble about that exact riff...how would you analyze it???

The riff actually is a bunch of chords on the A string that is like this (the single notes represent the power chord root)


Would that riff be in A major???
Nah the song is in E. There's a riff on the A, then on E. Pretty standard stuff.
And no, Guitar Hero will not help. Even on expert. Really.