Package 'Phenotype'

Title: A Tool for Phenotypic Data Processing
Description: Large-scale phenotypic data processing is essential in research. Researchers need to eliminate outliers from the data in order to obtain true and reliable results. Best linear unbiased prediction (BLUP) is a standard method for estimating random effects of a mixed model. This method can be used to process phenotypic data under different conditions and is widely used in animal and plant breeding. The 'Phenotype' can remove outliers from phenotypic data and performs the best linear unbiased prediction (BLUP), help researchers quickly complete phenotypic data analysis. H.P.Piepho. (2008) <doi:10.1007/s10681-007-9449-8>.
Authors: Peng Zhao [aut, cre]
Maintainer: Peng Zhao <[email protected]>
License: Artistic-2.0
Version: 0.1.0
Built: 2025-02-19 02:57:55 UTC
Source: https://github.com/biozhp/phenotype

Help Index


blup

Description

Performs the Best Linear Unbiased Prediction (BLUP)

Usage

blup(
  x,
  sample = NULL,
  year = NULL,
  loc = NULL,
  rep = NULL,
  phe = NULL,
  fold = 1.5
)

Arguments

x

Input phenotype data file.

sample

The column name of the sample name in phenotypic data. (Default: NULL)

year

The column name of the year in phenotypic data. (Default: NULL)

loc

The column name of the location in phenotypic data. (Default: NULL)

rep

The column name of the replication in phenotypic data. (Default: NULL)

phe

The column name of the phenotypic value in data. (Default: NULL)

fold

Fold before inter-quartile range. (Default: 1.5)

Value

Estimate BLUPs for a phenotypic data with outliers removed on a per sample basis.

Author(s)

Peng Zhao <[email protected]>

Examples

data("wheatds")
blup_out <- blup(wheatds, sample = "Line", loc = "Env", rep = "Rep", phe = "DS")

histplot

Description

Histogram drawing

Usage

histplot(
  x,
  color = "#99d6e1",
  rug_color = "#f79999",
  freq = FALSE,
  lwd = 2,
  rug_lwd = 1,
  main = "",
  xlab = "",
  ylab = "",
  cex.main = 1.5,
  cex.lab = 1.5,
  cex.axis = 1.5,
  breaks = "Sturges",
  ylim = NULL,
  xpos = 0.03,
  ypos = 0,
  cex.text = 1.2
)

Arguments

x

Input phenotype data.

color

The color of histogram.

rug_color

The color of rug under the histogram.

freq

If FALSE, the histogram graphic is a representation of frequencies; if TRUE, the histogram graphic is a representation of probability densitie. (Default: FALSE)

lwd

The line width of histogram. (Default: 2)

rug_lwd

The line width of rug under the histogram. (Default: 1)

main

The title of plot.

xlab

The X axis labels.

ylab

The Y axis labels

cex.main

The magnification to be used for title. (Default: 1.5)

cex.lab

The magnification to be used for axis labels. (Default: 1.5)

cex.axis

The magnification to be used for axis annotation. (Default: 1.5)

breaks

The number of bars in the histogram.

ylim

Y axis ranges.

xpos

The horizontal position of the pvalue label. (Default: 0.03)

ypos

The vertical position of the pvalue label. (Default: 0)

cex.text

The magnification to be used for pvalue labels. (Default: 1.2)

Value

Histogram and p-value of Shapiro-Wilk Normality Test.

Author(s)

Peng Zhao <[email protected]>

Examples

data("wheatds")
inlier <- outlier(wheatds, sample = "Line", loc = "Env", rep = "Rep", phe = "DS", mode = "blup")
stat_out <- stat(x = inlier, sample = "Sample", phe = "inlier")
histplot(x = stat_out$mean)

outlier

Description

Remove outliers from phenotypic data

Usage

outlier(
  x,
  sample = NULL,
  year = NULL,
  loc = NULL,
  rep = NULL,
  phe = NULL,
  fold = 1.5,
  mode = "normal"
)

Arguments

x

Input phenotype data file.

sample

The column name of the sample name in phenotypic data. (Default: NULL)

year

The column name of the year in phenotypic data. (Default: NULL)

loc

The column name of the location in phenotypic data. (Default: NULL)

rep

The column name of the replication in phenotypic data. (Default: NULL)

phe

The column name of the phenotypic value in data. (Default: NULL)

fold

Fold before inter-quartile range. (Default: 1.5)

mode

Type of input phenotypic data. "normal" means normal data, "blup" means data containing year/location/repetition. (Default: "normal")

Value

phenotypic data with outliers removed.

Author(s)

Peng Zhao <[email protected]>

Examples

data("wheatds")
inlier <- outlier(wheatds, sample = "Line", loc = "Env", rep = "Rep", phe = "DS", mode = "blup")

stat

Description

Calculate statistical indicators of phenotypic data

Usage

stat(x, sample = NULL, phe = NULL)

Arguments

x

Input phenotype data file.

sample

The column name of the sample name in phenotypic data. (Default: NULL)

phe

The column name of the phenotypic value in data. (Default: NULL)

Value

Mean, median, standard deviation, standard error of phenotypic data for each sample.

Author(s)

Peng Zhao <[email protected]>

Examples

data("wheatds")
inlier <- outlier(wheatds, sample = "Line", loc = "Env", rep = "Rep", phe = "DS", mode = "blup")
stat_out <- stat(x = inlier, sample = "Sample", phe = "inlier")

Stripe rust disease severity (leaf areas infected, DS) of the wheat RIL population

Description

Stripe rust disease severity (leaf areas infected, DS) of the wheat RIL population in Yangling, Tianshui, Jiangyou.

Usage

data("wheatds")

Format

A data frame containing samples, environments, repetitions, and disease severity of the wheat RIL population.

Examples

data("wheatds")