Package: pyfocus
FOCUSFOCUS (Fine-mapping Of CaUsal gene Sets) is software to fine-map transcriptome-wide association study statistics at genomic risk regions. The software takes as input summary GWAS data along with eQTL weights and outputs a credible set ofgenesto explain observed genomic risk.MA-FOCUS (Multi-Ancestry Fine-mapping Of CaUsal gene Sets) is an extension of FOCUS that leverages summary GWAS data with eQTL weights from multiple ancestries to increase the precision of credible sets for causal genes.FOCUS are described in:Probabilistic fine-mapping of transcriptome-wide association studies. Nicholas Mancuso, Malika K. Freund, Ruth Johnson, Huwenbo Shi, Gleb Kichaev, Alexander Gusev, and Bogdan Pasaniuc. Nature Genetics 51, 675-682 (2019).MA-FOCUS are described in:Multi-ancestry fine-mapping improves precision to identify causal genes in transcriptome-wide association studies. Zeyun Lu*, Shyamalika Gopalan*, Dong Yuan, David V. Conti, Bogdan Pasaniuc, Alexander Gusev, Nicholas Mancuso.*indicates equal contributionInstallingThe easiest way to install is with pip:pip install pyfocus --userCheck that FOCUS was installed by typingfocus --helpIf that did not work, andpip install pyfocus --userwas specified, please check that your local user path is included in$PATHenvironment variable.--userlocation and can be appended to$PATHby executingexport PATH=`python -m site --user-base`/bin/:$PATHwhich can be saved in~/.bashrcor~/.bash_profile. To reload the environment typesource ~/.bashrcor~/source .bash_profiledepending where you entered it.Alternatively you can download the latest repo and then use setuptools:git clone https://github.com/mancusolab/focus.git
cd focus
python setup.py installWe currently only support Python3.6+.ExampleHere is an example of how to perform LDL fine-mapping while prioritizing predictive models from adipose tissues:focus finemap LDL_2010.clean.sumstats.gz 1000G.EUR.QC.1 gtex_v7.db --chr 1 --tissue adipose --locations 37:EUR --out LDL_2010.chr1This command will scanLDL_2010.clean.sumstats.gzfor risk regions37:EURgenerated by LDetect on GRCh37 for European ancestry and then perform TWAS+fine-mapping using LD estimated from plink-formatted1000G.EUR.QC.1and eQTL weights fromgtex_v7.dbGRCh37.Here is an example of how to perform multi-ancestry fine-mapping from European and African ancestry (just use:to concatenate):focus finemap LDL.EUR.sumstats.gz:LDL.AFR.sumstats.gz 1000G.EUR.QC.1:1000G.AFR.QC.1 genoa_EUR.db:genoa_AFR.db --chr 1 --tissue LCL --locations 37:EUR-AFR --out LDL_mafocus_chr1This command will scan GWAS summary dataLDL.EUR.sumstats.gzandLDL.AFR.sumstats.gzfor risk regions37:EUR-AFRgenerated by modified LDetect on GRCh37 for European and African ancestry and then perform TWAS+fine-mapping using LD estimated from plink-formatted1000G.EUR.QC.1and1000G.AFR.QC.1and eQTL weights fromgenoa_EUR.dbandgenoa_AFR.db.Note:--locationsis a new required parameter compared to versions prior to v0.8. This parameter specifies the genomic regions to be fine-mapped. We recommend to use independent regions for single ancestry or multiple ancestries. Please see thewikifor more instructions.Please see thewikifor more details on how to use focus, ma-focus and links to database files.NotesVersion 0.802: Fix the bug that .gitignore includes *.tsv so that gencode files couldn't be pushed to github.Version 0.801: Added gencode_map_v38 and multiple LD block files in GRCh38. Fixed prior_prob bugs.Version 0.8: Added MA-FOCUS support. Added GWAS imputation using imp-G. Added additional choice for prior probability for causal genes (number of genes in the risk regions).Version 0.6.10: Fixed bug where weight database allele mismatch with GWAS broke inference.Version 0.6.5: Fixed bug in newer versions of matplotlib not accepting string for colormaps. Fixed legend bug in plot. Fixed bug that mismatched string and category when supplying custom locations.Version 0.6: Fixed bug where only one of the two alleles was reversed complemented breaking alignment. For now these instances are dropped. Added option--use-ens-idfor FUSION import to indicate the main model label is an Ensembl ID rather than HGNC symbol.Version 0.5: Plotting sorts genes based on tx start. Various bug fixes that limited the number of queried SNPs and plotting when using newer matplotlib.Version 0.4: Added FUSION import support.Version 0.3: Initial release. More to come soon.Software and supportIf you have any questions or comments please contactnicholas.mancuso@med.usc.eduandzeyunlu@usc.eduFor performing various inferences using summary data from large-scale GWASs please find the following useful software:Association between predicted expression and complex trait/diseaseFUSIONandPrediXcanEstimating local heritability or genetic correlationHESSEstimating genome-wide heritability or genetic correlationUNITYFine-mapping using summary-dataPAINTORImputing summary statistics using LDFIZITWAS simulator (https://github.com/mancusolab/twas_sim)