Entering edit mode
Is it possible to a add column directly to metadata in SummarizedExperiment
? I tried to add a column named Other
to metadata and later fill it with my additional data. I did:
experimentSummary$rnaseq = cbind(mcols(experimentSummary$rnaseq),"Other")
Which seem like removing all original metadata and only "Other" exists, original metadata is lost
I tried also:
experimentSummary$rnaseq = cbind(colData(experimentSummary$rnaseq),"Other")
which seems to work inspecting the object with View(experimentSummary)
but there is something wrong with format of the metadata. Also column name is "Other"
with quotation marks and all rows in that column are filled with "Other"
string.
Hi Michael, it didn't work. I also tried to rename one spare (empty, the 5th) column with
also, didn't work, than got the vector of names using
then changed name of the 5th (empty) column into my "Other"
than tried to rename all the columns
again no result, so I tried
it seems to work but the
experimentSummary
object changed its volume from 5MB to 61.9MB ?!!!I am not sure is it OK, I think such operation should not affect the object size.
What could be wrong?
Best regards, Marcin
I'm a little confused why my suggestion didn't work, can you make a reproducible example and provide the error output?
Hi, your example worked exactly as you expected. But not my case. Could you download https://www.ebi.ac.uk/gxa/experiments-content/E-MTAB-2836/static/E-MTAB-2836-atlasExperimentSummary.Rdata
and add there one column
Great, thank you very much! That is what I was looking for! Best regards, Marcin