As I was implementing this new flag, I also added an automated test for the FINEMAP integration and re-organized the command-line flags.
Testing
Using the new flag --no-sort-pip, the PolyFun results are not sorted, and thus the PIP and CREDIBLE_SET columns are in the same order as the SuSiE object. This facilitates assigning SNP names to the SuSiE object.
The default behavior is unchanged. The results will be sorted by PIP. However, a warning is logged if a user specifies --susie-outfile but not --no-sort-pip.
python finemapper.py \
--geno example_data/chr1 \
--sumstats example_data/chr1.finemap_sumstats.txt.gz \
--n 383290 \
--chr 1 \
--start 46000001 \
--end 49000001 \
--method susie \
--max-num-causal 5 \
--threads 1 \
--verbose \
--susie-outfile test.rds \
--out test-default.gz
## [WARNING] --susie-outfile was set but not --no-sort-pip. This will make it difficult to assign SNP names to the SuSiE R object
zcat test-default.gz | cut -f10,14 | head -n 4
## PIP CREDIBLE_SET
## 1.00000e+00 1
## 9.97861e-01 2
## 9.73775e-01 3
This PR addresses Issue #88 to make it easier to merge PolyFun results with SuSiE R object exported via
--susie-outfile
(https://github.com/omerwe/polyfun/issues/31#issuecomment-672239786). The new flag is called--no-sort-pip
.As I was implementing this new flag, I also added an automated test for the FINEMAP integration and re-organized the command-line flags.
Testing
Using the new flag
--no-sort-pip
, the PolyFun results are not sorted, and thus thePIP
andCREDIBLE_SET
columns are in the same order as the SuSiE object. This facilitates assigning SNP names to the SuSiE object.The default behavior is unchanged. The results will be sorted by PIP. However, a warning is logged if a user specifies
--susie-outfile
but not--no-sort-pip
.