Closed garyzhubc closed 1 year ago
This is installed with
library(devtools)
install_github("RAPLER/dst-1", ref="bca_mod")
If I try your last line of code on two bca's, the way you write it, I obtain this:
dsrwon(y1s, y2s, sparseM, m_cores) Error in dsrwon(y1s, y2s, sparseM, m_cores) : objet 'sparseM' introuvable.I would like to know what values you chose for these two parameters:
sparseM m_cores
Le jeu. 28 sept. 2023 à 20:33, Peiyuan Zhu @.***> a écrit :
bca size reduced after combination
initialize loop
bpa <- comp_bca(pcsk9_updown_bigsnp_obj, ukb_data_ldl, start_pat, 3, 4, trunc_thres_lower, trunc_thres_upper, wholeset, range, masses, rsid) dim(bpa$tt) [1] 2 501 bpa_new <- comp_bca(pcsk9_updown_bigsnp_obj, ukb_data_ldl, start_pat+1, 3, 4, trunc_thres_lower, trunc_thres_upper, wholeset, range, masses, rsid) dim(bpa_new$tt) [1] 2 501 bpa <- dsrwon(bpa, bpa_new, sparseM, m_cores) dim(bpa$tt) [1] 4 499
— Reply to this email directly, view it on GitHub https://github.com/RAPLER/dst-1/issues/15, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5D5IMSNHPCTFHTQQ4VL2DX4YJMPANCNFSM6AAAAAA5LXKWVI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
sparseM=TRUE mcores=“yes”
On Sep 28, 2023, at 6:02 PM, Claude Boivin @.***> wrote: If I try your last line of code on two bca's, the way you write it, I
obtain this:
dsrwon(y1s, y2s, sparseM, m_cores)
Error in dsrwon(y1s, y2s, sparseM, m_cores) : objet 'sparseM' introuvable.I
would like to know what values you chose for these two parameters:
sparseM
m_cores
Le jeu. 28 sept. 2023 à 20:33, Peiyuan Zhu @.***> a
écrit :
bca size reduced after combination
initialize loop
bpa <- comp_bca(pcsk9_updown_bigsnp_obj, ukb_data_ldl, start_pat, 3, 4, trunc_thres_lower, trunc_thres_upper, wholeset, range, masses, rsid)
dim(bpa$tt)
[1] 2 501
bpa_new <- comp_bca(pcsk9_updown_bigsnp_obj, ukb_data_ldl, start_pat+1, 3, 4, trunc_thres_lower, trunc_thres_upper, wholeset, range, masses, rsid)
dim(bpa_new$tt)
[1] 2 501
bpa <- dsrwon(bpa, bpa_new, sparseM, m_cores)
dim(bpa$tt)
[1] 4 499
—
Reply to this email directly, view it on GitHub
https://github.com/RAPLER/dst-1/issues/15, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AA5D5IMSNHPCTFHTQQ4VL2DX4YJMPANCNFSM6AAAAAA5LXKWVI
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
the problem persist after mcores="no"
Error in dsrwon(bpa, bpa_new, sparseM, m_cores) : Nb of elements of frame x and frame y not equal.
About the bug: "bca size reduced after combination", this situation will arrive when one column contains only zeroes. with a "regular" matrix, the column of zeroes stay there. With sparse matrices, the column of zeroes is removed. Are you sure the last row of your bca is a vector of 501 "ones" (the frame)?
As for the second error message "Error in dsrwon(bpa, bpa_new, sparseM, m_cores) : Nb of elements of frame x and frame y not equal.", it will occur when the frame of the two bca's combinned is different (499 columns vs 501, for example).
I will try to reproduce your situation.
Yes, the input bca has 501 "ones" and the output bca has 499 ones. So the size shrinked.
> bpa <- comp_bca(pcsk9_updown_bigsnp_obj, ukb_data_ldl, start_pat, 3, 4, trunc_thres_lower, trunc_thres_upper, wholeset, range, masses, rsid)
> sum(bpa$tt[2,])
[1] 501
> bpa_new <- comp_bca(pcsk9_updown_bigsnp_obj, ukb_data_ldl, 2, 3, 4, trunc_thres_lower, trunc_thres_upper, wholeset, range, masses, rsid)
> sum(bpa_new$tt[2,])
[1] 501
> m_cores <- "yes"
> sparseM <- TRUE
> bpa1 <- dsrwon(bpa, bpa_new, sparseM, m_cores)
> sum(bpa1$tt[4,])
[1] 499
As @RAPLER mentioned this is an issue of duplicated labels.
This issue should be resolved if the latest version of function bca is used. See commit a55f12c on bca function.
With the newest bca_mod, bca size reduced from 501 to 499 after combination.
The bug only exists when sparseM == TRUE