Does Romans 7:20 contradict Genesis 4:7? In contrast with Romans 7:20: 


  But if I am doing the very thing I do not want, I am no longer the one
  doing it, but sin which dwells in me. [NASB]


Genesis 4:7 states:


  “If you do well, will not your countenance be lifted up? And if you
  do not do well, sin is crouching at the door; and its desire is for
  you, but you must master it.”


Are these Scriptures contradictory, and how does mainline Christianity interpret each?
There is no contradiction, however it should be noted that in Genesis 4:7 that is an intentional sin, and in Romans 7:20 it concerns unintentional sin. 

The difference between the two is whether or not the perpetrator knows that it is a sin and commits it anyway, or does so out of ignorance or deception as in the case of Eve who was beguiled.