From 33d408d89dcb6796efd43ff1cb839ca892a95f35 Mon Sep 17 00:00:00 2001 From: Martin Petr Date: Mon, 15 Jun 2020 17:41:06 +0200 Subject: [PATCH] Update docs --- docs/LICENSE-text.html | 2 +- docs/LICENSE.html | 4 +- docs/articles/index.html | 2 +- docs/articles/tutorial.html | 64 +++++++++++++++------------- docs/authors.html | 2 +- docs/index.html | 2 +- docs/news/index.html | 12 +++++- docs/pkgdown.yml | 2 +- docs/reference/count_snps.html | 2 +- docs/reference/download_data.html | 2 +- docs/reference/eigenstrat.html | 2 +- docs/reference/f4ratio.html | 2 +- docs/reference/filter_bed.html | 2 +- docs/reference/index.html | 2 +- docs/reference/merge_eigenstrat.html | 2 +- docs/reference/pipe.html | 2 +- docs/reference/print.EIGENSTRAT.html | 2 +- docs/reference/qpAdm.html | 2 +- docs/reference/qpWave.html | 2 +- docs/reference/read_ind.html | 2 +- docs/reference/relabel.html | 2 +- docs/reference/reset.html | 2 +- docs/reference/write_ind.html | 2 +- 23 files changed, 67 insertions(+), 53 deletions(-) diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index ddb0446..f62110b 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -71,7 +71,7 @@ admixr - 0.8.1 + 0.8.6 diff --git a/docs/LICENSE.html b/docs/LICENSE.html index 70a65b1..a179754 100644 --- a/docs/LICENSE.html +++ b/docs/LICENSE.html @@ -71,7 +71,7 @@ admixr - 0.8.1 + 0.8.6 @@ -127,7 +127,7 @@

MIT License

-

Copyright (c) 2018 Martin Petr

+

Copyright (c) 2020 Martin Petr

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

diff --git a/docs/articles/index.html b/docs/articles/index.html index dfa1bfc..db72def 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -71,7 +71,7 @@ admixr - 0.8.1 + 0.8.6
diff --git a/docs/articles/tutorial.html b/docs/articles/tutorial.html index abfb7bc..f71a120 100644 --- a/docs/articles/tutorial.html +++ b/docs/articles/tutorial.html @@ -31,7 +31,7 @@ admixr - 0.8.1 + 0.8.6 @@ -94,6 +94,9 @@

2020-06-15

+
+

+eval = ifelse(system(“which qpDstat”, ignore.stdout = TRUE) == 0, TRUE, FALSE) # don’t eval on Windows

Introduction

@@ -140,12 +143,12 @@

Therefore, a VCF file is essentially a combination of all three files in a single package.

Let’s first download a small testing SNP dataset using a built-in admixr function download_data(). This function downloads the data into a temporary directory (you can specify the destination using its dirname argument, in case you want to place it elsewhere). In addition to this, the function returns a shared path/prefix of the whole dataset.

(prefix <- download_data())
-[1] "/var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp9pPPTo/snps/snps"
+[1] "/var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp2N7gDf/snps/snps"

We can verify that there are indeed three files with this prefix:

list.files(path = dirname(prefix), pattern = basename(prefix), full.names = TRUE)
-[1] "/var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp9pPPTo/snps/snps.geno"
-[2] "/var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp9pPPTo/snps/snps.ind" 
-[3] "/var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp9pPPTo/snps/snps.snp" 
+[1] "/var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp2N7gDf/snps/snps.geno" +[2] "/var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp2N7gDf/snps/snps.ind" +[3] "/var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp2N7gDf/snps/snps.snp"

Let’s look at their contents:

@@ -214,9 +217,9 @@

#> EIGENSTRAT object #> ================= #> components: -#> ind file: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp9pPPTo/snps/snps.ind -#> snp file: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp9pPPTo/snps/snps.snp -#> geno file: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp9pPPTo/snps/snps.geno

