diff --git a/articles/a01_overview.html b/articles/a01_overview.html index f717e567..f3218c51 100644 --- a/articles/a01_overview.html +++ b/articles/a01_overview.html @@ -188,12 +188,12 @@
gen_tibble
loci=example_loci,
backingfile = tempfile())
#>
-#> gen_tibble saved to /tmp/Rtmp5t9vcd/file20465c7dff6.gt
-#> using bigSNP file: /tmp/Rtmp5t9vcd/file20465c7dff6.rds
-#> with backing file: /tmp/Rtmp5t9vcd/file20465c7dff6.bk
+#> gen_tibble saved to /tmp/RtmpGUqF2C/file1c8654cd39c7.gt
+#> using bigSNP file: /tmp/RtmpGUqF2C/file1c8654cd39c7.rds
+#> with backing file: /tmp/RtmpGUqF2C/file1c8654cd39c7.bk
#> make sure that you do NOT delete those files!
#> to reload the gen_tibble in another session, use:
-#> gt_load('/tmp/Rtmp5t9vcd/file20465c7dff6.gt')
+#> gt_load('/tmp/RtmpGUqF2C/file1c8654cd39c7.gt')
We are provided information on where the three files underlying the genotype information are stored. As we don’t want to keep the files, we used the tmp directory; normally you will want to use your working @@ -535,15 +535,16 @@
gt_file_name <- gt_save(example_gt)
#>
-#> gen_tibble saved to /tmp/Rtmp5t9vcd/file20465c7dff6.gt
-#> using bigSNP file: /tmp/Rtmp5t9vcd/file20465c7dff6.rds
-#> with backing file: /tmp/Rtmp5t9vcd/file20465c7dff6.bk
+#> gen_tibble saved to /tmp/RtmpGUqF2C/file1c8654cd39c7.gt
+#> using bigSNP file: /tmp/RtmpGUqF2C/file1c8654cd39c7.rds
+#> with backing file: /tmp/RtmpGUqF2C/file1c8654cd39c7.bk
#> make sure that you do NOT delete those files!
#> to reload the gen_tibble in another session, use:
-#> gt_load('/tmp/Rtmp5t9vcd/file20465c7dff6.gt')
+#> gt_load('/tmp/RtmpGUqF2C/file1c8654cd39c7.gt')
gt_file_name
-#> [1] "/tmp/Rtmp5t9vcd/file20465c7dff6.gt" "/tmp/Rtmp5t9vcd/file20465c7dff6.rds"
-#> [3] "/tmp/Rtmp5t9vcd/file20465c7dff6.bk"
+#> [1] "/tmp/RtmpGUqF2C/file1c8654cd39c7.gt"
+#> [2] "/tmp/RtmpGUqF2C/file1c8654cd39c7.rds"
+#> [3] "/tmp/RtmpGUqF2C/file1c8654cd39c7.bk"
In a later session, we could reload the data with:
new_example_gt <- gt_load(gt_file_name[1])
@@ -567,12 +568,12 @@ Saving and reading databed_path_pop_a <- system.file("extdata/pop_a.bed", package = "tidypopgen")
pop_a_gt <- gen_tibble(bed_path_pop_a, backingfile = tempfile("pop_a_"))
#>
-#> gen_tibble saved to /tmp/Rtmp5t9vcd/pop_a_204677dd1a74.gt
-#> using bigSNP file: /tmp/Rtmp5t9vcd/pop_a_204677dd1a74.rds
-#> with backing file: /tmp/Rtmp5t9vcd/pop_a_204677dd1a74.bk
+#> gen_tibble saved to /tmp/RtmpGUqF2C/pop_a_1c864952544c.gt
+#> using bigSNP file: /tmp/RtmpGUqF2C/pop_a_1c864952544c.rds
+#> with backing file: /tmp/RtmpGUqF2C/pop_a_1c864952544c.bk
#> make sure that you do NOT delete those files!
#> to reload the gen_tibble in another session, use:
-#> gt_load('/tmp/Rtmp5t9vcd/pop_a_204677dd1a74.gt')
For this vignette, we don’t want to keep files, so we are using again
a temporary path for the backing files, but in normal instances, we can
simply omit the backingfile
parameter, and the
@@ -588,7 +589,7 @@
gt_as_plink(example_gt, file = tempfile("new_bed_"))
-#> [1] "/tmp/Rtmp5t9vcd/new_bed_20461ac5918a.bed"
This will also write a .bim and .fam file and save them together with
the .bed file. Note that, from the main tibble, only id
,
population
and sex
will be preserved in the
@@ -622,22 +623,22 @@
And inspect them:
+#> gt_load('/tmp/RtmpGUqF2C/gt_merged.gt')Let’s check the resulting gen_tibble
:
merged_gt
@@ -772,12 +773,12 @@ Imputationbed_file <- system.file("extdata", "example-missing.bed", package = "bigsnpr")
missing_gt <- gen_tibble(bed_file, backingfile = tempfile("missing_"))
#>
-#> gen_tibble saved to /tmp/Rtmp5t9vcd/missing_204656d10a07.gt
-#> using bigSNP file: /tmp/Rtmp5t9vcd/missing_204656d10a07.rds
-#> with backing file: /tmp/Rtmp5t9vcd/missing_204656d10a07.bk
+#> gen_tibble saved to /tmp/RtmpGUqF2C/missing_1c86fbef6a7.gt
+#> using bigSNP file: /tmp/RtmpGUqF2C/missing_1c86fbef6a7.rds
+#> with backing file: /tmp/RtmpGUqF2C/missing_1c86fbef6a7.bk
#> make sure that you do NOT delete those files!
#> to reload the gen_tibble in another session, use:
-#> gt_load('/tmp/Rtmp5t9vcd/missing_204656d10a07.gt')
+#> gt_load('/tmp/RtmpGUqF2C/missing_1c86fbef6a7.gt')
missing_gt
#> # A gen_tibble: 500 loci
#> # A tibble: 200 × 3
diff --git a/articles/a02_qc.html b/articles/a02_qc.html
index b85a7051..b7e06821 100644
--- a/articles/a02_qc.html
+++ b/articles/a02_qc.html
@@ -316,15 +316,15 @@ Save
##
-## gen_tibble saved to /tmp/RtmpiLvqvN/file20944df8f4e3.gt
-## using bigSNP file: /tmp/RtmpiLvqvN/file20944759736e.rds
-## with backing file: /tmp/RtmpiLvqvN/file20944759736e.bk
+## gen_tibble saved to /tmp/Rtmpou4CMz/file1ce12710f1e4.gt
+## using bigSNP file: /tmp/Rtmpou4CMz/file1ce13b6286ec.rds
+## with backing file: /tmp/Rtmpou4CMz/file1ce13b6286ec.bk
## make sure that you do NOT delete those files!
## to reload the gen_tibble in another session, use:
-## gt_load('/tmp/RtmpiLvqvN/file20944df8f4e3.gt')
-## [1] "/tmp/RtmpiLvqvN/file20944df8f4e3.gt"
-## [2] "/tmp/RtmpiLvqvN/file20944759736e.rds"
-## [3] "/tmp/RtmpiLvqvN/file20944759736e.bk"
+## gt_load('/tmp/Rtmpou4CMz/file1ce12710f1e4.gt')
+## [1] "/tmp/Rtmpou4CMz/file1ce12710f1e4.gt"
+## [2] "/tmp/Rtmpou4CMz/file1ce13b6286ec.rds"
+## [3] "/tmp/Rtmpou4CMz/file1ce13b6286ec.bk"
geno_file <- gt_as_geno_lea(anole_gt)
geno_file
-#> [1] "/tmp/RtmpQcaSEW/anolis_20da72d6bc60.geno"
+#> [1] "/tmp/RtmpPQ5ffe/anolis_1d2516b2763b.geno"
Note that the .geno file is placed by default in the same directory
and using the same name as the backing file of the
gen_tibble
gen_tibble
objectgt_pcadapt.Rd
pcadapt is an algorithm that detects genetic markers under selection. It is based on the
+principal component analysis (PCA) of the genotypes of the individuals.
+The method is described in Luu et al. (2017),
+See the R package pcadapt
, which provides extensive
+documentation and examples.
gt_pcadapt(x, pca, k, n_cores = 1)
A gen_tibble
object.
a gt_pca
object, as returned by gt_pca_partialSVD()
or gt_pca_randomSVD()
.
Number of principal components to use in the analysis.
Number of cores to use.
An object of subclass gt_pcadapt
, a subclass of mhtest
.
Internally, this function uses the snp_pcadapt
function from the bigsnpr
package.
gt_pca_randomSVD()
PCA for gen_tibble
objects by randomized partial SVD
pcadapt analysis on a gen_tibble
object