msap: Diversity analysis of MSAP data

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

View source: R/msap.R

Description

It performs all the analysis of MSAP data in order to asses both epigenetic and genetic diversity.

Usage

1
2
3
4
5
	msap(datafile, name=datafile, no.bands = "u", nDec=4, meth=TRUE, 
  rm.redundant=TRUE,   rm.monomorphic=TRUE, do.pcoa=TRUE, 
  do.shannon=TRUE, do.amova=TRUE, do.pairwisePhiST=FALSE, 
  do.cluster=TRUE, use.groups=NULL, do.mantel=FALSE, np.mantel=1000, 
  loci.per.primer=NULL, error.rate.primer=NULL, uninformative=TRUE)

Arguments

datafile

String containing the url of the csv file with the data. Required.

name

a name for the dataset to be included in the output files. By default, the name of the given datafile is used.

no.bands

String to indicate how to deal with HPA-/MSP- pattern in MSL, with two possible values: 'h' for hypermethylated state and 'u' for uninformative state (default).

With 'h' researcher assumes that HPA-/MSP- (no band for both isoschizomers) pattern represents full methylation of cytosines in the target (hypermethylation) ignoring the chance of genetic change in the target. This approach could be very useful when no much genetic differences are expected between samples (i.e. the same individuals are compared for different treatments). In this case HPA-/MSP- will compute as 'methylated' state in the binary matrix used for subsequent analysis.

With 'u' (default value), researcher considers that pattern as uninformative as could be caused by a missing target (mutation) as well as by hypermethylation. So, in this case, HPA-/MSP- will compute as missing values in the binary matrix used for subsequent analysis.

nDec

number of digits of precision for floating point output.

meth

Logical value switching between MSAP ('TRUE') and standard AFLP ('FALSE') analysis. The difference lies in that for AFLP (meth=FALSE) the 'enzyme' column is ignored and every row in data represent an independent sample, without combination of data.

rm.redundant

Not implemented yet.

rm.monomorphic

Logical value switching between the removal ('TRUE', by default) of monomorphic fragments (defined as those with only one state or just one ocurrence of the second state across the whole dataset) after data transformation.

do.pcoa

Option switcher for doing a Principal Coordinate Analysis for variation between groups. TRUE by default.

do.shannon

Option switcher for Shannon's Diversity Index comparison between MSL and NML.

do.amova

Option switcher for doing an AMOVA for differentiation between groups. TRUE by default.

do.pairwisePhiST

Logical value switching between the calculation of the pairwise Phi_st between pairs of groups/populations ('TRUE' ) or skip it ('FALSE' by default).

do.cluster

Calculates and plots a Neighbour-Joining tree ('TRUE' by default) or skip it ('FALSE').

use.groups

Gives the groups/populations/treatments of the datafile to be analysed. By default all groups are considered into de the analysis. To provide a subset of the groups a vector should be passed with the names of groups to be included. For example, in a datafile with 5 groups (Control, pop1, pop2, pop3 and pop4) we are interested only in Control and pops 1 and 3. Then, msap should be called with 'use.groups=c('Control','pop1','pop3')'.

do.mantel

Performs a Mantel test to obtain correlation between MSL and NML ('TRUE') or skip it ('FALSE' by default).

np.mantel

Gives the number of permutations for the above Mantel test (1000 by default) or skip it ('FALSE').

loci.per.primer

Vector providing the number of loci/fragements obtained per primer combination. Fragment classsification is performed independenty for each primer combination. These fragment should be ordered in the datafilein the sameway as specified here. If this is nor provided (by default) then all fragments should be analyzed as they come from a single combination. For example, if there are three primer combinations with 135, 234 and 210 loci each, then msap should be called with 'loci.per.primer=c(135,234,210)'

error.rate.primer

Gives the repeatibility value of MSAP assays for each primer combination. It provides a threshold to consider methylation events as genotyping errors.

uninformative

Deprecated. This argument is keept for back compatibility with version 1.0.x. Contains the same information as no.bands.

Details

This function is the main interface of the msap package. The only required argument is a string with the name (uri) of the data file to be analysed.

Data file should be a .csv file with markers as columns and two rows by sample, one for each isoschizomer reaction. The first row should include the markers name/references. The first column should provide the label for the group where the sample is included, with the aim to make comparisons between different gruops. Second column is reserved for an arbitrary label (i.e. to name the sample). Third column should identify the isochizomer with 'HPA' or 'MSP'.

Value

From version 1.1.2, msap returns a list with data useful for further analysis:

groups

A factor with the name of the group of every individual analysed

patterns

A list showing the MSAP patterns (11, 10, 01 and 00 coded as u, h, i, f) in all groups

transformed.MSL

A data frame including the binary (1: unmmethylated, 2: methylated) values for those loci classified as MSL

transformed.NML

A data frame including the binary (1: unmmethylated, 2: methylated) values for those loci classified as NML

DM.MSL

A distance matrix object between all individuals for those polymorphic loci classified as MSL

DM.NML

A distance matrix object between all individuals for those polymorphic loci classified as NML

DM.AFLP

A distance matrix object between all individuals when analysing AFLP data

Author(s)

Andres Perez-Figueroa (anpefi@uvigo.es)

See Also

rmsap-package

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
	#Perform all default analysis
	## Not run: msap("MyDataFile", name="MyAnalysis")
	#Perform all default analysis for a dataset with 2 primer combinations 
  #(200 and 180 fragments each)
	## Not run: msap("MyDataFile", name="MyAnalysis", loci.per.primer=c(200, 180))
	#Perform analysis assumes that HPA-/MSP- represents full methylation 
	## Not run: msap("MyDataFile", name="MyAnalysis", uninformative=FALSE)
	#The same that above but skipping the PCoA results 
	## Not run: msap("MyDataFile", name="MyAnalysis", uninformative=FALSE, do.pcoa=FALSE)
	#Using only some of the populations
	## Not run: msap("MyDataFile", name="MyAnalysis", use.groups=c('Control','pop1','pop3'))

Example output



msap documentation built on May 2, 2019, 6:52 p.m.