barcodeRanks unusual warning "In smooth.spline(x[new.keep], y[new.keep], df = df, ...)"
Entering edit mode
Last seen 9 weeks ago

Hi Everyone!!

I was using the DropletUtils barcodeRanks function as usual. However, it throws the following warning on my sce object. I don't quite understand what it means!!

bcrank_sce <- barcodeRanks(counts(sce))
Warning message:
In smooth.spline(x[new.keep], y[new.keep], df = df, ...) :
  not using invalid df; must have 1 < df <= n := #{unique x} = 14

I am not sure what it means because traceback won't return anything either. Also the kneeplot looks quite unusual: enter image description here

DropletUtils • 200 views
Entering edit mode
Aaron Lun ★ 27k
Last seen 17 hours ago
The city by the bay

The warning is just indicating that spline fit doesn't know what to do, and it's not hard to see why from your plot.

barcodeRanks() will first take all barcodes with total counts greater than lower; then it will try to identify the inflection point, based on the largest negative gradient; and then it will try to fit a spline to find the knee point. However - and I'm assuming that the truncated y-axis is showing powers of 10 - there's nothing going on above the default lower=100. There's no knee point or inflection point above the 10^2 mark, so it's little wonder that the function is confused.

You might be tempted to just set a lower value for lower=, but the knee point is occurring at a total count of ~50 or less. I would question whether the experiment worked at all - it looks nothing like a droplet-based dataset to me.


Login before adding your answer.

Traffic: 421 users visited in the last hour
Help About
Access RSS

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

Powered by the version 2.3.6