Mercurial > repos > vipints > rdiff
annotate rDiff/src/locfit/m/smooth_lf.m @ 2:233c30f91d66
updated python based GFF parsing module which will handle GTF/GFF/GFF3 file types
| author | vipints <vipin@cbio.mskcc.org> |
|---|---|
| date | Tue, 08 Oct 2013 07:15:44 -0400 |
| parents | 0f80a5141704 |
| children |
| rev | line source |
|---|---|
| 0 | 1 function z=smooth_lf(x,y,varargin) |
| 2 | |
| 3 % must (unlike R smooth.lf() function) give x and y. | |
| 4 % also R's direct=T is automatic. | |
| 5 % | |
| 6 | |
| 7 xev = x; | |
| 8 if (k>1) | |
| 9 if (strcmp(varargin{1},'xev')) | |
| 10 xev = varargin{2}; | |
| 11 varargin(1:2) = []; | |
| 12 end; | |
| 13 end; | |
| 14 fit = locfit(x,y,varargin{:},'ev',xev,'module','simple'); | |
| 15 z = lfknots(fit); | |
| 16 fv = invlink(z(:,1),fit.fit_points.family_link); | |
| 17 | |
| 18 z = { xev, fv }; | |
| 19 | |
| 20 return; |
