`lowess` returns 0 for points of an exact fit after robustness iterations
Los mantenedores suelen responder en 1 día
@aviralgarg05 ya está trabajando en esto.
Desde el 17/11/2026.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 74/100
Línea de trabajo
Empieza en stats.py, líneas 116-121, donde la iteración de robustez decide si un residuo absoluto mediano de exactamente 0 significa un ajuste exacto; ese umbral es el arreglo. Ejecuta el fragmento de reproducción para confirmar que iter=1 pasa mientras que iter=5 devuelve 0 en los puntos 44-49, luego varía la pendiente y el intercepto para comprobar que la tolerancia no sea demasiado amplia. ds.py:480 muestra al llamador en el filtrado independiente, pero el issue dice que el efecto de padj no está verificado, así que apunta a las pruebas de lowess. Hecho significa que ambos recuentos de iteraciones se mantienen dentro de 1e-6 de la línea y que las pruebas de stats existentes pasan.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
After a robustness iteration, stats.lowess weights points by their residual over six times the median absolute residual; on an exact fit the residuals are rounding noise, so some points get weight 0, and where a whole neighbourhood does, lstsq returns beta = 0 and the fitted value is 0, as at points 46 to 49 of the line y = 3 - 7.5x with frac=0.1, iter=5; a local linear regression of points on a line should return the line, as the same call does with iter=1. stats.py:116-121 treats only a median of exactly 0 as an exact fit; treating a median below a small multiple of the targets' scale as zero would fix it.
lowess smooths the rejection counts of independent filtering (ds.py:480), whose plateaus are locally exact fits; we have not looked for a dataset where this changes padj.
Source line numbers refer to commit 2ca3b74.
Reproduction
import numpy as np
from pydeseq2.stats import lowess
x = np.linspace(0.1, 0.95, 50)
y = 3 - 7.5 * x
for iterations in [1, 5]:
fit = lowess(x, y, frac=0.1, iter=iterations)
off = np.flatnonzero(np.abs(fit - y) > 1e-6)
print(f"iter={iterations}: points off the line {off.tolist()}")
if len(off):
print("fitted:", fit[off].round(4).tolist())
print("line:", y[off].round(4).tolist())
Expected: no points off the line for either number of iterations.
Actual, with PyDESeq2 0.6.0:
iter=1: points off the line []
iter=5: points off the line [44, 45, 46, 47, 48, 49]
fitted: [-3.373, -3.4016, 0.0, 0.0, 0.0, 0.0]
line: [-3.4745, -3.6046, -3.7347, -3.8648, -3.9949, -4.125]
Split out from #491.
- Lenguaje dominante
- Python
- Estrellas
- 770
- Forks
- 98
- Merge medio
- 19 h 55 min
- PR fusionados (30 d)
- 45
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de scverse/PyDESeq2
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
`irls_solver` does not enforce `min_beta` when IRLS converges, and documents `max_beta`'s default as -30Quizá libre de nuevo @aviralgarg05 la tomó hace 15 días y no hay ningún pull request abierto. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
scverse/PyDESeq2#521 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
`MAP_dispersions` of refitted genes keep the value from before outlier replacementQuizá libre de nuevo @aviralgarg05 la tomó hace 15 días y no hay ningún pull request abierto. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
scverse/PyDESeq2#519 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
`prior_LFC_var` is squared in the Wald test's ridgeQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
Todos los issues de scverse/PyDESeq2
Issues similares
-
Make the "%" unit spacing the same in the web and in A10Posiblemente ocupada @kragent66-glitch la tomó hoy. Abiertobug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
maiychrus25/OpenTea-DX-OS#226 · 1 comentario ·
-
ci severity: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
TMHSDigital/Spackle#205 ·
Los mantenedores suelen responder en 1 día
-
pkg:lgm type:chore upstream-gaussx
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
jejjohnson/pyrox#610 ·
Los mantenedores suelen responder en 1 día
-
changelog investigate
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
ramnes/notion-sdk-py#523 ·
-
feature-request
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
open-telemetry/opentelemetry-python#5994 ·
Los mantenedores suelen responder en 2 días