The new NextSeq 550 sequencing machine at UCSF’s clinical lab on Berry Street looks like a microwave with a computer keyboard, but to microbiologist Charles Chiu, it is the key to California’s fight against the deadliest, most invasive virus to strike humanity in decades.

The professor of medicine at UCSF will be using the black contraption, installed Friday, to sequence the genomes of the viruses infecting hundreds of COVID-19 patients in the Bay Area during the next few weeks.

“We will be running this 24 hours a day,” said Chiu, wearing a white lab coat and purple rubber gloves as he fiddled with the keyboard and opened the door to a compartment where slides holding genetic material are scanned. “I see no reason why we can’t sequence the genomes of every case.”

Chiu, 48, of San Francisco is one of the top infectious disease specialists in the world. He has assembled an expert team of scientists who have also used his research lab on 16th Street to find critical clues about where the viral outbreaks in the Bay Area came from and how quickly the disease is spreading.

His work, which includes tracking mutations and the spread of infection, is a crucial cog in our understanding of what makes this unique coronavirus tick and, eventually, how we might control or eradicate it and similar viruses.

A married father of 13- and 11-year-old boys, Chiu was born in Missouri to immigrants from Taiwan. He is director of the UCSF-Abbott Viral Diagnostics and Discovery Center. It was one of the first labs to sequence strains of the H1N1 influenza virus, which was associated with the 1918 Spanish flu pandemic. Chiu has sequenced 2,000 unusual strains of HIV and strains of the Zika virus.

He has already analyzed nine samples from the more than two dozen passengers who tested positive for the coronavirus on the Grand Princess cruise ship and is close to pinpointing the origin of those cases.

“Those sequences belong in the same cluster as the infection in Washington state,” Chiu said. “They really suggest a link between Washington state and California.”

The Grand Princess, whose home port is San Francisco, departed Feb. 21 for a trip to Hawaii with more than 3,500 people aboard. It was halted off the coast of San Francisco after being called back because passengers from the ship’s previous cruise, to Mexico, had tested positive for the disease.

Among the passengers on the Mexico trip who tested positive was a 71-year-old Placer County man who died. Five people from Sonoma, Contra Costa and Alameda counties who were on that cruise also were infected.

Chiu has collected seven samples from passengers on the Hawaii cruise and, with help from the California Department of Public Health and the Washington State Department of Health, compared them with samples from two of the infected passengers on the Mexico cruise.

“All of them were mapped to the Washington state strain,” known to scientists as the WA1 strain, Chiu said. “So the first cruise was basically the cause of all of those cases on the second cruise.”

Chiu traced the disease back to a Mexico cruise passenger from Sonoma County who apparently transmitted the virus to the others, including crew members. They probably infected passengers on the Hawaii cruise.

Authorities are still tracing the links and validating the findings, but Chiu believes the infected Sonoma County man, who survived the disease, either visited Seattle before the cruise, came in contact with someone from Washington state or contracted it from an as-yet unidentified passenger from Washington state.

Chiu said tracking the spread of the virus through genetics is possible because coronaviruses are known to have one to two mutations per month, allowing genomic sequencing to track a particular strain back to its origin.

The rate of mutation in coronaviruses is much slower than it is with the influenza virus, which averages about eight to 10 mutations per month. The mutations are why it is impossible for humans to become immune to the flu, which comes back in a new form every year.

Chiu used genomic sequencing to identify California’s first case of community transmission — a Solano County woman who was infected by an unknown source. She and a Santa Clara County woman who was subsequently diagnosed had not traveled any place where the coronavirus was known to have spread, and had not had contact with anyone who was infected.

The Solano County woman transmitted the disease to two health care workers. Chiu found that the three of them had a strain that was different from the others he has documented. In all likelihood, he said, it originated in China and was transmitted just to her by a traveler.

“Perhaps by identifying that patient (and isolating her), we might have been able to stop that strain from multiplying,” he said.

A separate strain seen nowhere else in the United States was also found in a San Benito County person who returned from a visit to China.

“It’s quite different from what is going on in Washington state, where all the cases are related to that single strain,” he said about the 20 genomes that have been sequenced in that state, all of which originated in China.

With the new sequencing machine, Chiu expects to quickly analyze the 30 positive samples he has in the lab and more than 200 positive swabs he expects to receive from Santa Clara County on Monday. It will, he said, dramatically increase the amount of genetic information available about the coronavirus and its rampage.

“Who knows what it will look like when we get the 200 samples,” he said. “We’re basically scrambling to keep up. The situation changes every day.”

The problem with tracking the various strains, Chiu said, is that China has not done much genomic sequencing — only 50 sequences are available. That’s another reason Chiu’s work is so important.

“I’m now investigating a cluster in Santa Clara,” in which four people in a single building tested positive, Chiu said. “A key public health question is, ‘Are these all related, or is it just by chance that four people who had been infected separately were in the same place?’ Knowing this might affect how you implement public safety precautions.”

Chiu is sequencing coronavirus genomes from cases in San Francisco and Berkeley, and from Sacramento, Santa Clara, San Mateo and Solano counties.

During the past week, the Washington strain has spread into California counties, he said. It means that what started out as a series of disconnected clusters of different strains is growing into a large conflagration of infection.

“It concerns me that the Washington strain appears to be infiltrating California,” he said. “You could think of it like a fire, with sparks flying out. If all we are seeing is these sparks, the hope is that it never evolves into a fire. Are we still at the spark stage, where social distancing, quarantining, would make a difference? The question for us is, do we have the ability to contain this?”

Another question is whether mutations can make the virus worse.

“It’s hard to answer that question,” he said. “I think over time we will find out if it becomes more transmissible or more deadly. Those questions take time.”

One positive, he said, is that this virus mutates slowly. While the RNA changes slightly, the virus’ proteins and characteristics don’t. The only way to tell whether the strength of the strain or the way it is transmitted has changed, he said, is to examine a lot of samples.

Even though influenza mutates every year, we’re not worried about it getting more deadly,” Chiu said. “It’s unlikely that (the virus) will mutate to the point where it gets more deadly.”

Chiu is also trying to solve the state and the country’s biggest problem — the lack of diagnostic testing. California has the capacity to process only about 200 swab tests a day, largely as a result of the nationwide shortage in test kits, regulatory delays and a lack of equipment, he said. His lab is developing a test that will give a result in 30 minutes.

“Our goal is to develop the next generation of tests,” he said. “Two hundred tests is not good at all. We need thousands, tens of thousands.”

Soon, all outpatient samples from the Bay Area and much of the state are expected to be sent to his lab. That would allow him to sequence more genomes and find out more about the disease.

Peter Fimrite is a San Francisco Chronicle staff writer. Email: pfimrite@sfchronicle.com. Twitter: @pfimrite