An example of anthropomorphism in popular science writing:
"Remembering that the diameter of one atom is about 0.000 3µ [µm], we conclude that the particle of tobacco-mosaic virus measures only about fifty atoms across, and about a thousand atoms along the axis. Altogether not more than a couple of million individual atoms!
This figure immediately brings to our mind the similar figure obtained for the number of atoms in a single gene and brings up the possibility that the virus particles may be considered as 'free genes' that did not bother to unite in the long colonies that we call chromosomes, and to surround themselves by a a comparatively ponderous mass of cellular protoplasm."
George Gamow (1961) One, Two, Three…Infinity. Facts and speculations of science, Revised Edition, Dover Publications, Inc., New York
This can be considered anthropomorphism as genes are not the kind of entities which can be 'bothered' and make decisions about whether to unite or surround themselves.
Read examples of anthropomorphism in science
Note: this speculation is out of date: we now understand virus genomes to consist of at least several and usually many genes.
Referring to virus particles as 'free genes' can be considered the use of simile, and referring to chromosomes as colonies of genes as an example of metaphor.
Read about examples of science similes