If you have a swab test kit, you can get DNA from deceased relatives. Give the kit to your funeral director and ask them to follow the directions and collect the sample.
Then mail the kit to MyHeritage or FamilyTreeDNA.
Ancestry and 23andMe only use spit kits, and it is now too late to collect a sample in that manner.
In most U.S. states, unless the deceased left explicit instructions or restrictions, the family generally has broad power to authorize procedures like getting DNA from deceased relatives. The rights to control a dead person’s body and what is done with it typically pass to the next of kin or a legally designated representative (like an executor or personal representative).
Ethically, this remains a complex area, with increasing emphasis on the balance between respecting the deceased’s autonomy and benefits to living relatives; absent explicit prior refusal, family interests tend to prevail.
The ethical conflict is between respecting the deceased’s presumed privacy/autonomy and the potential benefits to surviving relatives (such as health risk assessment or closure through genealogy).
Some studies and ethical frameworks suggest that if genetic information will significantly benefit relatives, the family’s interest may ethically outweigh the deceased’s unexpressed or ambiguous wishes.
If the deceased left explicit wishes prohibiting genetic testing or the use of DNA samples, however, these should generally be respected.