FragPipe-DIA-NN-MSstats question about annotation file

232 views
Skip to first unread message

Keriann Backus

unread,
Nov 28, 2023, 4:37:10 PM11/28/23
to MSstats
Dear MSstats team, 

 I'm working on trying to set up a DIA data processing pipeline for our lab using the FragPipe-DIA-NN combo and then MSstats. I was excited to see the DIANNtoMSstatsFormat function, which worked well for me, except for some trouble with the annotation file. When I take the experiment_annotation.tsv file directly from the DIA-NN output and use it without modification, I get the following message:
Error in .checkAnnotation(input, annotation) : ** Columns Condition, BioReplicate missing in the annotation. Please check the annotation file.

If I modify the annotation file to the structure recommended with the Run, Condition, and BioReplicate labels, the data is processed successfully and appears to be in the correct format for MSstats. However, when I try to run additional MSstats scripts (e.g. dataProcess on the MSstats formatted data, I encounter the following error.

Error in MSstatsMergeFractions(input) :
*** error : can't figure out which multiple runs come from the same sample.

Is there a way to restructure the annotation file to avoid this error and/or any other options to help with the data formatting so that it will be usable for MSstats? The fragpipe outputted annotation file and reformatted annotation file are attached and the DIA-NN output is here, as it is too large to attach.

Thank you for the help and apologies if this is a newbie-overly obvious question.

Keri

Keri
experiment_annotation-fragpipe-output.tsv
experiment_annotation-modified.tsv

Devon Kohler

unread,
Nov 29, 2023, 4:16:16 PM11/29/23
to MSstats
Hi Keri,

Could you post a small subset of the output of the DIANNtoMSstatsFormat function? I am wondering if the annotation information did not get mapped in correctly by the converter.

Best,
Devon

Keriann Backus

unread,
Nov 29, 2023, 5:06:53 PM11/29/23
to MSstats
Attached is a small subset of the output.

thank you

Keri
test.txt

Devon Kohler

unread,
Nov 29, 2023, 6:03:20 PM11/29/23
to MSstats
Hi Keri,

Thanks for sending this over. The condition and run were not added correctly by the converter (You can see the values in those columns are all NA). I think this is because you run names do not match the DIA-NN output. They should look something like "2022-02-09-KB-SY79-DMSO-DIA-2".

Best,
Devon

Keriann Backus

unread,
Nov 30, 2023, 5:19:22 PM11/30/23
to MSstats
Hi All,

Thanks to a lot of help from Alison Chaves, we came up with this workaround. I was unable to fix the original error by simply modifying the annotation file and instead also had to modify the DIA-NN output. It seems like this is caused by some syntax changes in the column headings of the DIANN output obtained from FragPipe. For reference, I'm running dplyr_1.1.3 diann_1.0.1 MSstats_4.10.0 BiocManager_1.30.22 MSstatsConvert_1.11.5.

diann_report <- diann_load("diann-output.tsv") %>%
    dplyr::mutate(Run = sub("2022-02-09-KB-SY79-", "", Run)) %>%
    group_by(Stripped.Sequence,
              Modified.Sequence,
              Q.Value,
              Lib.Q.Value,
              Lib.PG.Q.Value,
               Protein.Group,
               Precursor.Charge,
               Fragment.Quant.Raw,
               Run,
               Genes.MaxLFQ) %>%
      summarize() %>%
  dplyr::mutate(Condition = str_extract(Run, "dilution|DIA"),
                BioReplicate = str_extract(Run, "DMSO|DMSO|DMSO"),
                FragmentIon = NA,
                ProductCharge = NA,
                IsotopeLabelType = "L") %>%
         rename(StrippedSequence = Stripped.Sequence,
                ModifiedSequence = Modified.Sequence,
                ProteinNames = Protein.Group,
                QValue = Q.Value,
                LibQValue = Lib.Q.Value,
                LibPGQValue = Lib.PG.Q.Value,
                FragmentQuantCorrected = Fragment.Quant.Raw,
                PrecursorCharge = Precursor.Charge,
                Intensity = Genes.MaxLFQ)

annotation_file2 <- diann_report %>%
    as.data.frame() %>%
    dplyr::select(Run, BioReplicate, Condition) %>%
    distinct()
    ```
This seems to work as a temporary workaround, but i wanted to share with you all in case others encounter this issue.

Best,

Keri

Ivan Gregoretti

unread,
Dec 1, 2023, 11:25:05 AM12/1/23
to MSstats
Thanks for sharing!

Suniya Khatun

unread,
Jan 8, 2024, 5:58:30 AM1/8/24
to MSstats
Hi. 
I am having the exact same error but unlike this case during conversion it seems like the annotation file was read correctly and all columns added. I have attached a file with few rows of the data after the conversion.

Any help on what to do would be great. 

Kind regards

Suniya
Example_data_after_conversion_to_MSstatsFormat.xlsx

Devon Kohler

unread,
Jan 12, 2024, 1:09:44 PM1/12/24
to MSstats
Hi Sunya,

Is the protein name correctly mapped in the original PSM file? I am not sure what else could cause NA in the protein name column.

Devon

Keriann Backus

unread,
Jan 13, 2024, 1:39:10 PM1/13/24
to MSstats
Hi Sunya,

Very simple question--which version of FragPipe are you using? I found that some of these issues were fixed with the new v21 release. I think FengChao is still working on MSStatsPTM compatibility, so hopefully that will be in place soon. 

Best,

Keri
Message has been deleted

Suniya Khatun

unread,
Feb 7, 2024, 5:59:08 AM2/7/24
to MSstats
Hi Keri, 
Apologies for the late reply. 
I am using FragPipe v21.1 and MSstats version 4. 

Kind regards
Suniya
Reply all
Reply to author
Forward
0 new messages