+#> ind file: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp2N7gDf/snps/snps.ind +#> snp file: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp2N7gDf/snps/snps.snp +#> geno file: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp2N7gDf/snps/snps.geno

This object encapsulates the paths to all three EIGENSTRAT components and makes it easy to pass the data to different admixr functions.

The following couple of sections describe how to use the admixr package using simple example analyses.

@@ -1031,12 +1034,12 @@

#> EIGENSTRAT object #> ================= #> components: -#> ind file: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp9pPPTo/snps/snps.ind -#> snp file: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp9pPPTo/snps/snps.snp -#> geno file: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp9pPPTo/snps/snps.geno +#> ind file: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp2N7gDf/snps/snps.ind +#> snp file: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp2N7gDf/snps/snps.snp +#> geno file: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp2N7gDf/snps/snps.geno #> #> modifiers: -#> groups: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp9pPPTo/file1181d4c804110.ind +#> groups: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp2N7gDf/file3b82687d2d6.ind

We can see that the function relabel returned a modified EIGENSTRAT object, which contains a new item in the “modifiers” section - the path to a new ind file. Let’s look at its contents:

Chimp        U  Chimp
 Mbuti        U  African
@@ -1194,12 +1197,12 @@ 

#> EIGENSTRAT object #> ================= #> components: -#> ind file: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp9pPPTo/snps/snps.ind -#> snp file: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp9pPPTo/snps/snps.snp -#> geno file: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp9pPPTo/snps/snps.geno +#> ind file: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp2N7gDf/snps/snps.ind +#> snp file: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp2N7gDf/snps/snps.snp +#> geno file: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp2N7gDf/snps/snps.geno #> #> modifiers: -#> excluded sites: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp9pPPTo/file1181d5d188ae6.snp +#> excluded sites: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp2N7gDf/file3b872dcd7e5.snp #> (SNPs excluded: 100000, SNPs remaining: 400000)

If we want to run the whole analysis in a single pipeline, we can use the %>% pipe operator and do the following:

(The %>% operator takes what is on its left side and puts it as a first argument of a function on the right side. While it takes some time to get used to, it is very useful in longer multi-step “pipelines” because it makes more pipelines much more readable. In fact, the resulting code often reads almost like English! The %>% pipe is automatically imported when you load the tidyverse library, and you can read about it more here.)

@@ -1255,13 +1258,13 @@

#> Full output log of qpDstat: #> ================================================== #> -#> qpDstat: parameter file: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp9pPPTo/qpDstat__1697917865.par +#> qpDstat: parameter file: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp2N7gDf/qpDstat__312145976.par #> ### THE INPUT PARAMETERS #> ##PARAMETER NAME: VALUE -#> genotypename: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp9pPPTo/snps/snps.geno -#> snpname: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp9pPPTo/snps/snps.snp -#> indivname: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp9pPPTo/snps/snps.ind -#> popfilename: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp9pPPTo/qpDstat__1697917865.pop +#> genotypename: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp2N7gDf/snps/snps.geno +#> snpname: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp2N7gDf/snps/snps.snp +#> indivname: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp2N7gDf/snps/snps.ind +#> popfilename: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp2N7gDf/qpDstat__312145976.pop #> printsd: YES #> ## qpDstat version: 900 #> number of quadruples 3 @@ -1278,7 +1281,7 @@

#> result: French Yoruba Vindija Chimp 0.0313 0.006933 4.510 15802 14844 487753 #> result: Han Yoruba Vindija Chimp 0.0278 0.006609 4.199 15780 14928 487925 #> result: Dinka Yoruba Vindija Chimp -0.0009 0.006124 -0.151 15131 15159 487667 -#> ##end of qpDstat: 3.585 seconds cpu 0.000 Mbytes in use +#> ##end of qpDstat: 4.034 seconds cpu 0.000 Mbytes in use

The situation is a bit more complex for qpAdm which can be evaluated for multiple target populations/samples which are then analyzed separately, with each analysis having its own log file:

