positional arguments: {munge,finemap,import} Subcommands: munge to clean up summary statistics. finemap to perform run twas & finemap. import to import weights from existing databases.
optional arguments: -h, --help show this help message and exit
Starting log... [2025-05-02 10:49:44 - INFO] Detecting 1 populations for fine-mapping. [2025-05-02 10:49:44 - INFO] As a result, running single-population FOCUS. [2025-05-02 10:49:44 - INFO] Preparing GWAS summary file for population at /home/hello/wkdir/ma-focus/test/EA_WBC.Chen.2020/EA_WBC_new_munged_chr22.tsv.gz. [2025-05-02 10:49:45 - INFO] Preparing reference SNP data for population at /home/hello/wkdir/ma-focus/test/1000GP3_multiPop_allelesAligned/EUR/1000G.EUR.QC.allelesAligned.22. [2025-05-02 10:49:45 - INFO] Preparing weight database at /home/hello/wkdir/ma-focus/test/ea_fusion_genoa.db. [2025-05-02 10:49:45 - INFO] Preparing user-defined locations at 38:EUR. [2025-05-02 10:49:45 - INFO] Found 1700 independent regions on the entire genome. [2025-05-02 10:49:45 - INFO] 24 independent regions currently used after being filtered on chromosome, start, and stop. [2025-05-02 10:49:45 - INFO] Preparing data at region 22:15927607-22:17193405. Skipping if following warning occurs. [2025-05-02 10:49:45 - INFO] Deciding prior probability for a gene to be causal. [2025-05-02 10:49:45 - INFO] Using gencode file prior probability 0.020833333333333332. [2025-05-02 10:49:47 - INFO] Fine-mapping starts at region 22:15927607-22:17193405. [2025-05-02 10:49:47 - INFO] Aligning GWAS, LD, and eQTL weights for the single population. Region 22:15927607-22:17193405 will skip if following errors occur. [2025-05-02 10:49:47 - INFO] Find 1 common genes to be fine-mapped at region 22:15927607-22:17193405. [2025-05-02 10:49:47 - INFO] Running TWAS. ...... [2025-05-02 10:50:18 - INFO] Calculating PIPs. [2025-05-02 10:50:18 - INFO] Completed fine-mapping at region 22:44599428-22:46074615. [2025-05-02 10:50:18 - INFO] Preparing data at region 22:46074615-22:47200568. Skipping if following warning occurs. [2025-05-02 10:50:18 - INFO] Deciding prior probability for a gene to be causal. [2025-05-02 10:50:19 - INFO] Using gencode file prior probability 0.05263157894736842. [2025-05-02 10:50:19 - WARNING] No GWAS SNPs with p-value < 5e-08 found at region 22:46074615-22:47200568 at /home/hello/wkdir/ma-focus/test/EA_WBC.Chen.2020/EA_WBC_new_munged_chr22.tsv.gz. Skipping. [2025-05-02 10:50:19 - INFO] Preparing data at region 22:47200568-22:48507891. Skipping if following warning occurs. [2025-05-02 10:50:19 - INFO] Deciding prior probability for a gene to be causal. [2025-05-02 10:50:19 - INFO] Using gencode file prior probability 0.06666666666666667. [2025-05-02 10:50:19 - WARNING] No GWAS SNPs with p-value < 5e-08 found at region 22:47200568-22:48507891 at /home/hello/wkdir/ma-focus/test/EA_WBC.Chen.2020/EA_WBC_new_munged_chr22.tsv.gz. Skipping. [2025-05-02 10:50:19 - INFO] Preparing data at region 22:48507891-22:49430885. Skipping if following warning occurs. [2025-05-02 10:50:19 - INFO] Deciding prior probability for a gene to be causal. [2025-05-02 10:50:19 - INFO] Using gencode file prior probability 0.14285714285714285. [2025-05-02 10:50:19 - WARNING] No GWAS SNPs with p-value < 5e-08 found at region 22:48507891-22:49430885 at /home/hello/wkdir/ma-focus/test/EA_WBC.Chen.2020/EA_WBC_new_munged_chr22.tsv.gz. Skipping. [2025-05-02 10:50:19 - INFO] Preparing data at region 22:49430885-22:50804870. Skipping if following warning occurs. [2025-05-02 10:50:19 - INFO] Deciding prior probability for a gene to be causal. [2025-05-02 10:50:19 - INFO] Using gencode file prior probability 0.013513513513513514. [2025-05-02 10:50:19 - WARNING] No GWAS SNPs with p-value < 5e-08 found at region 22:49430885-22:50804870 at /home/hello/wkdir/ma-focus/test/EA_WBC.Chen.2020/EA_WBC_new_munged_chr22.tsv.gz. Skipping. [2025-05-02 10:50:19 - INFO] Finished TWAS & fine-mapping. Thanks for using FOCUS, and have a nice day! 39.93user 37.82system 0:37.29elapsed 208%CPU (0avgtext+0avgdata 329936maxresident)k 6976inputs+136outputs (29major+360525minor)pagefaults 0swaps
结果解释
1 2 3 4 5 6 7 8 9 10 11 12
# 查看结果 $ head focus_result.focus.tsv | less -S block ens_gene_id ens_tx_id mol_name tissue ref_name type chrom tx_start tx_stop block_genes trait inference_pop1 inter_z_pop1 cv.R2_pop1 cv.R2.pval_pop1 ldregion_pop1 twas_z_pop1 pips_pop1 > 22:15927607-22:17193405 NULL.MODEL NA NULL NA NA NULL 22 NA NA 48 trait NA NA NA NA 22:16051249-22:17189194 0 0.981 1 22:15927607-22:17193405 ENSG00000177663 NA IL17RA lcl genoa protein_coding 22 17036507 17110505 48 trait susie NA 0.17867932295751077 8.09833347920256e-18 22:16051249-22:17189194 0.449 0.0194 0 22:17193405-22:17813322 NULL.MODEL NA NULL NA NA NULL 22 NA NA 17 trait NA NA NA NA 22:17194860-22:17812824 0 0.893 1 22:17193405-22:17813322 ENSG00000015475 NA BID lcl genoa protein_coding 22 17734036 17774750 17 trait susie NA 0.08333185126953091 8.16760905637009e-09 22:17194860-22:17812824 -0.418 0.0552 1 22:17193405-22:17813322 ENSG00000177663 NA IL17RA lcl genoa protein_coding 22 17036507 17110505 17 trait susie NA 0.17867932295751077 8.09833347920256e-18 22:17194860-22:17812824 -0.119 0.0546 0 22:17813322-22:19924835 NULL.MODEL NA NULL NA NA NULL 22 NA NA 87 trait NA NA NA NA 22:17814148-22:19924538 0 0.695 1 22:17813322-22:19924835 ENSG00000015475 NA BID lcl genoa protein_coding 22 17734036 17774750 87 trait susie NA 0.08333185126953091 8.16760905637009e-09 22:17814148-22:19924538 -3.07 0.169 1 22:17813322-22:19924835 ENSG00000100075 NA SLC25A1 lcl genoa protein_coding 22 19175581 19179344 87 trait lasso NA 0.341638476663499 9.018936721488138e-36 22:17814148-22:19924538 -2.69 0.0698 1 22:17813322-22:19924835 ENSG00000215193 NA PEX26 lcl genoa protein_coding 22 18044078 18121769 87 trait blup NA 0.043113259891870426 3.149420886880096e-05 22:17814148-22:19924538 2.64 0.0576 1
如果遇到报错: module ‘numpy’ has no attribute ‘bool’. np.bool was a deprecated alias for the builtin bool. To avoid this error in existing code, use bool by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy sca lar type, use np.bool_ here.
修改,记得换成自己的,106 行换成np.bool_,保存,再运行,完成出图。
1 2 3 4
vim +106 /tools/Python-3.8.3/lib/python3.8/site-packages/pyfocus/viz.py
Starting log... [2025-05-02 11:15:53 - INFO] Detecting 1 populations for fine-mapping. [2025-05-02 11:15:53 - INFO] As a result, running single-population FOCUS. [2025-05-02 11:15:53 - INFO] Preparing GWAS summary file for population at /home/hello/wkdir/ma-focus/test/EA_WBC.Chen.2020/EA_WBC_new_munged_chr22.tsv.gz. [2025-05-02 11:15:54 - INFO] Preparing reference SNP data for population at /home/hello/wkdir/ma-focus/test/1000GP3_multiPop_allelesAligned/EUR/1000G.EUR.QC.allelesAligned.22. [2025-05-02 11:15:54 - INFO] Preparing weight database at /home/hello/wkdir/ma-focus/test/ea_fusion_genoa.db. [2025-05-02 11:15:54 - INFO] Preparing user-defined locations at 38:EUR. [2025-05-02 11:15:54 - INFO] Found 1700 independent regions on the entire genome. [2025-05-02 11:15:54 - INFO] 24 independent regions currently used after being filtered on chromosome, start, and stop. [2025-05-02 11:15:54 - INFO] Preparing data at region 22:15927607-22:17193405. Skipping if following warning occurs. [2025-05-02 11:15:54 - INFO] Deciding prior probability for a gene to be causal. [2025-05-02 11:15:54 - INFO] Using gencode file prior probability 0.020833333333333332. [2025-05-02 11:15:55 - INFO] Fine-mapping starts at region 22:15927607-22:17193405. [2025-05-02 11:15:55 - INFO] Aligning GWAS, LD, and eQTL weights for the single population. Region 22:15927607-22:17193405 will skip if following errors occur. [2025-05-02 11:15:55 - INFO] Find 1 common genes to be fine-mapped at region 22:15927607-22:17193405. [2025-05-02 11:15:55 - INFO] Running TWAS. ...... [2025-05-02 11:16:25 - INFO] Calculating PIPs. [2025-05-02 11:16:25 - INFO] Completed fine-mapping at region 22:44599428-22:46074615. [2025-05-02 11:16:25 - INFO] Creating FOCUS plots at region 22:44599428-22:46074615. [2025-05-02 11:16:26 - INFO] Preparing data at region 22:46074615-22:47200568. Skipping if following warning occurs. [2025-05-02 11:16:26 - INFO] Deciding prior probability for a gene to be causal. [2025-05-02 11:16:26 - INFO] Using gencode file prior probability 0.05263157894736842. [2025-05-02 11:16:26 - WARNING] No GWAS SNPs with p-value < 5e-08 found at region 22:46074615-22:47200568 at /home/hello/wkdir/ma-focus/test/EA_WBC.Chen.2020/EA_WBC_new_munged_chr22.tsv.gz. Skipping. [2025-05-02 11:16:26 - INFO] Preparing data at region 22:47200568-22:48507891. Skipping if following warning occurs. [2025-05-02 11:16:26 - INFO] Deciding prior probability for a gene to be causal. [2025-05-02 11:16:26 - INFO] Using gencode file prior probability 0.06666666666666667. [2025-05-02 11:16:26 - WARNING] No GWAS SNPs with p-value < 5e-08 found at region 22:47200568-22:48507891 at /home/hello/wkdir/ma-focus/test/EA_WBC.Chen.2020/EA_WBC_new_munged_chr22.tsv.gz. Skipping. [2025-05-02 11:16:26 - INFO] Preparing data at region 22:48507891-22:49430885. Skipping if following warning occurs. [2025-05-02 11:16:26 - INFO] Deciding prior probability for a gene to be causal. [2025-05-02 11:16:26 - INFO] Using gencode file prior probability 0.14285714285714285. [2025-05-02 11:16:26 - WARNING] No GWAS SNPs with p-value < 5e-08 found at region 22:48507891-22:49430885 at /home/hello/wkdir/ma-focus/test/EA_WBC.Chen.2020/EA_WBC_new_munged_chr22.tsv.gz. Skipping. [2025-05-02 11:16:26 - INFO] Preparing data at region 22:49430885-22:50804870. Skipping if following warning occurs. [2025-05-02 11:16:26 - INFO] Deciding prior probability for a gene to be causal. [2025-05-02 11:16:26 - INFO] Using gencode file prior probability 0.013513513513513514. [2025-05-02 11:16:26 - WARNING] No GWAS SNPs with p-value < 5e-08 found at region 22:49430885-22:50804870 at /home/hello/wkdir/ma-focus/test/EA_WBC.Chen.2020/EA_WBC_new_munged_chr22.tsv.gz. Skipping. [2025-05-02 11:16:26 - INFO] Finished TWAS & fine-mapping. Thanks for using FOCUS, and have a nice day!