Lin.reg.distance: Linear regression of empirical genetic relatedness with...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/Lin.reg.distance.R

Description

Function calculates mantel statistics and exports plots and matrices for regression of empirical genetic relatedness with geographic distance.

Usage

1
2
3
4
5
6
     Lin.reg.distance(dist.m, emp.dist, pairs, tab.pop.pop, 
                      offhalf.list, offfull.list, 
                      relate.off.non.Mxy.mean, file.output, 
                      directory.name, out.name, inputdata, 
                      object, value, iteration)
     

Arguments

dist.m

Object provided by geo.dist.

emp.dist

Empirical relatedness of population.

pairs

Number of bootstrap replicates to calculate confidence interval for linear regression.

tab.pop.pop

Population information to model linear fit.

offhalf.list

Object - matrix of mean pairwise relatedness of each randomized comparison of half siblings.

offfull.list

Object - matrix of mean pairwise relatedness of each randomized comparison of full siblings.

relate.off.non.Mxy.mean

Object - matrix of mean pairwise relatedness of each randomized comparison of non relatives.

file.output

logical - Should a cluster dendogram, histograms and .txt files be sent as standard output in your working directory. In some cases (inflating NA values) it may be necessary that this value has to be set as FALSE due to problems in calculating clusters on pairwise NA values.

directory.name

Name of the directory results are sent to.

out.name

Filename of the output.

inputdata

R object or external file to be read internally with standard Demerelate inputformat. Dataframe will be split by population information and calculations will run separately. If no reference population information is specified (reference.pop = "NA") all information on loci are used as reference by omitting population information.

object

Information whether inputdata are an object or should be read in as file.

value

String defining method to calculate allele sharing or similarity estimates. Can be set as "Bxy", "Sxy", "Mxy", "Li", "lxy", "rxy", "loiselle", "wang.fin", "wang", "ritland", "morans.fin" or "morans" allele.sharing.

iteration

Number of bootstrap iterations in F_{is} calculations.

Details

Mantel statistics is calculated by mantel(...) from vegan package for datasets. Similarities are transformed to distances by D=1-S for each estimator. For visualization a scatterplot is exported with relatedness thresholds calculated for each dataset to get an idea of the relatedness between genetic and geographic distance in addition to mantel statistics.

Value

Total-Regression.Population.pdf

Containing regression plot and linear fit for geographic distance and genetic relatedness. Randomly generated populations for Full siblings, Halfsiblings and Non related individuals are used as optical reference in the plot. The mean relatedness of each population is plotted as line - blue dotted line for full siblings, red dotted line for half siblings and black dotted line for non related individuals.

Relate.mean.Populationout.name.txt

A summary of correlation of relatedness with geographic distance.

Summary statistics from mantel correlation of geogrphical distance and mean relatedness over loci are exported as list object.

Author(s)

Philipp Kraemer, <philipp.kraemer@uni-oldenburg.de>

References

Oksanen, J. et al. (2013) vegan: Community Ecology Package. R package version 2.0-8

See Also

geo.dist allele.sharing Demerelate

Examples

1
2
3
4
    ## internal function not intended for direct use
    
     
     

Demerelate documentation built on May 2, 2019, 4:01 p.m.