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"))

Example output

     PP  PN   NP    NN AcceptedDroplets MtPositives MtNegatives WtPositives
E03 262 273 5831  6238            12604         535       12069        6093
F03 245 256 5937  5957            12395         501       11894        6182
G03 197 222 4945  4874            10238         419        9819        5142
H03  23  96 1637  9935            11691         119       11572        1660
A04  20 102 1856 10848            12826         122       12704        1876
B04  18 113 1935 11007            13073         131       12942        1953
C04   1  34  470 11842            12347          35       12312         471
D04   2  37  500 13146            13685          39       13646         502
E04   1  29  421 11165            11616          30       11586         422
F04   0   7  173 14870            15050           7       15043         173
G04   0   7  118 12810            12935           7       12928         118
H04   0   5  113 12398            12516           5       12511         113
    WtNegatives MtConcentration WtConcentration MtCopiesPer20uLWell
E03        6511      51.0282850       777.08373         1020.565700
F03        6213      48.5401108       812.52858          970.802217
G03        5096      49.1611810       820.76514          983.223620
H03       10031      12.0363858       180.16355          240.727716
A04       10950      11.2440661       186.04106          224.881323
B04       11120      11.8484682       190.35735          236.969363
C04       11876       3.3396730        45.75713           66.793460
D04       13183       3.3575342        43.96732           67.150685
E04       11194       3.0423358        43.53593           60.846715
F04       14877       0.5473229        13.60188           10.946458
G04       12817       0.6368398        10.78165           12.736797
H04       12403       0.4700806        10.66994            9.401611
    WtCopiesPer20uLWell TotalCopiesPer20uLWell      Ratio FracAbun
E03          15541.6746             16562.2403 0.06566639 6.162003
F03          16250.5716             17221.3738 0.05973957 5.637194
G03          16415.3028             17398.5264 0.05989677 5.651189
H03           3603.2710              3843.9987 0.06680811 6.262430
A04           3720.8213              3945.7026 0.06043863 5.699399
B04           3807.1470              4044.1163 0.06224329 5.859608
C04            915.1426               981.9361 0.07298694 6.802221
D04            879.3464               946.4971 0.07636431 7.094653
E04            870.7185               931.5652 0.06988104 6.531664
F04            272.0375               282.9840 0.04023878 3.868225
G04            215.6330               228.3698 0.05906702 5.577269
H04            213.3988               222.8004 0.04405654 4.219747
     PP  PN   NP    NN AcceptedDroplets MtPositives MtNegatives WtPositives
G03 197 222 4945  4874            10238         419        9819        5142
B04  18 113 1935 11007            13073         131       12942        1953
E04   1  29  421 11165            11616          30       11586         422
    WtNegatives MtConcentration WtConcentration MtCopiesPer20uLWell
G03        5096       49.161181       820.76514           983.22362
B04       11120       11.848468       190.35735           236.96936
E04       11194        3.042336        43.53593            60.84672
    WtCopiesPer20uLWell TotalCopiesPer20uLWell      Ratio FracAbun
G03          16415.3028             17398.5264 0.05989677 5.651189
B04           3807.1470              4044.1163 0.06224329 5.859608
E04            870.7185               931.5652 0.06988104 6.531664
     PP  PN   NP    NN AcceptedDroplets MtPositives MtNegatives WtPositives
F03 245 256 5937  5957            12395         501       11894        6182
A04  20 102 1856 10848            12826         122       12704        1876
D04   2  37  500 13146            13685          39       13646         502
    WtNegatives MtConcentration WtConcentration MtCopiesPer20uLWell
F03        6213       48.540111       812.52858           970.80222
A04       10950       11.244066       186.04106           224.88132
D04       13183        3.357534        43.96732            67.15068
    WtCopiesPer20uLWell TotalCopiesPer20uLWell      Ratio FracAbun
F03          16250.5716             17221.3738 0.05973957 5.637194
A04           3720.8213              3945.7026 0.06043863 5.699399
D04            879.3464               946.4971 0.07636431 7.094653
     PP  PN   NP    NN AcceptedDroplets MtPositives MtNegatives WtPositives
E03 262 273 5831  6238            12604         535       12069        6093
F03 245 256 5937  5957            12395         501       11894        6182
G03 197 222 4945  4874            10238         419        9819        5142
H03  23  96 1637  9935            11691         119       11572        1660
A04  20 102 1856 10848            12826         122       12704        1876
B04  18 113 1935 11007            13073         131       12942        1953
C04   1  34  470 11842            12347          35       12312         471
D04   2  37  500 13146            13685          39       13646         502
E04   1  29  421 11165            11616          30       11586         422
F04   0   7  173 14870            15050           7       15043         173
G04   0   7  118 12810            12935           7       12928         118
H04   0   5  113 12398            12516           5       12511         113
    WtNegatives MtConcentration WtConcentration MtCopiesPer20uLWell
E03        6511      51.0282850       777.08373         1020.565700
F03        6213      48.5401108       812.52858          970.802217
G03        5096      49.1611810       820.76514          983.223620
H03       10031      12.0363858       180.16355          240.727716
A04       10950      11.2440661       186.04106          224.881323
B04       11120      11.8484682       190.35735          236.969363
C04       11876       3.3396730        45.75713           66.793460
D04       13183       3.3575342        43.96732           67.150685
E04       11194       3.0423358        43.53593           60.846715
F04       14877       0.5473229        13.60188           10.946458
G04       12817       0.6368398        10.78165           12.736797
H04       12403       0.4700806        10.66994            9.401611
    WtCopiesPer20uLWell TotalCopiesPer20uLWell      Ratio FracAbun
