RMarkdown in combination with OUTRIDER
0
1
Entering edit mode
m.plandsoen ▴ 10
@mplandsoen-23527
Last seen 4.0 years ago

I want to make a html report with Rmarkdown of an OUTRIDER script. But I get an error when it comes to calculation q (function: findEncodingDims() and plot in with plotEncDimSearch(q)) This function does work when I run only that part of the script in R.

```{r filter, echo=FALSE}
ods <- filterExpression(ods, minCounts=TRUE, filterGenes=TRUE)
```

```{r q, echo=FALSE}
ods <- estimateSizeFactors(ods)

# calculate optimal q (default zScore = 3)
q <- findEncodingDim(ods, params = seq(2, min(100, ncol(ods) -1, nrow(ods) -1), 2), zScore = 3)
plotEncDimSearch(q)
# best optimum is 2
ods <- controlForConfounders(ods, q = 2, iterations=15)
```


Error in `:=`(opt, encodingDimension[which.max(evalutionLoss)[1]]) : Check that is.data.table(DT) == TRUE. Otherwise, `:=` (...) are defined for use in j, once only and in paricular ways. See help (":="). Calls: <Anonymous> ... withVisible -> eval -> eval -> plotEncDimSearch -> := Execution halted

Is this a known problem, or what can I do to solve this?

Best regards,

Monique van Veghel

https://www.dropbox.com/s/89wi9wy8kn0puyq/Schermafdruk%202020-05-15%2013.01.24.png?dl=0

software error • 447 views
ADD COMMENT
0
Entering edit mode

Dear Monique,

Could it be that you use a cached ods object? To figure out where it goes wrong, can you split it up in the markdown script to see which function fails? It seems like that the optimization step did not run through and hence it can not find the best q inside the ods object.

Best, Christian

ADD REPLY

Login before adding your answer.

Traffic: 681 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