You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: vagrantDNA/DESCRIPTION
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
Package: vagrantDNA
2
2
Type: Package
3
3
Title: Estimating the proportion of vagrant DNA in a genome
4
-
Version: 1.0.1
4
+
Version: 1.1.0
5
5
Author: Richard Nichols and Hannes Becher
6
6
Maintainer: The package maintainer <r.a.nichols@qmul.ac.uk>
7
7
Description: The package two functions rainbowPlot and divEst. They produce two different estimates of the proportion of DNA from a particular vagrant genome. They exploit low coverge data from multiple individuals in which the vagrant DNA has taken residence (see Becher and Nichols 2022).
Copy file name to clipboardExpand all lines: vagrantDNA/R/Rainbow_Plot.R
+17-15Lines changed: 17 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -21,17 +21,20 @@
21
21
#'
22
22
#' @param data A data.frame with at least the following columns.
23
23
#' \describe{
24
-
#' \item{AltProp}{A numberic vector giving the proportion (of reads mapping to the exogenous genome) that carry the non-standard alleles thought to be in the vagrant copies}
25
-
#' \item{Position}{A factor (or structure that can be coerced to a factor),
26
-
#' giving a unique name for each SNP location.}
27
24
#' \item{Sample}{A factor (or structure that can be coerced to a factor),
28
25
#' giving a unique name for each sample.}
26
+
#' \item{Position}{A factor (or structure that can be coerced to a factor),
27
+
#' giving a unique name for each SNP location.}
28
+
#' \item{AltProp}{A numeric vector giving the proportion (of reads mapping to
29
+
#' the exogenous genome) that carry the non-standard alleles (thought to be in
30
+
#' the vagrant copies)}
31
+
#' \item{DP}{A numeric vector giving the mapping depth at each site}
32
+
#' \item{nMapped}{A numeric vector giving the number of base pairs in this
33
+
#' sample's sequencing data that were successfully aligned to the extranuclear
34
+
#' reference}
35
+
#' \item{nTot}{A numeric vector giving the total number of base pairs of the sample's
36
+
#' mapping data (ideally after quality control, filtering, read trimming, ect.)}
29
37
#' \item{ylog}{A numeric vector giving the log(AltProp)}
30
-
#' \item{DP}{A numeric vector giving the mapping depth of at each sites}
31
-
#' \item{nMapped}{A numeric vector giving the mapping depth of at each sites}
#' where m is the number of nucleotides mapping to the exogenous genome and
34
-
#' N is the remaining nucleotides in the sequencing data.}
35
38
#' }
36
39
#' @param nloci The number of loci to be selected for the analysis. Default, 400.
37
40
#' @param minWt The minimum average allele frequency of SNPs to be included in the analysis.
@@ -40,12 +43,12 @@
40
43
#' in the analysis. Default, 0.7.
41
44
#' @param minSamples The minimum number of samples in which a SNP should be called in order to
42
45
#' be included in the analysis.
43
-
#' @param filterHard If filterHard is TRUE, the SNP loci with slopes in the outer quartiles are
44
-
#' discarded. Otherwise the outliers identified by the default method of boxplot.stats function
45
-
#' are discarded. Default, TRUE.
46
46
#' @param seed Random number seed.
47
47
#' @param title User-supplied title for the rainbow plot.
48
-
#' @param printout If printout is TRUE, the function prints the estimates. Default, TRUE.
48
+
#' @param printout If printout is TRUE, the function prints the estimates. Default, `TRUE`.
49
+
#' @param correctForDepth Logical, whether of not to correct for uneven insertion rates along the extranuclear sequence. Not usually required. Default is `FALSE`.
50
+
#' @param weigh Logical. Whether or not to select loci with high allele frequencies. Default is `TRUE`.
51
+
#' @param extraNucLen Numeric. Length of the extranuclear genome reference. Only required when `correctForDepth` is set to `TRUE`. Default is 16000.
49
52
#' @return An invisible list with the following elements.
50
53
#' \describe{
51
54
#' \item{$intercepts}{A vector giving the intercept estimate,
@@ -68,7 +71,7 @@
68
71
#' ## n.b. hopperDF is too large to be included in the package's data
#' These data sets give allele frequencies generated from whole-genome
4
+
#' sequencing data mapped against mitochondrial genome references.
5
+
#'
6
+
#' @format Each is a data.frame.
7
+
#' [species]DF just contain variant calling data.
8
+
#' The columns are:
9
+
#' \describe{
10
+
#' \item{Sample}{A character vector giving a unique name for each sample}
11
+
#' \item{Position}{A numeric vector giving the positio of each SNP}
12
+
#' \item{AltProp}{A numeric vector giving the proportion (of reads mapping to the exogenous genome) that carry the non-standard alleles (thought to be in the vagrant copies)}
13
+
#' \item{DP}{A numeric vector giving the mapping depth at each site}
14
+
#' \item{nMapped}{A numeric vector giving the number of base pairs in this sample's sequencing data that were successfully aligned to the extranuclear reference}
15
+
#' \item{nTot}{A numeric vector giving the total number of base pairs of the sample's mapping data (ideally after quality control, filtering, read trimming, ect.)}
16
+
#' \item{ylog}{A numeric vector giving the log of `AltProp`}
17
+
#' }
18
+
#' [species]FX were generated from species with diverged populations. These
19
+
#' contain information on sites with fixed differences. The columns are:
20
+
#' \describe{
21
+
#' \item{pos}{A vector giving the site IDs}
22
+
#' \item{sample}{A vector, giving a unique name for each individual genotyped}
23
+
#' \item{g1}{A numeric vector giving the allele count of allele 1}
24
+
#' \item{g2}{A numeric vector giving the allele count of allele 2}
25
+
#' \item{g3}{A numeric vector giving the allele count of allele 3}
26
+
#' \item{g4}{A numeric vector giving the allele count of allele 4}
27
+
#' \item{N}{A numeric vector giving the number of bp in the read data that did not map to the vargrant DNA reference in this individual}
28
+
#' \item{M}{A numeric vector giving the number of bp in the read data that did map to the vargrant DNA reference in this individual}
29
+
#' \item{pop}{A factor (or structure that can be coerced to a factor), of "A" and "B" denoting which population the individual belongs to}
30
+
#' \item{A}{A numeric vector giving the number of the major allele at this site in population A}
31
+
#' \item{B}{A numeric vector giving the number of the major allele at this site in population B}
0 commit comments