delete samples from summarizedExperiment
1
0
Entering edit mode
@annkolman78-21980
Last seen 4.6 years ago

Hi,

I would like to remove certain numbers of my samples from the rds-summarizedexperiment file. How I can do it using a file contains the samples I want to retain. I can do it with one sample (test = data[, data$SAMPLEID == "451", ) but not sure how I can do it with a list. Thank you for your help.

Anna

deseq2 • 1.4k views
ADD COMMENT
1
Entering edit mode
@james-w-macdonald-5106
Last seen 4 minutes ago
United States
test <- data[,data$SAMPLEID %in% c("451",<other sample IDs go here>)]
ADD COMMENT
0
Entering edit mode

Thank you, it worked, and instead of manually writing all samples ID , can I use a file with all my samples I want to keep? for example: head(samplestostay) SampleID 1 39 2 4 3 6 4 400 5 481 6 500 451

ADD REPLY
0
Entering edit mode

Yes. You just need a character vector of the IDs you want to keep. There are many ways of doing so, including reading in a file.

ADD REPLY

Login before adding your answer.

Traffic: 841 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6