E03          15541.6746             16562.2403 0.06566639 6.162003
F03          16250.5716             17221.3738 0.05973957 5.637194
G03          16415.3028             17398.5264 0.05989677 5.651189
H03           3603.2710              3843.9987 0.06680811 6.262430
A04           3720.8213              3945.7026 0.06043863 5.699399
B04           3807.1470              4044.1163 0.06224329 5.859608
C04            915.1426               981.9361 0.07298694 6.802221
D04            879.3464               946.4971 0.07636431 7.094653
E04            870.7185               931.5652 0.06988104 6.531664
F04            272.0375               282.9840 0.04023878 3.868225
G04            215.6330               228.3698 0.05906702 5.577269
H04            213.3988               222.8004 0.04405654 4.219747
     PP  PN   NP    NN InputAmount AcceptedDroplets MtPositives MtNegatives
E03 262 273 5831  6238          64            12604         535       12069
F03 245 256 5937  5957          64            12395         501       11894
G03 197 222 4945  4874          64            10238         419        9819
H03  23  96 1637  9935          16            11691         119       11572
A04  20 102 1856 10848          16            12826         122       12704
B04  18 113 1935 11007          16            13073         131       12942
C04   1  34  470 11842           4            12347          35       12312
D04   2  37  500 13146           4            13685          39       13646
E04   1  29  421 11165           4            11616          30       11586
F04   0   7  173 14870           1            15050           7       15043
G04   0   7  118 12810           1            12935           7       12928
H04   0   5  113 12398           1            12516           5       12511
    WtPositives WtNegatives MtConcentration WtConcentration MtCopiesPer20uLWell
E03        6093        6511      51.0282850       777.08373         1020.565700
F03        6182        6213      48.5401108       812.52858          970.802217
G03        5142        5096      49.1611810       820.76514          983.223620
H03        1660       10031      12.0363858       180.16355          240.727716
A04        1876       10950      11.2440661       186.04106          224.881323
B04        1953       11120      11.8484682       190.35735          236.969363
C04         471       11876       3.3396730        45.75713           66.793460
D04         502       13183       3.3575342        43.96732           67.150685
E04         422       11194       3.0423358        43.53593           60.846715
F04         173       14877       0.5473229        13.60188           10.946458
G04         118       12817       0.6368398        10.78165           12.736797
H04         113       12403       0.4700806        10.66994            9.401611
    WtCopiesPer20uLWell TotalCopiesPer20uLWell      Ratio FracAbun
E03          15541.6746             16562.2403 0.06566639 6.162003
F03          16250.5716             17221.3738 0.05973957 5.637194
G03          16415.3028             17398.5264 0.05989677 5.651189
H03           3603.2710              3843.9987 0.06680811 6.262430
A04           3720.8213              3945.7026 0.06043863 5.699399
B04           3807.1470              4044.1163 0.06224329 5.859608
C04            915.1426               981.9361 0.07298694 6.802221
D04            879.3464               946.4971 0.07636431 7.094653
E04            870.7185               931.5652 0.06988104 6.531664
F04            272.0375               282.9840 0.04023878 3.868225
G04            215.6330               228.3698 0.05906702 5.577269
H04            213.3988               222.8004 0.04405654 4.219747
     PP  PN   NP    NN NanogramsIn AcceptedDroplets MtPositives MtNegatives
E03 262 273 5831  6238          64            12604         535       12069
F03 245 256 5937  5957          64            12395         501       11894
G03 197 222 4945  4874          64            10238         419        9819
H03  23  96 1637  9935          16            11691         119       11572
A04  20 102 1856 10848          16            12826         122       12704
B04  18 113 1935 11007          16            13073         131       12942
C04   1  34  470 11842           4            12347          35       12312
D04   2  37  500 13146           4            13685          39       13646
E04   1  29  421 11165           4            11616          30       11586
F04   0   7  173 14870           1            15050           7       15043
G04   0   7  118 12810           1            12935           7       12928
H04   0   5  113 12398           1            12516           5       12511
    WtPositives WtNegatives MtConcentration WtConcentration MtCopiesPer20uLWell
E03        6093        6511      51.0282850       777.08373         1020.565700
F03        6182        6213      48.5401108       812.52858          970.802217
G03        5142        5096      49.1611810       820.76514          983.223620
H03        1660       10031      12.0363858       180.16355          240.727716
A04        1876       10950      11.2440661       186.04106          224.881323
B04        1953       11120      11.8484682       190.35735          236.969363
C04         471       11876       3.3396730        45.75713           66.793460
D04         502       13183       3.3575342        43.96732           67.150685
E04         422       11194       3.0423358        43.53593           60.846715
F04         173       14877       0.5473229        13.60188           10.946458
G04         118       12817       0.6368398        10.78165           12.736797
H04         113       12403       0.4700806        10.66994            9.401611
    WtCopiesPer20uLWell TotalCopiesPer20uLWell      Ratio FracAbun
E03          15541.6746             16562.2403 0.06566639 6.162003
F03          16250.5716             17221.3738 0.05973957 5.637194
G03          16415.3028             17398.5264 0.05989677 5.651189
H03           3603.2710              3843.9987 0.06680811 6.262430
A04           3720.8213              3945.7026 0.06043863 5.699399
B04           3807.1470              4044.1163 0.06224329 5.859608
C04            915.1426               981.9361 0.07298694 6.802221
D04            879.3464               946.4971 0.07636431 7.094653
E04            870.7185               931.5652 0.06988104 6.531664
F04            272.0375               282.9840 0.04023878 3.868225
G04            215.6330               228.3698 0.05906702 5.577269
H04            213.3988               222.8004 0.04405654 4.219747

twoddpcr documentation built on Nov. 8, 2020, 5:49 p.m.