0

I am using DEP proteomics package to analyse my mass spectometry data. I want to remove the batch effect from the my data. So after the preprocessing of my data i want to download as a CSV file file so that i can upload into batch server. but I am not able to write as CSV. Whenever i try i am getting error (no method for coercing this S4 class to a vector)? I am new to R. i read something about this and still i don't have clear idea? can someone help me with this?

> data_se <- make_se(data_unique, LFQ_columns, experimental_design)

> LFQ_columns <- grep("LFQ.", colnames(data_unique))

> data_se_parsed <- make_se_parse(data_unique, LFQ_columns)

> is(data_se)

[1] "SummarizedExperiment" "RectangularData" "Vector" "Annotated"
[5] "vector_OR_Vector"

> data_se@metadata

list()

> View(data_se)

> colnames(data_se)

[1] "Ubi4_1" "Ubi4_2" "Ubi4_3" "Ubi6_1" "Ubi6_2" "Ubi6_3" "Ctrl_1" "Ctrl_2" "Ctrl_3" "Ubi1_1" "Ubi1_2" "Ubi1_3"

> write.csv2(data_se, "/home/dell/Desktop/Preoteomics_TMT_data/ubi_data_se.csv")

Error in as.vector(x) : no method for coercing this S4 class to a vector

1 Answers1

0

Sorry, the question is not too clear (not sure what you want to upload for example), but you can access and write to file what looks like mass spec readings using the following:

my_data <- data_se@assays@data@listData
write.csv2(my_data, "my_upload.csv")

It probably won't be in the format needed for your batch server, but that is a separate question.

Not sure if this is the data you want! If you have no luck here, try biostars, where this type of question is more common.

Rorio
  • 36
  • 5
  • I can explain better. I'm using DEP package to analyse my proteomic data. Before doing the protein differential set analysis (all previous steps were done including normalization and imputation), i just did the PCA to check how my data looks. It's scatterd (my contols are not in one group). I thought, batch effect colud be the reason. so I want to remove the batch effect. So i'm trying to extract data from here and like to upload in the batch server. – PraveenKumar Jul 23 '21 at 12:17
  • @PraveenKumar And the above does not work? – Rorio Jul 24 '21 at 18:53