Skip to main content
. 2020 Dec 16;117(52):33117–33123. doi: 10.1073/pnas.2014241117
Algorithm 2: Splicing (β, d, A, I, kmax, τs).
1) Input: β, d, A, I, kmax, and τs.
2) Initialize L0=L=12nyXβ22, and set
ξj=XjXj2n(βj)2,ζj=XjXj2n(djXjXj/n)2,j=1,,p.
3) For k=1,2,,kmax, do
Ak={jA:iAI(ξjξi)k},
Ik={jI:iII(ζjζi)k}.
Let A~k=(A\Ak)Ik, I~k=(I\Ik)Ak and solve
β~A~k=XA~kXA~k1XA~ky,β~I~k=0,
d~=X(yXβ~)/n,Ln(β~)=12nyXβ~22.
If L>Ln(β~), then
(β^,d^,A^,I^)=(β~,d~,A~k,I~k),
L=Ln(β~).
End for
4) If L0L<τs, then (β^,d^,A^,I^)=(β,d,A,I).
5) Output (β^,d^,A^,I^).