From b2f536f6af0473c5cdcc9db0a97effd02bc0145e Mon Sep 17 00:00:00 2001 From: deepchocolate Date: Wed, 21 Feb 2024 11:56:37 +0100 Subject: [PATCH] Added test of filtering individuals in LD estimation --- tests/test_LDpred2/run.sh | 3 +++ tests/test_LDpred2/scripts/ld.sh | 2 ++ 2 files changed, 5 insertions(+) diff --git a/tests/test_LDpred2/run.sh b/tests/test_LDpred2/run.sh index c6a69342..da0a886a 100755 --- a/tests/test_LDpred2/run.sh +++ b/tests/test_LDpred2/run.sh @@ -54,6 +54,9 @@ export fileOutputSNPR=$DIR_DATA/public-data3.rds export fileKeepSNPS=/REF/hapmap3/w_hm3.justrs export fileOut=$DIR_TESTS/output/public-data.score +# File with subset of individual IDs from the tutorial data +export fileExtractIndividuals=$DIR_DATA/individual-ids.txt + # BGEN files export fileBGEN=$DIR_DATA/example.bgen export fileBGENasRDS=$DIR_DATA/example.rds diff --git a/tests/test_LDpred2/scripts/ld.sh b/tests/test_LDpred2/scripts/ld.sh index 83ee47e3..4b749f9c 100644 --- a/tests/test_LDpred2/scripts/ld.sh +++ b/tests/test_LDpred2/scripts/ld.sh @@ -29,6 +29,8 @@ testSuccess $LDE --sumstats $fileSumstats25k rsid --thres-r2 0.2 --chr2use 21 22 echo "Test restricting on SNPs provide by a SNP list file: $fileKeepSNPS" testSuccess $LDE --extract $fileKeepSNPS --file-ld-chr $dirOut/ld-chr@.rds --file-ld-map $dirOut/map.rds +echo "Test extracting individuals using $fileExtractIndividuals" +testSuccess $LDE --extract-individuals $fileExtractIndividuals --file-ld-chr $dirOut/ld-chr@.rds --file-ld-map $dirOut/map.rds echo "Test sampling individuals (N=400)" testSuccess $LDE --sample-individuals 400 --extract $fileKeepSNPS --file-ld-chr $dirOut/ld-chr@.rds --file-ld-map $dirOut/map.rds # Test this LDpred on this LD (restrict to chromosomes 20-22