farrellja / URD

URD - Reconstruction of Branching Developmental Trajectories
GNU General Public License v3.0
115 stars 41 forks source link

limit.single.sigmoid.slopes #89

Open Ruismart opened 3 months ago

Ruismart commented 3 months ago

hi,

thanks for the wonderful tool, I'm trying to understand the logic of the code.

in Analyses/SupplementaryAnalysis/URD-06-GeneExpressionCascades.Rmd, there's a parameter 'limit.single.sigmoid.slopes=T' in function geneCascadeProcess(), but it's not mentioned any more. I'm wondering if it''s used to decide only one model in impulse.R would be fit.

Ruismart commented 3 months ago

By the way, I have tried to separate the impulseFit() step by step as it didn't work with my own dataset ( one trajectory of 5k cells, not finished in 72h for one single gene, 50G memory full all the time).

In brief, the moving window is set as '16, 5', resulting in 200+ moving windows to fit.

The linear part only takes seconds to run, but it's stuck in impulse.fit.single(), specifically the nlsLM() fitting step. For 'h/.frac=0.2' the impulse.start.single() would return a matrix 'starts' with dim '11M x 6' which is a crazy number, and the dimension would become '2M x 6' if lower the frac to 0.1. Even so, the fitting step in nlsLM() still takes too long to compute for one single gene.

I'm trying to do some modification to see if there's a way to decrease the computation complexity. Or I have done something wrong.