Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

predictSmooth vs plotSmoothers #230

Closed
flde opened this issue Mar 27, 2023 · 2 comments
Closed

predictSmooth vs plotSmoothers #230

flde opened this issue Mar 27, 2023 · 2 comments

Comments

@flde
Copy link

flde commented Mar 27, 2023

Hello tradeSeq-Team,

I plotted the gene expression with plotSmoothers and my own function where I use predictSmooth. However, for some genes the results are similar (e.g. Kit) but for others (e.g. Cd47) the smoothed signal looks quite different.

The only thing I noticed is that both function use .getPredictRangeDf() and predictGAM(). But plotSmoothers then removes (?) the offset yhat <- c(exp(t(Xdf %*% t(beta)) + df$offset) while that happens later with predictSmooth?

I would highly appreciate it if you can help me to understand why the smoothed lines differ between the two functions.

smoother

Best wishes,
Florian

@koenvandenberge
Copy link
Member

Hi @flde,

You may want to share your own function to allow us to look into this or take a look at plotSmoothers yourself.

Also it looks like the points can have here have different on your two plots, did you set the same seed prior to running fitGAM? It may just be a plotting thing.

@flde
Copy link
Author

flde commented Mar 29, 2023

Hello @koenvandenberge,

Many thanks for your help! I did a check with your data from the workshop. The problem was that I did not take the log1p from the output of predictSmooth. I attached the jupyter notebook with the workflow in case someone else has the same question.

smoother.zip

Best,
Florian

download

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants