pr_summary: Produces a summary table and a heatmap

View source: R/pr_summary.R

pr_summaryR Documentation

Produces a summary table and a heatmap

Description

This function takes the reads from an experimental block (block_df) and a reference list of fish present in this block (block_ref_df). It produces (i) a summary table containing the reads of each individual per antenna, and the total reads; (ii) a heatmap corresponding to a visual representation of the table.

Why do we need both block_df and block_ref_df? If all the individuals have been read in block_df, then the individuals present in block_ref_df and block_df are the same. However, if some individuals haven't been read in block_df (e.g. animals haven't moved, lost the tag, are dead), then there will be more individuals in the block_ref_df.

Usage

pr_summary(block_df, block_ref_df)

Arguments

block_df

A data frame containing the reads from an experimental block

block_ref_df

A data frame containing a reference list with all individuals present in the experimental block.

Value

A summary table containing the number of reads of each individual (per antenna, and total reads), and its visual representation as a heatmap.

Examples

# Inputs
#block_7_df <- read.csv("~/block_7_df.txt", sep="")
#ind_block_7 <- data.frame(id = c("0007E50321", "0007A34978", "0007DF1B76"))

# Run the function
#pr_summary(block_df = block_7_df, ind_block_7)


AparajithaRamesh/pondr documentation built on Sept. 14, 2023, 7:14 p.m.