qpadm_res <- qpAdm(
   target = c("Sardinian", "Han"),
@@ -1319,19 +1322,19 @@ 

#> Full output log of qpAdm for target 'Han': #> ================================================== #> -#> qpAdm: parameter file: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp9pPPTo/qpAdm__2137506949.par +#> qpAdm: parameter file: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp2N7gDf/qpAdm__1184495305.par #> ### THE INPUT PARAMETERS #> ##PARAMETER NAME: VALUE -#> genotypename: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp9pPPTo/snps/snps.geno -#> snpname: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp9pPPTo/snps/snps.snp -#> indivname: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp9pPPTo/snps/snps.ind -#> popleft: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp9pPPTo/qpAdm__2137506949.popleft -#> popright: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp9pPPTo/qpAdm__2137506949.popright +#> genotypename: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp2N7gDf/snps/snps.geno +#> snpname: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp2N7gDf/snps/snps.snp +#> indivname: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp2N7gDf/snps/snps.ind +#> popleft: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp2N7gDf/qpAdm__1184495305.popleft +#> popright: /var/folders/t7/9gjtb6m92flbnp930618vt3r0000gn/T//Rtmp2N7gDf/qpAdm__1184495305.popright #> allsnps: YES #> summary: YES #> details: YES #> ## qpAdm version: 1000 -#> seed: -1619221140 +#> seed: 292963875 #> #> left pops: #> Han @@ -1422,7 +1425,7 @@

#> gendstat: Chimp Altai -0.260 #> gendstat: Denisova Altai 1.118 #> -#> ##end of qpAdm: 3.479 seconds cpu 0.000 Mbytes in use

+#> ##end of qpAdm: 3.705 seconds cpu 0.000 Mbytes in use

Finally, we might want to keep some of the log files around for future reference, further debugging or sharing with others. For these purposes, we can run the loginfo function with the argument save = TRUE, potentially also specifying the output directory (dir = "." by default) or a prefix of the output file(s) (default prefix is simply the name of the admixr command which generated the log file).

For example, the following will save the result of our qpAdm analysis of Neandertal ancestry to a file with a prefix “qpAdm_Neandertal_ancestry”, but just the one for the Sardinian individual:

loginfo(qpadm_res, target = "Sardinian", save = TRUE, prefix = "qpAdm_Neandertal_ancestry")
@@ -1430,6 +1433,7 @@


Creative Commons License

This work is licensed under a Creative Commons Attribution 4.0 International License.

+ diff --git a/docs/authors.html b/docs/authors.html index aa2700e..2a2749f 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -71,7 +71,7 @@ admixr - 0.8.1 + 0.8.6 diff --git a/docs/index.html b/docs/index.html index f9e7276..6e536b3 100644 --- a/docs/index.html +++ b/docs/index.html @@ -38,7 +38,7 @@ admixr - 0.8.1 + 0.8.6 diff --git a/docs/news/index.html b/docs/news/index.html index 9df8e58..bfd5023 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -71,7 +71,7 @@ admixr - 0.8.1 + 0.8.6 @@ -126,6 +126,16 @@

Changelog

Source: NEWS.md +
+

+admixr 0.8.6

+
    +
  • Satisfying further checks on various testing servers.
  • +
  • Cleanup of tests and imports.
  • +
  • Updated license.
  • +
  • Prepared for the first CRAN submission.
  • +
+

admixr 0.8.1

diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index e6d003d..4ccc335 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -3,5 +3,5 @@ pkgdown: 1.5.1 pkgdown_sha: ~ articles: tutorial: tutorial.html -last_built: 2020-06-15T08:04Z +last_built: 2020-06-15T15:38Z diff --git a/docs/reference/count_snps.html b/docs/reference/count_snps.html index 6def83c..130adf1 100644 --- a/docs/reference/count_snps.html +++ b/docs/reference/count_snps.html @@ -72,7 +72,7 @@ admixr - 0.8.1 + 0.8.6
diff --git a/docs/reference/download_data.html b/docs/reference/download_data.html index 50eda55..38f84c4 100644 --- a/docs/reference/download_data.html +++ b/docs/reference/download_data.html @@ -72,7 +72,7 @@ admixr - 0.8.1 + 0.8.6 diff --git a/docs/reference/eigenstrat.html b/docs/reference/eigenstrat.html index 54fbf01..fdc30d1 100644 --- a/docs/reference/eigenstrat.html +++ b/docs/reference/eigenstrat.html @@ -73,7 +73,7 @@ admixr - 0.8.1 + 0.8.6 diff --git a/docs/reference/f4ratio.html b/docs/reference/f4ratio.html index a2f28b8..7ec9e51 100644 --- a/docs/reference/f4ratio.html +++ b/docs/reference/f4ratio.html @@ -72,7 +72,7 @@ admixr - 0.8.1 + 0.8.6 diff --git a/docs/reference/filter_bed.html b/docs/reference/filter_bed.html index 5503b0b..a5f346c 100644 --- a/docs/reference/filter_bed.html +++ b/docs/reference/filter_bed.html @@ -73,7 +73,7 @@ admixr - 0.8.1 + 0.8.6 diff --git a/docs/reference/index.html b/docs/reference/index.html index 96e393d..0827090 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -71,7 +71,7 @@ admixr - 0.8.1 + 0.8.6 diff --git a/docs/reference/merge_eigenstrat.html b/docs/reference/merge_eigenstrat.html index 6a47a30..b7aba4e 100644 --- a/docs/reference/merge_eigenstrat.html +++ b/docs/reference/merge_eigenstrat.html @@ -72,7 +72,7 @@ admixr - 0.8.1 + 0.8.6 diff --git a/docs/reference/pipe.html b/docs/reference/pipe.html index cfb3f80..5c315f6 100644 --- a/docs/reference/pipe.html +++ b/docs/reference/pipe.html @@ -72,7 +72,7 @@ admixr - 0.8.1 + 0.8.6 diff --git a/docs/reference/print.EIGENSTRAT.html b/docs/reference/print.EIGENSTRAT.html index 3863090..8a66320 100644 --- a/docs/reference/print.EIGENSTRAT.html +++ b/docs/reference/print.EIGENSTRAT.html @@ -72,7 +72,7 @@ admixr - 0.8.1 + 0.8.6 diff --git a/docs/reference/qpAdm.html b/docs/reference/qpAdm.html index d8fff8f..af5ccc7 100644 --- a/docs/reference/qpAdm.html +++ b/docs/reference/qpAdm.html @@ -72,7 +72,7 @@ admixr - 0.8.1 + 0.8.6 diff --git a/docs/reference/qpWave.html b/docs/reference/qpWave.html index c336d3c..95cb4a2 100644 --- a/docs/reference/qpWave.html +++ b/docs/reference/qpWave.html @@ -73,7 +73,7 @@ admixr - 0.8.1 + 0.8.6 diff --git a/docs/reference/read_ind.html b/docs/reference/read_ind.html index 79fb0d4..78d0a45 100644 --- a/docs/reference/read_ind.html +++ b/docs/reference/read_ind.html @@ -72,7 +72,7 @@ admixr - 0.8.1 + 0.8.6 diff --git a/docs/reference/relabel.html b/docs/reference/relabel.html index 459a554..f4f1117 100644 --- a/docs/reference/relabel.html +++ b/docs/reference/relabel.html @@ -72,7 +72,7 @@ admixr - 0.8.1 + 0.8.6 diff --git a/docs/reference/reset.html b/docs/reference/reset.html index f0a5db6..4b02028 100644 --- a/docs/reference/reset.html +++ b/docs/reference/reset.html @@ -73,7 +73,7 @@ admixr - 0.8.1 + 0.8.6 diff --git a/docs/reference/write_ind.html b/docs/reference/write_ind.html index 26399db..76aad82 100644 --- a/docs/reference/write_ind.html +++ b/docs/reference/write_ind.html @@ -72,7 +72,7 @@ admixr - 0.8.1 + 0.8.6