Question: Constructing a Summarised Experiment object
0
gravatar for mirca.saurty
20 months ago by
mirca.saurty0 wrote:

I'm having difficulties in creating a Summarised Experiment object with my data. I need this object to proceed with the scDD package. The instructions in the Vignettes of the scDD package are not very clear to me.  Can anyone help?

scdd • 383 views
ADD COMMENTlink modified 20 months ago by eshelden20 • written 20 months ago by mirca.saurty0

It would help if you could give some information on why you are not able to construct the SummarizedExperiment object. What have you tried? Which part is giving you trouble? What format is your data currently in? Have you tried going through the examples in the SummarizedExperiment package?

ADD REPLYlink written 20 months ago by keegan50

I've finally been able to create a SummarizedExperiment object but the assay slot is not empty. Thus, I cannot use the object to create a SingleCellExperiment object as input for the scDD package. I've tried creating the SingleCellExperiment object directly from my dataframe. Again, I'm having issues with the assays slot and the colData slot.

With my data, I cannot use the functions in the section 'Constructing a SummarizedExperiment' of the SummarizedExperiment vignette. I think my data might not be in the same format as the SD but I cannot create the SD object since the Rstudio keeps crashing every time I try.

My data comprises of log2 values of gene expression. The rows correspond the genes and the columns the samples. My dataset file is in csv format. I've tried going through the examples but I'm still having issues with the assays slot and the colData slot.

ADD REPLYlink written 20 months ago by mirca.saurty0

I'd guess that the class of the argument that you are trying to set the assay to is a data.frame; try with a matrix.

It's very hard to tell what difficulties you are having without something in the way of code.

ADD REPLYlink written 20 months ago by Martin Morgan ♦♦ 23k

I've been able to fix the colData issue. Now the problem is the NormCounts slot of the Assays.  The class of the assay argument is a matrix.  Below is the script I'm using and the error message I'm getting. CSCall is my dataset (table with gene names as rownames and sample names as column names) and condition is my dataframe with one column with only my conditions (no rownames).

> log2values <- as.matrix(CSCall)
> sce <- SingleCellExperiment(assays= list(Normcounts=log2values, Counts=log2values), colData=(condition))

> prior_param=list(alpha=0.01, mu0=0, s0=0.01, a0=0.01, b0=0.01)
> SCE <- scDD(sce, prior_param = prior_param, testZeroes = F, permutations=100)

Error in scDD(sce, prior_param = prior_param, testZeroes = F, permutations = 100) :
  Please make sure the 'SingleCellExperiment' object includes an assays slot named 'normcounts' that contains normalized counts on the original scale

 

Thank you for your help

 

ADD REPLYlink written 20 months ago by mirca.saurty0

Looks like the expectation is that the assays should be named 'normcounts' rather than 'Normcounts', i.e., capitalization.

ADD REPLYlink written 20 months ago by Martin Morgan ♦♦ 23k
Answer: Constructing a Summarised Experiment object
0
gravatar for James W. MacDonald
20 months ago by
United States
James W. MacDonald50k wrote:

Have you looked at the SummarizedExperiment vignette? There is a section titled 'Constructing a SummarizedExperiment' that might apply here.

ADD COMMENTlink written 20 months ago by James W. MacDonald50k

I've looked into this section but I can't create the object with my data.

ADD REPLYlink written 20 months ago by mirca.saurty0
Answer: Constructing a Summarised Experiment object
0
gravatar for eshelden
20 months ago by
eshelden20
eshelden20 wrote:

I've used TCGAbiolinks to create a SummarizedExperiment from the data available at the GDC. It might also be useful for working with files you have already downloaded, but I have not tried that.

ADD COMMENTlink written 20 months ago by eshelden20
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 168 users visited in the last hour