"Macrocosm" is the 54th episode of Star Trek: Voyager, the 12th episode of the third season. The title borrows the philosophical term macrocosm, definable as a larger world that mirrors what exists in a miniature world, or microcosm.
Captain Janeway and Neelix return to Voyager after completing a trade mission with the Tak Tak race, but find the ship adrift with no signs of life but no apparent damage. Aboard, they investigate the empty ship when Neelix is sprayed with a mucilaginous liquid by an unseen creature, leaving him faint and weak. When Janeway goes to locate medical supplies, Neelix is abducted by an unknown life form. She makes her way to the bridge to send out a distress signal and assess the situation, but is bitten by a flying insect-like creature while there. She locates the crew lying unconscious in the mess hall, with strange growths on their necks that allow more of the insect creatures to emerge. She is attacked by a human-size version of the insects, but is able to make her way to sick-bay.
There, Janeway finds the Doctor waiting. The Doctor explains while she and Neelix were away, they responded to a distress call on a nearby Garan mining colony that reported a severe viral infection. The Doctor, being a hologram, had transported down alone believing the virus would not affect him. After discovering the virus was a macro-virus, able to reproduce at large scale, the Doctor provided necessary medical treatment and beamed back, unaware some of the macrovirus were also brought aboard. The virus invested the ship's bio-neural gel packs, and then soon the rest of the crew, using them to reproduce. The Doctor states the macrovirus senses any bio-electric field, forcing his to stay in sick bay to avoid being attacked. The Doctor treats Janeway and provides her with an antiviral gas to be distributed around the ship's environmental systems. The two escape into the Jeffreys tubes when the viruses start attacking the sick bay doors.
They split up as to give Janeway more opportunity to reach the controls, and the Doctor is soon overwhelmed by the macrovirus. As Janeway races for the controls, Voyager is attacked by the Tak Tak, who are responding to the distress call but believe the ship to be contaminated and ready to destroy it. Janeway reaches a holodeck and creates a simulation with numerous simulated persons - bio-electric signatures that draw the macrovirus to the holodeck. Once they are all inside, she traps them and releases the antiviral, killing the virus. She is able to warn off the Tak Tak in time. The Doctor is able to restore the rest of the crew and shares the antiviral formula with the Tak Tak before they continue on their way.