viruses have DNA/RNA genes but they do not self-replicate. They need our cell machinery.
A gene "self-replicates" in an "emergent property" kind of way, in that it encodes the information necessary for its own future proliferation. A viral strand of DNA/RNA does the same thing, encoding the behaviors and structure of the virus such that it'll proliferate.
You know, like a spicy meme :)