-
Notifications
You must be signed in to change notification settings - Fork 68
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
spiec easi in multiple steps #256
Comments
Hi! I just wanted to add myself to this issue since I have the same problem. I am using data coming from different sources and using a batch correction method that returns CLR-transformed data, so I need a way to build the networks on data that are already CLR-transformed. Is there any way to do this?? Thanks! |
I have a branch for this now - it's not fully tested but should be equivalent to master for this purpose. devtools::install_github("zdk123/SpiecEasi", ref="latentcor")
library(SpiecEasi)
## prenormalization
X <- X/rowSums(X)
# For CLR without the pseudocount:
se <- spiec.easi(X, method='mb', lambda.min.ratio=1e-2, nlambda=15, norm.params=list(method='clr')) |
Not doing any internal normalizations is out of scope for this package, but if you just want to run the "spiec.easi" pipeline (graphical lasso + StARS model selection) on arbitrary inputs, you can just run the You could run something like:
which will be equivalent to spiec.easi for pseudo count + clr normalized data for X. |
Hi, thanks! So, just to make sure, X would be my pseudocount + CLR-transformed abundance matrix? |
For pulsar, X can be any data matrix. |
Yes
…On Wed, Aug 7, 2024, 5:25 AM wfgui ***@***.***> wrote:
For pulsar, X can be any data matrix.
Does spiec easi perform clr transformations on data matrices before
running?
1.png (view on web)
<https://github.com/user-attachments/assets/56e7e8a3-df70-4371-9126-75cb251768d4>
—
Reply to this email directly, view it on GitHub
<#256 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAUD2RG5SPVHAMJN3KNSL3LZQHR2BAVCNFSM6AAAAABE5TMVGKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZTGAZDKMRWHA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
This means that I don't need to perform CLR conversion anymore. Just hand over the data matrix to spiec easi, and the spiec easi pipeline will perform CLR conversion.Thanks! |
If I am starting with a relative abundance table (I don't have raw counts), I wanted to run Spiec-Easi in multiple steps, so that I can use my relative abundance table (with a tiny pseudocount added) that I can do CLR transformation on first, then build the networks. Currently, the SPIEC EASI function does this all in one step - can I do in steps?
The text was updated successfully, but these errors were encountered: