Vitek-Lab / MSstats

R package - MSstats
74 stars 46 forks source link

How to save list of the differentially abundant proteins as output file (.txt, .tsv or .csv) #47

Closed BenSamy2020 closed 3 years ago

BenSamy2020 commented 3 years ago

Greetings,

I would firstly like to thank you for providing a open-source Mass spectrometry statistical analysis tool. I am new to R-programming and currently following your MSstats tutorial provided at: https://msstats.org/wp-content/uploads/2020/02/MSstats_v3.18.1_manual_2020Feb26-v2.pdf

Currently, I at the section of 4.1.7 Finding differentially abundant proteins across conditions and step of:

**# get only significant proteins and comparisons among all comparisons

To simultaneoulsy control the overall FDR at the level, 0.05

SignificantProteins <- with(processedData.comparisons, ComparisonResult[ComparisonResult$adj.pvalue < 0.05, ]) nrow(SignificantProteins)

table for result

processedData.comparisons$ComparisonResult**

I would like to get the output of processedData.comparisons$ComparisonResult into a .txt file. I tried googling on how to print the output into a .txt file but failed multiple times using various functions (e.g. sink()).

Is it possible that you direct me to a resource where I can obtain the command to print the output into a .txt file?

Lastly, I would like to thank you for your assistance in advance.

Regards, Ben