Skip to content

Error in dataProcess() #57

Closed
Closed

Description

@Douerww

My data comes from here.
When I run the dataProcess() function, it will report an error:
Aggregation function missing: defaulting to length
Error in factor(work$RUN, levels = unique(work$RUN), labels = seq(1, length(unique(work$RUN)))) : invalid 'labels'; length 2 should be 1 or 1

If this helps, my code is as follows:
image

I have viewed the MSstats code on Github, but I didn't find relevant information, how should I solve it?

Activity

  1. mstaniak commented on Jul 1, 2021

    @mstaniak
    Contributor

    Hi,

    looks like you are using old version of MSstats (we retired the cutoffCensored parameter). Please check if the problem persists with v4.0.1

  2. mstaniak commented on Jul 1, 2021

    @mstaniak
    Contributor

    Sorry about the late response, not sure why I missed the issue

  3. Douerww commented on Jul 4, 2021

    @Douerww
    Author

    Thanks for reply. After I updated the version of MSstats(v4.1.1), the error message turned into it:
    image
    and my code is:
    image

    The rest of my data (also from this site) worked, but I couldn't find the difference between error data and normal data.

  4. mstaniak commented on Jul 4, 2021

    @mstaniak
    Contributor

    Thanks, looks like the problem carried over from v3 to v4. I'll check what's going on there

  5. mstaniak commented on Jul 4, 2021

    @mstaniak
    Contributor

    Is this experiment label-free? If so, there should be a single value per feature per run, I can see two values in many cases. They should be aggregated

  6. Douerww commented on Jul 5, 2021

    @Douerww
    Author

    This experiment is label-free, and is the feature refer to PeptideSequence, PrecursorCharge, FragmentIon, ProductCharge?
    If so, I didn't find two same features in same run.

  7. mstaniak commented on Jul 5, 2021

    @mstaniak
    Contributor

    My bad, I misread the columns. I'll check again

  8. mstaniak commented on Jul 5, 2021

    @mstaniak
    Contributor

    Hi,
    I found the problem, I just need a bit of time to figure out if it's a problem with the annotation of the dataset (perhaps adding "TechReplicate" column to annotation can solve it) or an implementation problem. I'll let you know as soon as I can

  9. mstaniak commented on Jul 5, 2021

    @mstaniak
    Contributor

    @Douerww are some of the runs here considered technical replicates?

  10. Douerww commented on Jul 5, 2021

    @Douerww
    Author

    yes, it is, in this file

  11. mstaniak commented on Jul 5, 2021

    @mstaniak
    Contributor

    I'll double check the solution with the team, but hopefully it will be just a minor change in your annotation

  12. Douerww commented on Jul 5, 2021

    @Douerww
    Author

    thanks!

  13. mstaniak commented on Jul 5, 2021

    @mstaniak
    Contributor

    obraz

    We made this example to show you what should be the correct annotation for this dataset. Does it help? Current annotation appears to be wrong. Please let me know if you can fix the annotation based on this screenshot and if dataProcess works with the updated dataset

  14. Douerww commented on Jul 6, 2021

    @Douerww
    Author

    OK, I will check the annotation based on this screenshot, and test dataProcess again, thanks!

  15. Douerww commented on Jul 7, 2021

    @Douerww
    Author

    Hi, we think the SDRF annotation file has no problem after a discussion. Can you check the expdesign file to find the problem?

  16. 5 remaining items

  17. mstaniak commented on Jul 9, 2021

    @mstaniak
    Contributor

    how many conditions are there in this experiment?

  18. Douerww commented on Jul 9, 2021

    @Douerww
    Author

    3: breast tumor (1-3 cm) distant tissue, breast tumor (1-3 cm) distant tissue and breast tumor tissue

  19. mstaniak commented on Jul 9, 2021

    @mstaniak
    Contributor

    Exactly, and I counted 9 conditions, because bioreplicate ID was appended to Condition ID. Is this correct?

  20. Douerww commented on Jul 9, 2021

    @Douerww
    Author

    unique(out_msstats["Condition"]) shows 3 conditions, do you mean that MSstats is calculated together with Bioreplicate and Condition?

  21. mstaniak commented on Jul 9, 2021

    @mstaniak
    Contributor

    obraz
    then we are looking at different datasets

  22. mstaniak commented on Jul 9, 2021

    @mstaniak
    Contributor
    > unique(out_msstats$Condition)
    [1] "Homo sapiens|breast|not available|breast epithelium|not available|female|breast tumor tissue|Breast cancer|not applicable|P1|not available|1"                  
    [2] "Homo sapiens|breast|not available|breast epithelium|not available|female|breast tumor tissue|Breast cancer|not applicable|P2|not available|2"                  
    [3] "Homo sapiens|breast|not available|breast epithelium|not available|female|breast tumor <1 cm near tissue|Breast cancer|not applicable|P3|not available|3"       
    [4] "Homo sapiens|breast|not available|breast epithelium|not available|female|breast tumor tissue|Breast cancer|not applicable|P3|not available|3"                  
    [5] "Homo sapiens|breast|not available|breast epithelium|not available|female|breast tumor <1 cm near tissue|Breast cancer|not applicable|P1|not available|1"       
    [6] "Homo sapiens|breast|not available|breast epithelium|not available|female|breast tumor (1-3  cm) distant tissue|Breast cancer|not applicable|P1|not available|1"
    [7] "Homo sapiens|breast|not available|breast epithelium|not available|female|breast tumor (1-3  cm) distant tissue|Breast cancer|not applicable|P3|not available|3"
    [8] "Homo sapiens|breast|not available|breast epithelium|not available|female|breast tumor <1 cm near tissue|Breast cancer|not applicable|P2|not available|2"       
    [9] "Homo sapiens|breast|not available|breast epithelium|not available|female|breast tumor (1-3  cm) distant tissue|Breast cancer|not applicable|P2|not available|2"
    
  23. Douerww commented on Jul 9, 2021

    @Douerww
    Author

    image

  24. mstaniak commented on Jul 9, 2021

    @mstaniak
    Contributor

    Why/how is your input different from the linked file?

  25. Douerww commented on Jul 9, 2021

    @Douerww
    Author

    Oh, this is my overesight. I originally guess because the Condition column name is too long, and we need is the intermediate real Condition,so I handled the condition column. But the out_msstats before and after running DataProcess are also wrong.

  26. Douerww commented on Jul 9, 2021

    @Douerww
    Author

    image
    image

    I only extract the real useful information in the original Condition column to generate a new out_msstats file, but run them all report the same error.

  27. Douerww commented on Jul 16, 2021

    @Douerww
    Author

    Hi, I changed summaryMethod = 'TMP' to summaryMethod = 'linear', then it can run normally. But there is a warning message:
    In summary.lm(fit) : essentially perfect fit: summary may be unreliable

  28. mstaniak commented on Jul 20, 2021

    @mstaniak
    Contributor

    Hi, linear is not the recommended summarization method. Please try adding a TechReplicate column to indicate technical replicate

  29. mstaniak commented on Jul 20, 2021

    @mstaniak
    Contributor

    If the warning about perfect fit is coming from dataProcess, it's completely harmless

  30. mstaniak commented on Sep 24, 2021

    @mstaniak
    Contributor

    Hi,

    it was a legitimate error, but the message or lack of message was wrong. One thing that can be done to solve this is to add TechReplicate column and import the data using updated version of MSstatsConvert:
    devtools::install_github("Vitek-Lab/MSstatsConvert", ref = "hotfix-techreplicate")
    but it needs further discussion. I'm moving this discussion to #65 and related pull request. It will be solved (either via TechReplicate column or better error message) in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions