fullCountsSummary: Take a data frame and compute the abundance of molecules.

Description Usage Arguments Value Author(s) Examples

View source: R/parseCounts.R

Description

Returns a data frame with basic counts, the concentration of each kind of target molecule, the ratio ch1:ch2 molecules, and the fractional abundance of ch1 molecules in the overall count.

Usage

1
2
3
4
5
6
7
8
9
fullCountsSummary(
  df,
  ch1Label = "Mt",
  ch2Label = "Wt",
  rows = NULL,
  rowID = NULL,
  keepCols = NULL,
  keepColNames = NULL
)

Arguments

df

A data frame with droplet count columns in one of the following formats:

  • PP, PN, NP, NN;

  • Ch1.Ch2., Ch1.Ch2..1, Ch1.Ch2..2, Ch1.Ch2..3;

  • Ch1+Ch2+, Ch1+Ch2-, Ch1-Ch2+, Ch1-Ch2-; or

  • Ch1pCh2p, Ch1pCh2n, Ch1nCh2p, Ch1nCh2n.

ch1Label

The prefix to use for the channel 1 target. Defaults to "Mt".

ch2Label

The prefix to use for the channel 2 target. Defaults to "Wt".

rows

A vector of rows (numbers or well names) to keep from the original data frame. If set to NULL, all wells will be used. Defaults to NULL.

rowID

If set, this field is used as the row names. If NULL, the existing row names from df are used. Defaults to NULL.

keepCols

A vector of columns to keep from df. If NULL, no extra columns are added. Defaults to NULL.

keepColNames

A vector of new column names for keepCols. If NULL, the column names from keepCols are reused. Defaults to NULL.

Value

A data frame with

Author(s)

Anthony Chiu, anthony.chiu@cruk.manchester.ac.uk

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Take a data frame with row names given by the well names. Get estimates
## for the numbers of molecules in each sample..
fullCountsSummary(KRAScounts)

## Keep only the row numbers 3, 6 and 9.
fullCountsSummary(KRAScounts, rows=c(3, 6, 9))

## Keep only the rows labelled "F03", "A04", "D04".
fullCountsSummary(KRAScounts, rows=c("F03", "A04", "D04"))

## Take a data frame with a 'Well' column and do the same as above.
fullCountsSummary(KRAScountsWellCol, rowID="Well")

## Keep the 'InputAmount' column.
fullCountsSummary(KRAScounts, keepCols=c("InputAmount"))

## Keep the 'InputAmount' column and rename it.
fullCountsSummary(KRAScounts, keepCols=c("InputAmount"),
                  keepColNames=c("NanogramsIn"))

CRUKMI-ComputationalBiology/twoddpcr documentation built on Feb. 14, 2021, 9:18 p.m.