Technical replicates not recognised

264 views
Skip to first unread message

Alessandro Caioli

unread,
Dec 1, 2024, 12:19:53 PM12/1/24
to MSstats
Hi. I'm running an experiment with 13 bioreplicates, 2 technical replicates, 3 time points and 2 conditions. Each replicate has 8 fractions. The MaxQtoMSstatsFormat() function appears to run smoothly and correctly identifies the fractions, but the dataProcess() function is not recognising any technical replicates. Currently I receive this output:

                            Group1 Group2
             # runs          7         6
    # bioreplicates    7         6
 # tech. replicates   0         0

Which is immediately followed by this error:

simpleError in .Primitive("length")(newABUNDANCE, keep = TRUE): 2 arguments passed to 'length' which requires 1>
In addition: Warning messages:
1: In dcast.data.table(run_info, GROUP_ORIGINAL + SUBJECT_ORIGINAL ~  :
  'fun.aggregate' is NULL, but found duplicate row/column combinations, so defaulting to length(). That is, the variables [GROUP_ORIGINAL, SUBJECT_ORIGINAL, FRACTION] used in 'formula' do not uniquely identify rows in the input 'data'. In such cases, 'fun.aggregate' is used to derive a single representative value for each combination in the output data.table, for example by summing or averaging (fun.aggregate=sum or fun.aggregate=mean, respectively). Check the resulting table for values larger than 1 to see which combinations were not unique. See ?dcast.data.table for more details.

Which I'm assuming is the direct consequence of the fact that the technical replicates are not recognized (I may be wrong though).
I'm fairly sure the problem lies somewhere in the annotation file I created for the analysis. I tried to also include a TechReplicates column as I saw this was suggested in other similar cases, but I still get the same results.
I'm attaching the annotation file I'm using. If you have any suggestions on how to overcome this issue or shed any light into what I'm doing wrong it'd be greatly appreciated.

Thanks in advance,

Alessandro

annotation_google_groups.csv

Anthony Wu

unread,
Dec 4, 2024, 12:27:29 PM12/4/24
to MSstats
Hi,

Would you be able to also share your input dataset (or a subset of it)?  With the input dataset, we can look to reproduce the error on our side and further diagnose the problem/solution.

Anthony

Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Tushita Gupta

unread,
Dec 10, 2024, 2:25:32 PM12/10/24
to MSstats
Hi,
I am running the experiment with 4 conditions each with 3 technical replicates each having 7 fractions. I am also getting the same error. and my technical replicates are not identified. Could you please guide me on this.

annot.csv
Message has been deleted
Message has been deleted

Alessandro Caioli

unread,
Dec 10, 2024, 2:25:56 PM12/10/24
to MSstats

Hi Anthony,

I've been trying to reply to this message for the past week, but my messages kept getting deleted, I'm not sure why.

Anyway, thanks for getting back to me and sorry for the late reply. Yes, I can share a subset of the proteinGroups file, as well as the evidence file. Problem is that the evidence file is 71 MB and I can't attach it here. Is there an email I can send a google drive invitation to so that I can share these files?

Thanks for the help,


Alessandro

Ivan Gregoretti

unread,
Dec 10, 2024, 4:40:39 PM12/10/24
to MSstats
Hello Tushita.

A quick question so that I (and others) can follow your experiment design.

You mentioned "4 conditions each with 3 technical replicates each having 7 fractions".

Are your "3 technical replicates" non independent observations?
For example, are those 3 mass spectrometry runs of only one sample of tissue of a single animal?

To be clear, the replicates would be independent if the 3 replicates were from tissue extracted from 3 different animals.

Independence and non-independence of observations must be very consequential for instructing msstats processing and interpretation or results.

Thank you.

Ivan

Anthony Wu

unread,
Dec 17, 2024, 7:05:40 PM12/17/24
to MSstats
Hi all,

First, thank you Alessandro for sharing your dataset and annotation file.  Upon initial inspection, I believe there may be a bug in how MSstats handles datasets with both technical replicates and fractions.  I'll provide further updates as I dive deeper into the code.  

Regarding Ivan's question, to clarify what MSstats does, MSstats assumes technical replicates are independent observations.  But also, if 3 technical replicates were extracted from the same tissue, that does not necessarily imply non-independence.  Non-independence means that they way you sample from a tissue for the first MS run affects the way you sample the tissue for the second MS run, e.g. sampling one area of the tissue for the first MS run, then intentionally picking the other side of the tissue for the second MS run.  But I can see where independent sampling of the same tissue may not be feasible practically.

Tony

Alessandro Caioli

unread,
Jan 6, 2025, 12:16:15 PM1/6/25
to MSstats
Hi Anthony, sorry to bother. 
Just wanted to know if there was any update regarding the issue with the technical replicates not recognised.
Thanks in any case and happy new year,

Alessandro

Anthony Wu

unread,
Jan 6, 2025, 4:18:50 PM1/6/25
to MSstats
Hi Alessandro,

Thanks for checking in.  I'm working on the fix right now.  It seems to be more complicated than I expected so I can't provide any estimate of when it'll be completed yet.  I'll provide a further update next week on timelines.

Tony

Anthony Wu

unread,
Jan 7, 2025, 11:09:38 AM1/7/25
to MSstats
New update - I made a fix and I'll look to have the change pushed to bioconductor by early next week.  I'll provide further updates if anything changes.

Alessandro Caioli

unread,
Jan 7, 2025, 12:56:08 PM1/7/25
to MSstats

Hi Anthony, thank you so much for the update and for all the help you provided in addressing this issue. It's very much appreciated.
Have a great day,

Alessandro

Anthony Wu

unread,
Jan 13, 2025, 2:38:40 PM1/13/25
to MSstats
Hi all,

The update should be in bioconductor now.

Thanks,
Tony

Alessandro Caioli

unread,
Jan 14, 2025, 7:44:11 AM1/14/25
to MSstats
Hi Anthony, 
Thanks again for the help. I've been trying to update MSStats using Bioconductor, but I keep having the same issue. I also tried to uninstall and reinstall the package, but no luck. Is it possible that I'm doing something wrong or that the update is not online yet?

Anthony Wu

unread,
Jan 14, 2025, 1:09:57 PM1/14/25
to MSstats
Hi,

Have you tried ensuring that Bioconductor is at version 3.20?  I know that was my issue when I first tried to install/re-install.

if (!require("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install(version = "3.20")

Alessandro Caioli

unread,
Jan 14, 2025, 3:30:48 PM1/14/25
to MSstats

Hi! 
Yes, Bioconductor is at version 3.20, and R is 4.4.2, but that was a very good guess, I have to admit I didn't check that earlier. Not sure if this may have anything to do with it, but I'm on Mac. Tomorrow I will try installing MSstats in a different machine and see if anything changes.
As always thanks for the responsiveness,

Alessandro

Anthony Wu

unread,
Jan 14, 2025, 5:05:59 PM1/14/25
to MSstats
Hmm ok not sure what's going on there.  

If you end up still getting blocked, you could try out this command to install from Github for now.

devtools::install_github("Vitek-Lab/MSstats", build_vignettes = TRUE)

Alessandro Caioli

unread,
Jan 15, 2025, 7:59:31 AM1/15/25
to MSstats

Hi Anthony. Not sure why, but I'm still having the same issue, on two different machines. Following along the fixes you pushed in Github, it appears (but I may be wrong) that I do have the latest version (I'm looking for example at the function MSstatsMergeFractions), but for some reason I'm still having the same issue where the technical replicates are not recognised. Should I modify the annotation file in some way? I tried adding a TECHREPLICATE column, but nothing changes. 
Sorry for the nuisance, I tried to get a clearer idea of the issue by myself, but I can't seem to be getting anywhere.

Anthony Wu

unread,
Jan 15, 2025, 2:15:01 PM1/15/25
to MSstats
Hi,

What version of MSstats do you have?  Is it 4.14.1?  Are you using the same data files you had sent to me earlier?  

Alessandro Caioli

unread,
Jan 15, 2025, 2:52:58 PM1/15/25
to MSstats
Hi Anthony. Silly mistake on my end, I was indeed using the evidence and proteinGroups files I provided you (to be extra safe I was downloading it directly from the google drive folder), but I was inadvertently using another annotation file, which was missing the Run column. Apologies for wasting your time for something that I definitely should have noticed right away.
Thank you again for all the help, everything works smoothly now.
Have a great day,

Alessandro

Anthony Wu

unread,
Jan 15, 2025, 5:37:19 PM1/15/25
to MSstats
Awesome, glad everything is working for you now :D

Tony

Reply all
Reply to author
Forward
0 new messages