View source: R/poolne_estim_output.R
poolne_estim_output | R Documentation |
poolne_estim
outputsSearches a user specified directory for summary_pi.out
or summary_ne_eps.out
files,
which are the output files from poolne_estim
containing estimates of population allele frequencies
and effective pool size (respectively), merging these outputs into a single data.table.
poolne_estim_output(stat=c('pi', 'ne'), datDir=NA, lociDir=NA)
stat |
Character: One of 'pi' (population allele frequency estimates) or 'ne' (effective pool size estimates). Default = NA. |
datDir |
Character: A directory to search for |
lociDir |
Character: A directory to search for |
If merging summary_pi.out
files, Loci.txt
files are also required, which have
the names of the loci in the same order as the rows in the summary_pi.out
file.
The Loci.txt
files are produced by the function poolne_estim_input
.
Files are expected to follow the naming convention: [runID]_[poolID]_summary_pi.out
,
[runID]_[poolID]_summary_ne_eps.out
and [runID]_[poolID]_Loci.txt
.
The [runID]
[poolID]
portion is used to assign run ID and the population pool ID, respectively.
If stat = 'pi'
, a data.table with the following columns is returned:
$MRK
= The marker number, as used in poolne_estim
.
$PI
= The poolne_estim
posterior mean of the population Ref allele
frequency, pi.
$SD
= The poolne_estim
estimate of the standard deviation in PI
.
$POOL
= The population pool ID.
$RUN
= The run ID.
$CHROM
= The chromosome ID.
$LOCUS
= The locus ID.
If stat = 'ne'
, a data.table with the following columns is returned:
$POOL
= The population pool ID.
$RUN
= The run ID.
$SAMPLE
= The replicate sample ID, as used in poolne_estim
.
$NEuntr
= The untruncated poolne_estim
posterior mean effective pool-size, ne.
$SD.NEuntr
= The standard deviation of NEraw
.
$NE
= The truncated poolne_estim
posterior mean effective pool-size, ne.
$SD.NE
= The standard deviation of NE
.
$E
= The poolne_estim
posterior mean of the experimental error, epsilon.
$SD.E
= The standard deviation of E
.
$PER
= Percent acceptance.
$ACCRATE
= The acceptance rate of the chain.
# Create a link to raw external datasets in genomalicious
genomaliciousExtData <- paste0(find.package('genomalicious'), '/extdata')
# Use list.files() to show the summary_pi.out, Loci.txt and
# summary_ne_eps.out text files
list.files(genomaliciousExtData, pattern='summary_pi.out')
list.files(genomaliciousExtData, pattern='Loci.txt')
list.files(genomaliciousExtData, pattern='summary_ne_eps.out')
# Merge the outputs
pi.data <- poolne_estim_output(stat='pi', datDir=genomaliciousExtData, lociDir=genomaliciousExtData)
ne.data <- poolne_estim_output(stat='ne', datDir=genomaliciousExtData)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.