A niece of ragtime king Scott Joplin, whose music has been widely rediscovered 80 years after it first hit the popular charts, has been awarded more than $177,000 in copyright infringement damages in U.S. District Court in New York City.

Mary L. Wormley, a niece of Joplin's second wife, Lottie Joplin Thomas, was granted judgment against Joseph Abend and Olympic Records Corp., and Crown Publishers Inc., for part of the profits returned on a five-record album, "Scott Joplin: His Complete Works."

She was not available for comment.

Judge John M. Cannella ruled that Wormley, in her 60s and a retired domestic who lives in the Bronx, receive $73,242.46 from Olympic Records, producers of the disks, and $104,738.17 from Crown Publishers, distributors of the records. The total judgment came to $177,980.63.

Martin R. Cramer, attorney for the defendants, has filed a motion for retrial, and plans an appeal if retrial is denied.

Wormley has sued Olympic and Crown for infringing on her copyright ownership of the Joplin opera, "Treemonisha." The opera, which was premiered in Atlanta in 1972, more than 60 years after it was composed, makes up one side of one of the five records. At the time of the trial starting date in June 1976, more than 50,000 copies of the record set had been sold.

The defendants contended that Robert Sweeney, a retired assistant postmaster in Kansas City, Mo., owns the copyright to the opera. Sweeney, they said, assigned half of his copyright ownership to Abend.

The defendants also claim that Sweeney inherited the ownership from Eva Sweatman, and that she in turn had inherited ownership from her brother, Wilbur. The latter, a circus and minstrel musician, became trustee of the Lottie Joplin Thomas Trust in 1952 and transfered all rights to his own publishing company.