Both of those examples are in correct.
Blood sample:
npr.org/sections/13.7/2016/02/12/466379200/can-you-tell-your-ethnic-identity-from-your-dna
Consider: Even if you are a descendant of Shakespeare, there is only a negligible chance of your having any of his DNA. This is because autosomal DNA gets passed on randomly. Shakespeare's kid probably had 50 percent of his DNA; his kid in turn, on average, a quarter, and so on. Within 10 generations, Shakespeare's DNA has spread out and recombined so many times that it doesn't even really make sense to speak of a match. Putting the same point the other way, each of us has so many ancestors that we have no choice but to share them with each other. Moreover, we don't share any DNA with the vast majority of them. True, you will share Y-chromosome DNA or mtDNA with very distant ancestors, but these make up a vanishingly small percentage of your total ancestry.
The truth is, you have your history and your genes have theirs. There is a very large class of different possible human histories that could have produced in you just the genetic code that you have. And, at the same time, there is a very large class of different genomes that you might now have as a result of a single, actual history of your relatives.
The bottom line: You can't read off your identify from your genetic code.
livinganthropologically.com/biological-anthropology/race-reconciled-debunks-race/
Here, they take a set of bones from “Mr. Johnson” and compare them to a world database: “The results from these analyses fairly unambiguously estimate Mr. Johnson’s origin as an Easter Islander” (Konigsberg et al. 2009:81). However, since Mr. Johnson’s bones were found in Iowa, plugging in the Iowa probabilities allows Mr. Johnson to be reliably predicted as white. Forensic anthropologists base their estimates on the known prior composition of the population. If the same bones from Mr. Johnson had been found in Hawaii, they would have estimated “Easter Islander” or if found in Gary, Indiana, they would have estimated “American Black”:
Using the Iowa priors, the highest posterior probability is for “American White” at 0.6976. The identification of “Easter Islander,” which had the highest posterior when we used an uninformative prior, now has a relatively low posterior probability (0.0449). In contrast, using the Hawaii priors the posterior probability that “Mr. Johnson” was an “Easter Islander” is 0.9068, whereas the posterior probability that he was an “American White” was 0.0188. Using the Gary, Indiana prior the highest posterior probability (0.5342) was for “American Black” with “American White” having the second highest posterior probability (0.2728). (Konigsberg et al. 2009:82)
Wow. Forensic anthropologists do not determine race from bones.
What actually happens is forensic anthropologists match bones probabilistic frequencies against known existing assortments. Those assortments can be anything socially relevant. Changing the context of bone discovery could lead to different predictive classification–of the same bones. “The use of different priors also shows the importance of prior information, as ‘Mr. Johnson’ would have been classified as a Pacific Islander had his remains been found on Hawaii and as an ‘American Black’ had his remains been found in Gary, Indiana” (Konigsberg et al. 2009:83).
Forensic anthropologists “often do bring prior information to their cases, though this information is typically implicit, unstated, and not quantified” (Konigsberg et al. 2009:84). Estimates are always probabilities, and probabilities rely on pre-existing information, such as a self-reporting census. Rather incredibly, the authors conclude that “forensic anthropologists are not particularly adept at identifying races when they must deal with a very heterogeneous population at large, and this is the one setting in which a definitive racial identification would be useful” (Konigsberg et al. 2009:86). Guessing Mr. Johnson’s bones, when found in Iowa, were “probably white” is a guess anyone could make based on the Iowa census.
A 2018 example of how forensic anthropologists must bring prior information to their analyses can be seen in Richard L. Jantz’s Amelia Earhart and the Nikumaroro Bones: A 1941 Analysis versus Modern Quantitative Techniques. Jantz demonstrates all the bone measurements, but also reveals that identification depends upon “prior odds”: “It is often impossible to assign specific numbers to the prior probability, because it depends on how the non-osteological evidence is evaluated, and different people will usually evaluate it differently”