Created
April 8, 2016 15:24
-
-
Save pjbriggs/b413db5d18cfce62f49913bc9896e2b5 to your computer and use it in GitHub Desktop.
Example script to run CRAFT-GP pipeline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Run example CRAFT-GP pipeline based on docs | |
# | |
# 0. Set up test data | |
if [ ! -d test-data ] ; then | |
mkdir test-data | |
fi | |
cat >test-data/test_index_snps.in <<EOF | |
rs chr position | |
rs2301888 1 17672730 | |
rs28411352 1 38278579 | |
rs12140275 1 38633879 | |
EOF | |
cat >test-data/test_summary_stats.in <<EOF | |
SNPID CHROM POS A1 A2 A1_UNAFF PVAL | |
rs6823274 4 26098057 G A 0.1484 0.4064 | |
rs76632663 2 43568820 T G 0.06988 0.4427 | |
rs28719598 8 10943884 T C 0.194 0.7702 | |
rs78519860 6 128145388 T C 0.07869 0.9007 | |
EOF | |
# | |
# 1. Define regions | |
echo "### Running define_regions_main.rb ###" | |
ruby scripts/define_regions_main.rb -i test-data/test_index_snps.in -m 0.1 | |
# | |
# 2. Credible SNPs | |
echo "### Running filter_summary_stats.py ###" | |
python scripts/filter_summary_stats.py \ | |
--regions output/regions/region_boundaries_01cm.txt \ | |
--stats test-data/test_summary_stats.in \ | |
--out gwas_summary.subset | |
echo "### Running credible_snps_main.R ###" | |
Rscript --vanilla scripts/credible_snps_main.R \ | |
-r output/regions/region_boundaries_01cm.txt \ | |
-a 1962 \ | |
-u 8923 \ | |
-s gwas_summary.subset | |
## | |
# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment