Closed barnacj closed 10 months ago
Would you mind providing some runable code that I can use to reproduce the behavior? Preferably a minimal example, even without actual SomaScan data, that still generates the error you see, but without all the extra overhead of the SomaScan ecosystem.
From your example it looks like there are duplicated target names, though I'm not seeing that on my end. Which version of SomaScan are you working with?
In addition, I have notified @wschwarzmann in our Support Bioinformatics Team regarding duplicate Target
fields in annotations of SomaScan.
Thanks!
SomaScan v4.0 and v4.1 (and the upcoming v5.0) contain some duplicates in the Target name column header. The Target names tend to follow the UniProt ID. Because a SOMAmer is specific to an epitope, we can distinguish between different epitopes unique to specific proteoforms, or even unique epitopes on the same protein, even when UniProt doesn't distinguish. The Target Full Name column header often contains more unique information, such as if we're measuring a different isoforms or the N/C terminus of the protein. In cases where there is still duplication, the measurements can further be distinguished by the amino acid range the SOMAmers were selected against. This can be found in the annotated menu downloaded from https://menu.somalogic.com . In cases where even the amino acid range isn't even distinct, please reach out to techsupport@somalogic.com with your specific protein in mind, and the team will get back to you with any additional information we can provide.
Hi Stu,
Yes, it was a duplicate target name:
Workaround:
make.unique(data$Target)
Somascan 7k (v4.1)
SomadataIO v6.0.0
BW
James
A few closing comments:
bug
label since this isn't actually a bug with the code per se. The annotations can and do have multiple SeqIds to the same Target (sometimes intentionally).make.unique()
) seems perfectly reasonable and appropriate
Description
When I ran a t-test on my Somascan data comparing sex and tried to visualise using code below, I got an error message see picture):
Steps
I used the make.unique function on my_data$Target, which created Leptin and Leptin.1. This resolved the issue.
Priority Level
Thanks for reporting :partying_face:!