YangLabHKUST / MR-APSS

Mendelian Randomization accounting for Pleiotropy and Sample Structure using genome-wide summary statistics
42 stars 10 forks source link

Error when using format_data #5

Open xuj18 opened 1 month ago

xuj18 commented 1 month ago

Dear Dr. Yang,

Sorry that I have another question regarding the format_data function in MR APSS.

When I was trying to run the script based on your tutorial, I got the error message as following:

AN_QC1 <- format_data(AN_raw, snp_col = "SNP", se_col = "SE", ncase_col = "Nca", ncontrol_col = "Nco", info_col = "INFO", A1_col = "A1", A2_col = "A2", b_col = "beta", freq_col = "FRQ_U_1243971", p_col = "P")

Error in format_data(AN_raw, snp_col = "SNP", se_col = "SE", ncase_col = "Nca", : unused arguments (A1_col = "A1", A2_col = "A2", b_col = "beta", freq_col = "FRQ_U_1243971", p_col = "P")

I don't know why the A1_col, A2_col, b_col, freq_col and p_col are not recognized by the format_data function. I also double checked my summary statistic file to make sure the column names I specified here are all correct.

Any help would be appreciated. Thank you!

Best, Jiayi

hxh0928 commented 1 month ago

Dear Jiayi,

I think you can try: AN_QC1 <- format_data(dat = AN_raw, snp_col = "SNP", se_col = "SE", ncase_col = "Nca", ncontrol_col = "Nco", info_col = "INFO", A1_col = "A1", A2_col = "A2", b_col = "beta", freq_col = "FRQ_U_1243971", p_col = "P")

by adding “dat = “ before AN-raw

This is because the function has other default settings like "snps.merge = w_hm3.snplist”,"snps.remove = MHC.SNPs” , before snp_col = “SNP”.

If we do not specify “dat = “ , the function may fail to identify these arguments.

I will find a way to refine this.

Thank you

Bests,

Xianghong

2024年9月14日 上午3:47,Jiayi_Xu @.***> 写道:

Dear Dr. Yang,

Sorry that I have another question regarding the format_data function in MR APSS.

When I was trying to run the script based on your tutorial, I got the error message as following:

AN_QC1 <- format_data(AN_raw, snp_col = "SNP", se_col = "SE", ncase_col = "Nca", ncontrol_col = "Nco", info_col = "INFO", A1_col = "A1", A2_col = "A2", b_col = "beta", freq_col = "FRQ_U_1243971", p_col = "P")

Error in format_data(AN_raw, snp_col = "SNP", se_col = "SE", ncase_col = "Nca", : unused arguments (A1_col = "A1", A2_col = "A2", b_col = "beta", freq_col = "FRQ_U_1243971", p_col = "P")

I don't know why the A1_col, A2_col, b_col, freq_col and p_col are not recognized by the format_data function. I also double checked my summary statistic file to make sure the column names I specified here are all correct.

Any help would be appreciated. Thank you!

Best, Jiayi

— Reply to this email directly, view it on GitHubhttps://github.com/YangLabHKUST/MR-APSS/issues/5, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BAZWMYNGGB44R4QF62EOIXDZWM6LRAVCNFSM6AAAAABOF7T36WVHI2DSMVQWIX3LMV43ASLTON2WKOZSGUZDKNJWGM2DMNI. You are receiving this because you are subscribed to this thread.Message ID: @.***>

xuj18 commented 1 month ago

Dear Xianghong, Thanks for your note back! I’ll give it a try and let you know if there is any further question.

Thank you! Best, Jiayi

From: hxh0928 @.> Date: Thursday, September 19, 2024 at 2:37 AM To: YangLabHKUST/MR-APSS @.> Cc: Xu, Jiayi @.>, Author @.> Subject: Re: [YangLabHKUST/MR-APSS] Error when using format_data (Issue #5) Dear Jiayi,

I think you can try: AN_QC1 <- format_data(dat = AN_raw, snp_col = "SNP", se_col = "SE", ncase_col = "Nca", ncontrol_col = "Nco", info_col = "INFO", A1_col = "A1", A2_col = "A2", b_col = "beta", freq_col = "FRQ_U_1243971", p_col = "P")

by adding “dat = “ before AN-raw

This is because the function has other default settings like "snps.merge = w_hm3.snplist”,"snps.remove = MHC.SNPs” , before snp_col = “SNP”.

If we do not specify “dat = “ , the function may fail to identify these arguments.

I will find a way to refine this.

Thank you

Bests,

Xianghong

2024年9月14日 上午3:47,Jiayi_Xu @.***> 写道:

Dear Dr. Yang,

Sorry that I have another question regarding the format_data function in MR APSS.

When I was trying to run the script based on your tutorial, I got the error message as following:

AN_QC1 <- format_data(AN_raw, snp_col = "SNP", se_col = "SE", ncase_col = "Nca", ncontrol_col = "Nco", info_col = "INFO", A1_col = "A1", A2_col = "A2", b_col = "beta", freq_col = "FRQ_U_1243971", p_col = "P")

Error in format_data(AN_raw, snp_col = "SNP", se_col = "SE", ncase_col = "Nca", : unused arguments (A1_col = "A1", A2_col = "A2", b_col = "beta", freq_col = "FRQ_U_1243971", p_col = "P")

I don't know why the A1_col, A2_col, b_col, freq_col and p_col are not recognized by the format_data function. I also double checked my summary statistic file to make sure the column names I specified here are all correct.

Any help would be appreciated. Thank you!

Best, Jiayi

— Reply to this email directly, view it on GitHubhttps://github.com/YangLabHKUST/MR-APSS/issues/5, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BAZWMYNGGB44R4QF62EOIXDZWM6LRAVCNFSM6AAAAABOF7T36WVHI2DSMVQWIX3LMV43ASLTON2WKOZSGUZDKNJWGM2DMNI. You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHubhttps://github.com/YangLabHKUST/MR-APSS/issues/5#issuecomment-2360110949, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APRMFSY2XVDXA3FYFPBV2CTZXJWI3AVCNFSM6AAAAABOF7T36WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRQGEYTAOJUHE. You are receiving this because you authored the thread.Message ID: @.***>