-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from EvolEcolGroup/subset_tests
Subset tests
- Loading branch information
Showing
30 changed files
with
530 additions
and
33 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pop_b SA073 0 0 2 -9 A A G G A A A A G G C C G G G G T T G G G G C C C C A A C T A G A A | ||
pop_b SA1021 0 0 2 -9 G A A G A A G A G G C C T G A G 0 0 G G G G C C C C G A T T G G A A | ||
pop_b SA1008 0 0 1 -9 A A A G A A G A G G C C T G G G T T G G G G C C C C A A C T G G A A |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
CHR SNP TEST A1 A2 GENO O(HET) E(HET) P | ||
1 1 ALL(NP) 2 1 0/4/6 0.4 0.32 1 | ||
1 2 ALL(NP) 2 1 2/4/6 0.3333 0.4444 0.5176 | ||
1 3 ALL(NP) 2 1 0/5/7 0.4167 0.3299 1 | ||
1 4 ALL(NP) 1 2 2/4/5 0.3636 0.4628 0.5377 | ||
1 5 ALL(NP) 2 1 0/7/5 0.5833 0.4132 0.4874 | ||
1 6 ALL(NP) 2 1 1/6/3 0.6 0.48 1 | ||
1 7 ALL(NP) 2 1 1/5/5 0.4545 0.4339 1 | ||
1 8 ALL(NP) 2 1 0/8/4 0.6667 0.4444 0.216 | ||
1 9 ALL(NP) 2 1 0/6/5 0.5455 0.3967 0.5046 | ||
1 10 ALL(NP) 1 2 2/7/3 0.5833 0.4965 1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
1 1 | ||
2 2 | ||
3 3 | ||
4 4 | ||
5 5 | ||
6 6 | ||
7 7 | ||
8 8 | ||
9 9 | ||
10 10 | ||
11 11 | ||
12 12 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
CHR SNP TEST A1 A2 GENO O(HET) E(HET) P | ||
1 1 ALL(NP) 2 1 0/4/6 0.4 0.32 0.6533 | ||
1 2 ALL(NP) 2 1 2/4/6 0.3333 0.4444 0.3668 | ||
1 3 ALL(NP) 2 1 0/5/7 0.4167 0.3299 0.7019 | ||
1 4 ALL(NP) 1 2 2/4/5 0.3636 0.4628 0.3643 | ||
1 5 ALL(NP) 2 1 0/7/5 0.5833 0.4132 0.341 | ||
1 6 ALL(NP) 2 1 1/6/3 0.6 0.48 0.7866 | ||
1 7 ALL(NP) 2 1 1/5/5 0.4545 0.4339 0.7399 | ||
1 8 ALL(NP) 2 1 0/8/4 0.6667 0.4444 0.1299 | ||
1 9 ALL(NP) 2 1 0/6/5 0.5455 0.3967 0.3065 | ||
1 10 ALL(NP) 1 2 2/7/3 0.5833 0.4965 0.7969 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
1 1 | ||
2 2 | ||
3 3 | ||
4 4 | ||
5 5 | ||
6 6 | ||
7 7 | ||
8 8 | ||
9 9 | ||
10 10 | ||
11 11 | ||
12 12 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
test_that("augment_loci adds to loci_table",{ | ||
bed_file <- system.file("extdata", "example-missing.bed", package = "bigsnpr") | ||
missing_gt <- gen_tibble(bed_file, backingfile = tempfile("missing_"),quiet=TRUE) | ||
missing_gt <- gt_impute_simple(missing_gt) | ||
missing_pca <- missing_gt %>% gt_pca_partialSVD() | ||
|
||
#Add loadings to loci table | ||
missing_pca_load <- augment_loci(missing_pca, data = missing_gt) | ||
expect_true(all(colnames(missing_pca_load) == c(colnames(show_loci(missing_gt)),paste0(".loadingPC", c(1:10))))) | ||
|
||
#Try assigning loadings to object with fewer loci | ||
missing_gt_rm <- missing_gt %>% select_loci(c(1:400)) | ||
expect_error(augment_loci(missing_pca, data = missing_gt_rm),"the loci names in 'data' do not correspond to the loci in the pca object ") | ||
|
||
|
||
}) |
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
Oops, something went wrong.