mtag
mtag copied to clipboard
Please check this level of improvement is normal?
It is a really nice software, thanks. I use MTAG for two phenotypes(quantitative data), they are similar in mean chi2, heritability and N. The improvement in the result is a little huge, which makes me a little nervous, and the samples are nearly completely overlapping. But the FDR result looks is OK? (To be honest it's a little hard for me to comprehend the section on FDR in your paper. Can I simplify it by understanding that if the maximum FDR values for all phenotypes are below 0.05, it indicates a relatively reliable outcome?) Please help me to check this result. Here is the log file:
Summary of MTAG results:
Trait # SNPs used N (max) N (mean) GWAS mean chi^2 MTAG mean chi^2 GWAS equiv. (max) N
1 ../trait1_int_mtag.txt 4842156 25204 22652 1.050 1.403 201652
2 ../trait2_int_mtag.txt 4842156 25164 22617 1.041 1.380 231579
Estimated Omega:
[[ 1.742e-06 -9.010e-07]
[-9.010e-07 1.167e-06]]
(Correlation): [[ 1. -0.632] [-0.632 1. ]]
Estimated Sigma: [[1.05 0.817] [0.817 1.051]]
(Correlation): [[1. 0.777] [0.777 1. ]]
Maximum FDR Max FDR of Trait 1: 0.0239762500984 at probs = [0. 0.4 0. 0.6] Max FDR of Trait 2: 0.0413134475532 at probs = [0. 0. 0.4 0.6]
I also want to consult how to understand sigma matrices? In my idea, the omega matrix represents the degree of correlation between phenotypes, with a larger absolute value indicating a closer correlation, it is true? The meaning of sigma matrix really confused me, hope you can interpret this. I wish these questions will not bother you. Thank you in advance.
I have encountered a situation similar to #124 , where the max FDR for a single trait has exceeded 0.05. May I inquire whether I can use the max FDR for a single trait as a benchmark to assess the stability of MTAG results, as described in that particular issue? Additionally, I would appreciate some guidance on the potential reasons for the elevated max FDR for a single trait, as I am not quite clear on why this is happening. Thank you for your assistance.
Adding a supplement to this issue: the univariate max FDR for trait1 and trait2 is 0.2751 and 0.4192, respectively. However, after MTAG, they become 0.0239 and 0.0413, as mentioned in the log file. This is rather peculiar as it contradicts the expected trend by decreasing instead.
It is a really nice software, thanks. I use MTAG for two phenotypes(quantitative data), they are similar in mean chi2, heritability and N. The improvement in the result is a little huge, which makes me a little nervous, and the samples are nearly completely overlapping. But the FDR result looks is OK? (To be honest it's a little hard for me to comprehend the section on FDR in your paper. Can I simplify it by understanding that if the maximum FDR values for all phenotypes are below 0.05, it indicates a relatively reliable outcome?) Please help me to check this result. Here is the log file:
Summary of MTAG results:
Trait # SNPs used N (max) N (mean) GWAS mean chi^2 MTAG mean chi^2 GWAS equiv. (max) N 1 ../trait1_int_mtag.txt 4842156 25204 22652 1.050 1.403 201652 2 ../trait2_int_mtag.txt 4842156 25164 22617 1.041 1.380 231579 Estimated Omega: [[ 1.742e-06 -9.010e-07] [-9.010e-07 1.167e-06]]
(Correlation): [[ 1. -0.632] [-0.632 1. ]]
Estimated Sigma: [[1.05 0.817] [0.817 1.051]]
(Correlation): [[1. 0.777] [0.777 1. ]]
Maximum FDR Max FDR of Trait 1: 0.0239762500984 at probs = [0. 0.4 0. 0.6] Max FDR of Trait 2: 0.0413134475532 at probs = [0. 0. 0.4 0.6]
I think that the likely issue here is that both of your phenotypes are quite low powered, so the estimates of Omega and Sigma are noisy. Omega may be thought of as the genetic covariance matrix of the effect sizes. So your estimated genetic correlation seems to be -0.6. Sigma may be thought of as the (rescaled) covariance matrix of the estimation error. The covariance term for this matrix will be closely related to the phenotypic correlation and the sample overlap. You implied correlation of the error is 0.8, which suggests a large amount of sample overlap and a strong positive phenotypic correlation. It is quite unusual (though not impossible) for a phenotype to have a strong negative genetic correlation and also a strong positive phenotypic correlation. But in such settings, MTAG can lead to very large power gains. Given how rare such phenotypes are, my gut reaction is that your discordant signed correlations is due to noise rather than due to being very lucky.
MTAG does not calculate standard errors for the Omega and Sigma matrices, but you might consider using LDSC to estimate the genetic correlation between your two traits and get a sense of whether the -0.6 estimate is precisely estimated. If you have access to the phenotypic data, you may also consider estimating the phenotypic correlation and standard error too. If they are very imprecisely estimated, MTAG might not be the right tool for your particular setting.
maxFDR is just a calculation of how high the FDR could be for a particular Omega and Sigma matrix across a range of potential genetic architectures. The univariate maxFDR is a function just of the heritability and the sample size. Because both of your GWASs are very low powered, the risk of a high FDR is high. Because your MTAG results are high and equally powered, the risk of a high FDR is low. Again, given the very low power of your input GWAS, I'm not confident in the estimates of your Omega and Sigma matrices, which is what is used in the maxFDR calculation.
Hopefully this is instructive even if it's not necessarily the best news.
On Wed, Jan 3, 2024 at 3:37 AM Isaac @.***> wrote:
Adding a supplement to this issue: the univariate max FDR for trait1 and trait2 is 0.2751 and 0.4192, respectively. However, after MTAG, they become 0.0239 and 0.0413, as mentioned in the log file. This is rather peculiar as it contradicts the expected trend by decreasing instead.
It is a really nice software, thanks. I use MTAG for two phenotypes(quantitative data), they are similar in mean chi2, heritability and N. The improvement in the result is a little huge, which makes me a little nervous, and the samples are nearly completely overlapping. But the FDR result looks is OK? (To be honest it's a little hard for me to comprehend the section on FDR in your paper. Can I simplify it by understanding that if the maximum FDR values for all phenotypes are below 0.05, it indicates a relatively reliable outcome?) Please help me to check this result. Here is the log file: Summary of MTAG results:
Trait # SNPs used N (max) N (mean) GWAS mean chi^2 MTAG mean chi^2 GWAS equiv. (max) N 1 ../trait1_int_mtag.txt 4842156 25204 22652 1.050 1.403 201652 2 ../trait2_int_mtag.txt 4842156 25164 22617 1.041 1.380 231579 Estimated Omega: [[ 1.742e-06 -9.010e-07] [-9.010e-07 1.167e-06]]
(Correlation): [[ 1. -0.632] [-0.632 1. ]]
Estimated Sigma: [[1.05 0.817] [0.817 1.051]]
(Correlation): [[1. 0.777] [0.777 1. ]]
Maximum FDR Max FDR of Trait 1: 0.0239762500984 at probs = [0. 0.4 0. 0.6] Max FDR of Trait 2: 0.0413134475532 at probs = [0. 0. 0.4 0.6]
— Reply to this email directly, view it on GitHub https://github.com/JonJala/mtag/issues/202#issuecomment-1875010106, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFBUB5PCWBTPCZM3DIIP57TYMUKEFAVCNFSM6AAAAABBK5AL3SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZVGAYTAMJQGY . You are receiving this because you are subscribed to this thread.Message ID: @.***>
I think that the likely issue here is that both of your phenotypes are quite low powered, so the estimates of Omega and Sigma are noisy. Omega may be thought of as the genetic covariance matrix of the effect sizes. So your estimated genetic correlation seems to be -0.6. Sigma may be thought of as the (rescaled) covariance matrix of the estimation error. The covariance term for this matrix will be closely related to the phenotypic correlation and the sample overlap. You implied correlation of the error is 0.8, which suggests a large amount of sample overlap and a strong positive phenotypic correlation. It is quite unusual (though not impossible) for a phenotype to have a strong negative genetic correlation and also a strong positive phenotypic correlation. But in such settings, MTAG can lead to very large power gains. Given how rare such phenotypes are, my gut reaction is that your discordant signed correlations is due to noise rather than due to being very lucky. MTAG does not calculate standard errors for the Omega and Sigma matrices, but you might consider using LDSC to estimate the genetic correlation between your two traits and get a sense of whether the -0.6 estimate is precisely estimated. If you have access to the phenotypic data, you may also consider estimating the phenotypic correlation and standard error too. If they are very imprecisely estimated, MTAG might not be the right tool for your particular setting. maxFDR is just a calculation of how high the FDR could be for a particular Omega and Sigma matrix across a range of potential genetic architectures. The univariate maxFDR is a function just of the heritability and the sample size. Because both of your GWASs are very low powered, the risk of a high FDR is high. Because your MTAG results are high and equally powered, the risk of a high FDR is low. Again, given the very low power of your input GWAS, I'm not confident in the estimates of your Omega and Sigma matrices, which is what is used in the maxFDR calculation. Hopefully this is instructive even if it's not necessarily the best news. … On Wed, Jan 3, 2024 at 3:37 AM Isaac @.> wrote: Adding a supplement to this issue: the univariate max FDR for trait1 and trait2 is 0.2751 and 0.4192, respectively. However, after MTAG, they become 0.0239 and 0.0413, as mentioned in the log file. This is rather peculiar as it contradicts the expected trend by decreasing instead. It is a really nice software, thanks. I use MTAG for two phenotypes(quantitative data), they are similar in mean chi2, heritability and N. The improvement in the result is a little huge, which makes me a little nervous, and the samples are nearly completely overlapping. But the FDR result looks is OK? (To be honest it's a little hard for me to comprehend the section on FDR in your paper. Can I simplify it by understanding that if the maximum FDR values for all phenotypes are below 0.05, it indicates a relatively reliable outcome?) Please help me to check this result. Here is the log file: Summary of MTAG results: Trait # SNPs used N (max) N (mean) GWAS mean chi^2 MTAG mean chi^2 GWAS equiv. (max) N 1 ../trait1_int_mtag.txt 4842156 25204 22652 1.050 1.403 201652 2 ../trait2_int_mtag.txt 4842156 25164 22617 1.041 1.380 231579 Estimated Omega: [[ 1.742e-06 -9.010e-07] [-9.010e-07 1.167e-06]] (Correlation): [[ 1. -0.632] [-0.632 1. ]] Estimated Sigma: [[1.05 0.817] [0.817 1.051]] (Correlation): [[1. 0.777] [0.777 1. ]] Maximum FDR Max FDR of Trait 1: 0.0239762500984 at probs = [0. 0.4 0. 0.6] Max FDR of Trait 2: 0.0413134475532 at probs = [0. 0. 0.4 0.6] — Reply to this email directly, view it on GitHub <#202 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFBUB5PCWBTPCZM3DIIP57TYMUKEFAVCNFSM6AAAAABBK5AL3SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZVGAYTAMJQGY . You are receiving this because you are subscribed to this thread.Message ID: @.>
I can't believe you actually responded to all my questions one by one; these answers have been a tremendous help. I used LDSC to calculate the genetic correlation between the two phenotypes, and the result is 0.9448. I'm a bit confused about why the direction of the genetic correlation result is opposite to the result for omega. Can you provide guidance again? Once again, my heartfelt thanks, and I hope you have a wonderful day.
I am also confused. What's the SE on the LDSC estimate? Can you post the complete MTAG log?
On Wed, Jan 3, 2024, 9:24 PM Isaac @.***> wrote:
I think that the likely issue here is that both of your phenotypes are quite low powered, so the estimates of Omega and Sigma are noisy. Omega may be thought of as the genetic covariance matrix of the effect sizes. So your estimated genetic correlation seems to be -0.6. Sigma may be thought of as the (rescaled) covariance matrix of the estimation error. The covariance term for this matrix will be closely related to the phenotypic correlation and the sample overlap. You implied correlation of the error is 0.8, which suggests a large amount of sample overlap and a strong positive phenotypic correlation. It is quite unusual (though not impossible) for a phenotype to have a strong negative genetic correlation and also a strong positive phenotypic correlation. But in such settings, MTAG can lead to very large power gains. Given how rare such phenotypes are, my gut reaction is that your discordant signed correlations is due to noise rather than due to being very lucky. MTAG does not calculate standard errors for the Omega and Sigma matrices, but you might consider using LDSC to estimate the genetic correlation between your two traits and get a sense of whether the -0.6 estimate is precisely estimated. If you have access to the phenotypic data, you may also consider estimating the phenotypic correlation and standard error too. If they are very imprecisely estimated, MTAG might not be the right tool for your particular setting. maxFDR is just a calculation of how high the FDR could be for a particular Omega and Sigma matrix across a range of potential genetic architectures. The univariate maxFDR is a function just of the heritability and the sample size. Because both of your GWASs are very low powered, the risk of a high FDR is high. Because your MTAG results are high and equally powered, the risk of a high FDR is low. Again, given the very low power of your input GWAS, I'm not confident in the estimates of your Omega and Sigma matrices, which is what is used in the maxFDR calculation. Hopefully this is instructive even if it's not necessarily the best news. … <#m_6106315155428326649_> On Wed, Jan 3, 2024 at 3:37 AM Isaac @.*> wrote: Adding a supplement to this issue: the univariate max FDR for trait1 and trait2 is 0.2751 and 0.4192, respectively. However, after MTAG, they become 0.0239 and 0.0413, as mentioned in the log file. This is rather peculiar as it contradicts the expected trend by decreasing instead. It is a really nice software, thanks. I use MTAG for two phenotypes(quantitative data), they are similar in mean chi2, heritability and N. The improvement in the result is a little huge, which makes me a little nervous, and the samples are nearly completely overlapping. But the FDR result looks is OK? (To be honest it's a little hard for me to comprehend the section on FDR in your paper. Can I simplify it by understanding that if the maximum FDR values for all phenotypes are below 0.05, it indicates a relatively reliable outcome?) Please help me to check this result. Here is the log file: Summary of MTAG results: Trait # SNPs used N (max) N (mean) GWAS mean chi^2 MTAG mean chi^2 GWAS equiv. (max) N 1 ../trait1_int_mtag.txt 4842156 25204 22652 1.050 1.403 201652 2 ../trait2_int_mtag.txt 4842156 25164 22617 1.041 1.380 231579 Estimated Omega: [[ 1.742e-06 -9.010e-07] [-9.010e-07 1.167e-06]] (Correlation): [[
- -0.632] [-0.632 1. ]] Estimated Sigma: [[1.05 0.817] [0.817 1.051]] (Correlation): [[1. 0.777] [0.777 1. ]] Maximum FDR Max FDR of Trait 1: 0.0239762500984 at probs = [0. 0.4 0. 0.6] Max FDR of Trait 2: 0.0413134475532 at probs = [0. 0. 0.4 0.6] — Reply to this email directly, view it on GitHub <#202 (comment) https://github.com/JonJala/mtag/issues/202#issuecomment-1875010106>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFBUB5PCWBTPCZM3DIIP57TYMUKEFAVCNFSM6AAAAABBK5AL3SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZVGAYTAMJQGY https://github.com/notifications/unsubscribe-auth/AFBUB5PCWBTPCZM3DIIP57TYMUKEFAVCNFSM6AAAAABBK5AL3SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZVGAYTAMJQGY . You are receiving this because you are subscribed to this thread.Message ID: @.*>
I can't believe you actually responded to all my questions one by one; these answers have been a tremendous help. I used LDSC to calculate the genetic correlation between the two phenotypes, and the result is 0.9448. I'm a bit confused about why the direction of the genetic correlation result is opposite to the result for omega. Can you provide guidance again? Once again, my heartfelt thanks, and I hope you have a wonderful day.
— Reply to this email directly, view it on GitHub https://github.com/JonJala/mtag/issues/202#issuecomment-1876221846, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFBUB5N565OTHUQNM5UEPSDYMYHGJAVCNFSM6AAAAABBK5AL3SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZWGIZDCOBUGY . You are receiving this because you commented.Message ID: @.***>
I am also confused. What's the SE on the LDSC estimate? Can you post the complete MTAG log?
Hah, I'm so sorry for causing confusion for you. According to my reasoning, trait1 may be an intermediate variable for trait2 (and they might even mutually serve as intermediaries). I'm not sure if this can provide some level of understanding for this peculiar phenomenon. Here is the complete log file for MTAG: 2024/01/03/12:20:43 PM <><><<>><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> <> <> MTAG: Multi-trait Analysis of GWAS <> Version: 1.0.8 <> (C) 2017 Omeed Maghzian, Raymond Walters, and Patrick Turley <> Harvard University Department of Economics / Broad Institute of MIT and Harvard <> GNU General Public License v3 <><><<>><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> <> Note: It is recommended to run your own QC on the input before using this program. <> Software-related correspondence: [email protected] <> All other correspondence: [email protected] <><><<>><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Calling ./mtag.py
--stream-stdout
--n-min 0.0
--ld-ref-panel /public/home/P202306/databed/ldscore/
--sumstats ../TRAIT1_int_mtag.txt,../TRAIT2_int_mtag.txt
--fdr
--cores 10
--out /public/home/P202306/meta/MTAG/result/TRAIT1_TRAIT2
2024/01/03/12:20:43 PM Beginning MTAG analysis... 2024/01/03/12:20:43 PM MTAG will use the Z column for analyses. 2024/01/03/12:21:00 PM Read in Trait 1 summary statistics (6616148 SNPs) from ../TRAIT1_int_mtag.txt ... 2024/01/03/12:21:00 PM <><><<>><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> 2024/01/03/12:21:00 PM Munging Trait 1 <><><<>><><><><><><><><><><><><><><><><><><><><><><><><><>< 2024/01/03/12:21:00 PM <><><<>><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> 2024/01/03/12:21:00 PM Interpreting column names as follows: 2024/01/03/12:21:00 PM snpid: Variant ID (e.g., rs number) n: Sample size a1: a1, interpreted as ref allele for signed sumstat. pval: p-Value a2: a2, interpreted as non-ref allele for signed sumstat. z: Directional summary statistic as specified by --signed-sumstats. se: Standard errors of BETA coefficients
2024/01/03/12:21:00 PM Reading sumstats from provided DataFrame into memory 10000000 SNPs at a time. 2024/01/03/12:21:04 PM WARNING: 2 SNPs had P outside of (0,1]. The P column may be mislabeled. 2024/01/03/12:21:10 PM Read 6616148 SNPs from --sumstats file. Removed 0 SNPs with missing values. Removed 0 SNPs with INFO <= None. Removed 0 SNPs with MAF <= 0.01. Removed 0 SNPs with SE <0 or NaN values. Removed 2 SNPs with out-of-bounds p-values. Removed 859866 variants that were not SNPs. Note: strand ambiguous SNPs were not dropped. 5756280 SNPs remain. 2024/01/03/12:21:13 PM Removed 0 SNPs with duplicated rs numbers (5756280 SNPs remain). 2024/01/03/12:21:14 PM Removed 0 SNPs with N < 0.0 (5756280 SNPs remain). 2024/01/03/12:22:07 PM Median value of SIGNED_SUMSTAT was 0.0, which seems sensible. 2024/01/03/12:22:07 PM Dropping snps with null values 2024/01/03/12:22:08 PM Metadata: 2024/01/03/12:22:08 PM Mean chi^2 = 1.109 2024/01/03/12:22:08 PM Lambda GC = 1.058 2024/01/03/12:22:08 PM Max chi^2 = 1303.596 2024/01/03/12:22:08 PM 1517 Genome-wide significant SNPs (some may have been removed by filtering). 2024/01/03/12:22:08 PM Conversion finished at Wed Jan 3 12:22:08 2024 2024/01/03/12:22:08 PM Total time elapsed: 1.0m:8.62s 2024/01/03/12:22:18 PM <><><<>><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> 2024/01/03/12:22:18 PM Munging of Trait 1 complete. SNPs remaining: 5756280 2024/01/03/12:22:18 PM <><><<>><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
2024/01/03/12:22:45 PM Read in Trait 2 summary statistics (6616151 SNPs) from ../TRAIT2_int_mtag.txt ... 2024/01/03/12:22:45 PM <><><<>><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> 2024/01/03/12:22:45 PM Munging Trait 2 <><><<>><><><><><><><><><><><><><><><><><><><><><><><><><>< 2024/01/03/12:22:45 PM <><><<>><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> 2024/01/03/12:22:45 PM Interpreting column names as follows: 2024/01/03/12:22:45 PM snpid: Variant ID (e.g., rs number) n: Sample size a1: a1, interpreted as ref allele for signed sumstat. pval: p-Value a2: a2, interpreted as non-ref allele for signed sumstat. z: Directional summary statistic as specified by --signed-sumstats. se: Standard errors of BETA coefficients
2024/01/03/12:22:45 PM Reading sumstats from provided DataFrame into memory 10000000 SNPs at a time. 2024/01/03/12:22:48 PM WARNING: 30 SNPs had P outside of (0,1]. The P column may be mislabeled. 2024/01/03/12:22:54 PM Read 6616151 SNPs from --sumstats file. Removed 0 SNPs with missing values. Removed 0 SNPs with INFO <= None. Removed 0 SNPs with MAF <= 0.01. Removed 0 SNPs with SE <0 or NaN values. Removed 30 SNPs with out-of-bounds p-values. Removed 859864 variants that were not SNPs. Note: strand ambiguous SNPs were not dropped. 5756257 SNPs remain. 2024/01/03/12:22:57 PM Removed 0 SNPs with duplicated rs numbers (5756257 SNPs remain). 2024/01/03/12:22:58 PM Removed 0 SNPs with N < 0.0 (5756257 SNPs remain). 2024/01/03/12:23:51 PM Median value of SIGNED_SUMSTAT was 0.0, which seems sensible. 2024/01/03/12:23:51 PM Dropping snps with null values 2024/01/03/12:23:52 PM Metadata: 2024/01/03/12:23:52 PM Mean chi^2 = 1.095 2024/01/03/12:23:52 PM Lambda GC = 1.051 2024/01/03/12:23:52 PM Max chi^2 = 1479.054 2024/01/03/12:23:52 PM 1371 Genome-wide significant SNPs (some may have been removed by filtering). 2024/01/03/12:23:52 PM Conversion finished at Wed Jan 3 12:23:52 2024 2024/01/03/12:23:52 PM Total time elapsed: 1.0m:7.47s 2024/01/03/12:24:03 PM <><><<>><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> 2024/01/03/12:24:03 PM Munging of Trait 2 complete. SNPs remaining: 5756257 2024/01/03/12:24:03 PM <><><<>><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
2024/01/03/12:24:19 PM Dropped 914086 SNPs due to strand ambiguity, 4842194 SNPs remain in intersection after merging trait1 2024/01/03/12:24:34 PM Dropped 0 SNPs due to strand ambiguity, 4842156 SNPs remain in intersection after merging trait2 2024/01/03/12:24:34 PM ... Merge of GWAS summary statistics complete. Number of SNPs: 4842156 2024/01/03/12:24:46 PM Using 4842156 SNPs to estimate Omega (0 SNPs excluded due to strand ambiguity) 2024/01/03/12:24:46 PM Estimating sigma.. 2024/01/03/12:28:12 PM Checking for positive definiteness .. 2024/01/03/12:28:12 PM Sigma hat: [[1.05 0.817] [0.817 1.051]] 2024/01/03/12:28:12 PM Mean chi^2 of SNPs used to estimate Omega is low for some SNPsMTAG may not perform well in this situation. 2024/01/03/12:28:12 PM Beginning estimation of Omega ... 2024/01/03/12:28:12 PM Using GMM estimator of Omega .. 2024/01/03/12:28:13 PM Checking for positive definiteness .. 2024/01/03/12:28:13 PM Completed estimation of Omega ... 2024/01/03/12:28:13 PM Beginning MTAG calculations... 2024/01/03/12:28:17 PM ... Completed MTAG calculations. 2024/01/03/12:28:17 PM Writing Phenotype 1 to file ... 2024/01/03/12:28:59 PM Writing Phenotype 2 to file ... 2024/01/03/12:29:41 PM Summary of MTAG results:
Trait # SNPs used N (max) N (mean) GWAS mean chi^2 MTAG mean chi^2 GWAS equiv. (max) N
1 ../TRAIT1_int_mtag.txt 4842156 25204 22652 1.050 1.403 201652
2 ../TRAIT2_int_mtag.txt 4842156 25164 22617 1.041 1.380 231579
Estimated Omega: [[ 1.742e-06 -9.010e-07] [-9.010e-07 1.167e-06]]
(Correlation): [[ 1. -0.632] [-0.632 1. ]]
Estimated Sigma: [[1.05 0.817] [0.817 1.051]]
(Correlation): [[1. 0.777] [0.777 1. ]]
MTAG weight factors: (average across SNPs) [0.06 0.025]
2024/01/03/12:29:41 PM
2024/01/03/12:29:41 PM MTAG results saved to file.
2024/01/03/12:29:41 PM Beginning maxFDR calculations. Depending on the number of grid points specified, this might take some time...
2024/01/03/12:29:41 PM T=2
2024/01/03/12:29:41 PM Number of gridpoints to search: 100
2024/01/03/12:29:41 PM Performing grid search using 10 cores.
2024/01/03/12:29:42 PM Grid search: 10.0 percent finished for . Time: 0.012 min
2024/01/03/12:29:43 PM Grid search: 20.0 percent finished for . Time: 0.027 min
2024/01/03/12:29:44 PM Grid search: 30.0 percent finished for . Time: 0.042 min
2024/01/03/12:29:45 PM Grid search: 40.0 percent finished for . Time: 0.057 min
2024/01/03/12:29:46 PM Grid search: 50.0 percent finished for . Time: 0.074 min
2024/01/03/12:29:47 PM Grid search: 60.0 percent finished for . Time: 0.090 min
2024/01/03/12:29:48 PM Grid search: 70.0 percent finished for . Time: 0.105 min
2024/01/03/12:29:48 PM Grid search: 80.0 percent finished for . Time: 0.120 min
2024/01/03/12:29:49 PM Grid search: 90.0 percent finished for . Time: 0.136 min
2024/01/03/12:29:50 PM Grid search: 100.0 percent finished for . Time: 0.153 min
2024/01/03/12:29:50 PM Saved calculations of fdr over grid points in /public/home/P202306/meta/MTAG/result/TRAIT1_TRAIT2_fdr_mat.txt
2024/01/03/12:29:50 PM <><><<>><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
2024/01/03/12:29:50 PM grid point indices for max FDR for each trait: [19 4]
2024/01/03/12:29:50 PM Maximum FDR
2024/01/03/12:29:50 PM Max FDR of Trait 1: 0.0239762500984 at probs = [0. 0.4 0. 0.6]
2024/01/03/12:29:50 PM Max FDR of Trait 2: 0.0413134475532 at probs = [0. 0. 0.4 0.6]
2024/01/03/12:29:50 PM <><><<>><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
2024/01/03/12:29:50 PM Completed FDR calculations.
2024/01/03/12:29:50 PM MTAG complete. Time elapsed: 9.0m:7.90399980545s
I am also confused. What's the SE on the LDSC estimate? Can you post the complete MTAG log?
This is the log file for calculation of rg between trait1 and trait2 use LDSC, hope this can do something for you:
- LD Score Regression (LDSC)
- Version 1.0.1
- (C) 2014-2019 Brendan Bulik-Sullivan and Hilary Finucane
- Broad Institute of MIT and Harvard / MIT Department of Mathematics
- GNU General Public License v3
Call:
./ldsc.py
--ref-ld-chr /public/home/P202306/databed/ldscore/
--out ./rg/test
--rg TRAIT1_int.sumstats.gz,TRAIT2_int.sumstats.gz
--w-ld-chr /public/home/P202306/databed/ldscore/
Beginning analysis at Thu Jan 4 20:50:08 2024 Reading summary statistics from TRAIT1_int.sumstats.gz ... Read summary statistics for 4307777 SNPs. Reading reference panel LD Score from /public/home/P202306/databed/ldscore/[1-22] ... (ldscore_fromlist) Read reference panel LD Scores for 6603892 SNPs. Removing partitioned LD Scores with zero variance. Reading regression weight LD Score from /public/home/P202306/databed/ldscore/[1-22] ... (ldscore_fromlist) Read regression weight LD Scores for 6603892 SNPs. After merging with reference panel LD, 4307777 SNPs remain. After merging with regression SNP LD, 4307777 SNPs remain. Computing rg for phenotype 2/2 Reading summary statistics from TRAIT2_int.sumstats.gz ... Read summary statistics for 4307803 SNPs. After merging with summary statistics, 4307058 SNPs remain. 4307058 SNPs with valid alleles.
Heritability of phenotype 1
Total Observed scale h2: 0.1138 (0.0612) Lambda GC: 1.0618 Mean Chi^2: 1.1192 Intercept: 1.0613 (0.0284) Ratio: 0.5146 (0.2387)
Heritability of phenotype 2/2
Total Observed scale h2: 0.1009 (0.0488) Lambda GC: 1.0557 Mean Chi^2: 1.1112 Intercept: 1.0603 (0.0326) Ratio: 0.5417 (0.2932)
Genetic Covariance
Total Observed scale gencov: 0.1012 (0.0538) Mean z1*z2: 0.7524 Intercept: 0.7022 (0.03)
Genetic Correlation
Genetic Correlation: 0.9448 (0.0758) Z-score: 12.4718 P: 1.0636e-35
Summary of Genetic Correlation Results p1 p2 rg se z p h2_obs h2_obs_se h2_int h2_int_se gcov_int gcov_int_se TRAIT1_int.sumstats.gz TRAIT2_int.sumstats.gz 0.9448 0.0758 12.4718 1.0636e-35 0.1009 0.0488 1.0603 0.0326 0.7022 0.03
Analysis finished at Thu Jan 4 20:51:27 2024 Total time elapsed: 1.0m:19.33s
Hmm. It's very odd to me that MTAG is producing a negative genetic correlation when LDSC is getting a positive one. Can you calculate the variance-covariance matrix of your z-scores maybe?
On Thu, Jan 4, 2024 at 7:58 AM Isaac @.***> wrote:
I am also confused. What's the SE on the LDSC estimate? Can you post the complete MTAG log?
This is the log file for calculation of rg between trait1 and trait2 use LDSC, hope this can do something for you:
- LD Score Regression (LDSC)
- Version 1.0.1
- (C) 2014-2019 Brendan Bulik-Sullivan and Hilary Finucane
- Broad Institute of MIT and Harvard / MIT Department of Mathematics
- GNU General Public License v3
Call: ./ldsc.py --ref-ld-chr /public/home/P202306/databed/ldscore/ --out ./rg/test --rg TRAIT1_int.sumstats.gz,TRAIT2_int.sumstats.gz --w-ld-chr /public/home/P202306/databed/ldscore/
Beginning analysis at Thu Jan 4 20:50:08 2024 Reading summary statistics from TRAIT1_int.sumstats.gz ... Read summary statistics for 4307777 SNPs. Reading reference panel LD Score from /public/home/P202306/databed/ldscore/[1-22] ... (ldscore_fromlist) Read reference panel LD Scores for 6603892 SNPs. Removing partitioned LD Scores with zero variance. Reading regression weight LD Score from /public/home/P202306/databed/ldscore/[1-22] ... (ldscore_fromlist) Read regression weight LD Scores for 6603892 SNPs. After merging with reference panel LD, 4307777 SNPs remain. After merging with regression SNP LD, 4307777 SNPs remain. Computing rg for phenotype 2/2 Reading summary statistics from TRAIT2_int.sumstats.gz ... Read summary statistics for 4307803 SNPs. After merging with summary statistics, 4307058 SNPs remain. 4307058 SNPs with valid alleles. Heritability of phenotype 1
Total Observed scale h2: 0.1138 (0.0612) Lambda GC: 1.0618 Mean Chi^2: 1.1192 Intercept: 1.0613 (0.0284) Ratio: 0.5146 (0.2387) Heritability of phenotype 2/2
Total Observed scale h2: 0.1009 (0.0488) Lambda GC: 1.0557 Mean Chi^2: 1.1112 Intercept: 1.0603 (0.0326) Ratio: 0.5417 (0.2932) Genetic Covariance
Total Observed scale gencov: 0.1012 (0.0538) Mean z1*z2: 0.7524 Intercept: 0.7022 (0.03) Genetic Correlation
Genetic Correlation: 0.9448 (0.0758) Z-score: 12.4718 P: 1.0636e-35
Summary of Genetic Correlation Results p1 p2 rg se z p h2_obs h2_obs_se h2_int h2_int_se gcov_int gcov_int_se TRAIT1_int.sumstats.gz TRAIT2_int.sumstats.gz 0.9448 0.0758 12.4718 1.0636e-35 0.1009 0.0488 1.0603 0.0326 0.7022 0.03
Analysis finished at Thu Jan 4 20:51:27 2024 Total time elapsed: 1.0m:19.33s
— Reply to this email directly, view it on GitHub https://github.com/JonJala/mtag/issues/202#issuecomment-1877056461, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFBUB5LMONOWKISSRXKS42TYM2ROLAVCNFSM6AAAAABBK5AL3SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZXGA2TMNBWGE . You are receiving this because you commented.Message ID: @.***>
sorry, I am not sure how to get it. Could you please explain it in detail, or tell me the code?
Hmm. It's very odd to me that MTAG is producing a negative genetic correlation when LDSC is getting a positive one. Can you calculate the variance-covariance matrix of your z-scores maybe?
You just need to make sure the reference alleles align in the two sets of summary statistics and then calculate the variance of each z-stat column and the covariance between the z-stats of each set of summary statistics.
On Mon, Jan 8, 2024 at 4:41 AM Isaac @.***> wrote:
sorry, I am not sure how to get it. Could you please explain it in detail, or tell me the code?
Hmm. It's very odd to me that MTAG is producing a negative genetic correlation when LDSC is getting a positive one. Can you calculate the variance-covariance matrix of your z-scores maybe?
— Reply to this email directly, view it on GitHub https://github.com/JonJala/mtag/issues/202#issuecomment-1880934601, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFBUB5J4VWN2F27ZHHOAEPTYNPSRJAVCNFSM6AAAAABBK5AL3SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBQHEZTINRQGE . You are receiving this because you commented.Message ID: @.***>
Thank you for your explanation, I have calculated the variance-covariance matrix, here are the results. 5 6 5 1.105850 0.769275 6 0.769275 1.098116
You just need to make sure the reference alleles align in the two sets of summary statistics and then calculate the variance of each z-stat column and the covariance between the z-stats of each set of summary statistics.