#Entered Metadata into a excel file of Ross Conrad virus data and saved as a csv file. 

# TITLE: Colony Virus Results for Apiary 125
# DATE: 2016-11-02
# AUTHOR: Samantha Alger
# ------------------------------------------------
# AUTHOR EMAIL: salger@uvm.edu
# AUTHOR ADDRESS: 109 Carrigan Dr., Burlington, VT 05401"
# AUTHOR WEBSITE: NA
# ------------------------------------------------
# OWNERSHIP: Samantha Alger
# COLLABORATORS: Alex Burnham, Ross Conrad"
# FUNDING SOURCES: NA
# REPOSITORY: GitHub, repo: AlgerProjects"
# CITATIONS: NA
# ------------------------------------------------
# SAMPLING LOCATIONS: Apiary '125' (Ross Conrad's apiary)
# SAMPLING TIMES: 2017-08-18
# VARIABLE DESCRIPTION: Sample name is "RC"" for Ross Conrad and unique hive number. Target name is DWV (virus of interest), Ctmean, Ctsd, quantity mean, and quantity sd are from qPCR results. Run is the qPCR run #. dil. factor is the dilution of RNA used in PCR. genome copies is the target copies without reference gene. ACT genome copies is the reference genome copy number, norm genome copy is the normalized copies of DWV in each bee sample. Colony number is the unique ID given to each colony tested.
# MISSING DATA: Hive # 6 was not sampled
#Read in data
RC <- read.table("RossConradDF_Metadata_Exercise.csv", header=TRUE, sep = ",", stringsAsFactors = F)

str(RC)
## 'data.frame':    11 obs. of  12 variables:
##  $ sample_name       : chr  "RC1" "RC2" "RC3" "RC4" ...
##  $ target_name       : chr  "DWV" "DWV" "DWV" "DWV" ...
##  $ Ct_mean           : num  31.7 17.5 24.5 15.6 14.5 ...
##  $ Ct_sd             : num  0.328 0.05 0.061 0.001 0.157 0.173 0.103 0.345 0.165 0.186 ...
##  $ quantity_mean     : num  4.26 9.61e+04 1.05e+03 3.30e+05 6.77e+05 ...
##  $ quantity_sd       : num  6.02 3134.6 41.49 154.96 68867.83 ...
##  $ run               : int  68 68 68 68 68 68 68 68 68 68 ...
##  $ dil.factor        : num  2.5 1.8 1.4 2.8 9.9 1 4.8 1.9 1 5.5 ...
##  $ genome_copbee_HB  : num  2.66e+03 4.33e+07 3.68e+05 2.31e+08 1.68e+09 ...
##  $ ACT_genome_copbee : num  8429514 6273720 3635529 19038870 57602474 ...
##  $ norm_genome_copbee: num  5.76e+03 1.26e+08 1.85e+06 2.21e+08 5.31e+08 ...
##  $ Colony_Number     : int  1 2 3 4 5 7 8 9 10 11 ...
summary(RC)
##  sample_name        target_name           Ct_mean          Ct_sd       
##  Length:11          Length:11          Min.   :14.49   Min.   :0.0010  
##  Class :character   Class :character   1st Qu.:16.55   1st Qu.:0.0555  
##  Mode  :character   Mode  :character   Median :19.72   Median :0.1570  
##                                        Mean   :21.93   Mean   :0.1445  
##                                        3rd Qu.:27.77   3rd Qu.:0.1795  
##                                        Max.   :31.68   Max.   :0.3450  
##  quantity_mean       quantity_sd            run       dil.factor   
##  Min.   :     4.3   Min.   :    1.59   Min.   :68   Min.   :1.000  
##  1st Qu.:   532.7   1st Qu.:   23.75   1st Qu.:68   1st Qu.:1.600  
##  Median : 22900.1   Median :  154.96   Median :68   Median :2.400  
##  Mean   :151822.2   Mean   :10827.86   Mean   :68   Mean   :3.182  
##  3rd Qu.:212861.3   3rd Qu.: 7574.20   3rd Qu.:68   3rd Qu.:3.800  
##  Max.   :677248.4   Max.   :68867.83   Max.   :68   Max.   :9.900  
##  genome_copbee_HB    ACT_genome_copbee  norm_genome_copbee 
##  Min.   :2.661e+03   Min.   : 2737731   Min.   :     5760  
##  1st Qu.:1.938e+05   1st Qu.: 6956158   1st Qu.:   935732  
##  Median :5.725e+06   Median : 8790390   Median : 12157676  
##  Mean   :2.333e+08   Mean   :18244189   Mean   :111106474  
##  3rd Qu.:1.370e+08   3rd Qu.:26571080   3rd Qu.:173445301  
##  Max.   :1.676e+09   Max.   :57602474   Max.   :530892519  
##  Colony_Number   
##  Min.   : 1.000  
##  1st Qu.: 3.500  
##  Median : 7.000  
##  Mean   : 6.545  
##  3rd Qu.: 9.500  
##  Max.   :12.000
table(RC$sample_name)
## 
##  RC1 RC10 RC11 RC12  RC2  RC3  RC4  RC5  RC7  RC8  RC9 
##    1    1    1    1    1    1    1    1    1    1    1
head(RC)
##   sample_name target_name Ct_mean Ct_sd quantity_mean quantity_sd run
## 1         RC1         DWV  31.682 0.328         4.258       6.022  68
## 2         RC2         DWV  17.500 0.050     96143.540    3134.602  68
## 3         RC3         DWV  24.477 0.061      1050.470      41.487  68
## 4         RC4         DWV  15.597 0.001    329579.060     154.963  68
## 5         RC5         DWV  14.489 0.157    677248.400   68867.830  68
## 6         RC7         DWV  19.721 0.173     22900.129    2552.953  68
##   dil.factor genome_copbee_HB ACT_genome_copbee norm_genome_copbee
## 1        2.5     2.661250e+03           8429514       5.759804e+03
## 2        1.8     4.326459e+07           6273720       1.258149e+08
## 3        1.4     3.676645e+05           3635529       1.845052e+06
## 4        2.8     2.307053e+08          19038870       2.210757e+08
## 5        9.9     1.676190e+09          57602474       5.308925e+08
## 6        1.0     5.725032e+06           7638596       1.367379e+07
##   Colony_Number
## 1             1
## 2             2
## 3             3
## 4             4
## 5             5
## 6             7
tail(RC)
##    sample_name target_name Ct_mean Ct_sd quantity_mean quantity_sd run
## 6          RC7         DWV  19.721 0.173     22900.129    2552.953  68
## 7          RC8         DWV  15.005 0.103    484192.700   32266.447  68
## 8          RC9         DWV  18.404 0.345     54221.227   12013.800  68
## 9         RC10         DWV  31.057 0.165        14.872       1.588  68
## 10        RC11         DWV  31.096 0.186        14.516       1.742  68
## 11        RC12         DWV  22.171 0.021      4674.575      65.029  68
##    dil.factor genome_copbee_HB ACT_genome_copbee norm_genome_copbee
## 6         1.0        5725032.2           7638596        13673790.94
## 7         4.8      581031240.0          34103290       310833461.00
## 8         1.9       25755082.8          38648883        12157675.71
## 9         1.0           3718.0           2737731           24776.69
## 10        5.5          19959.5          13787077           26412.04
## 11        2.4        2804745.0           8790390         5821163.43
##    Colony_Number
## 6              7
## 7              8
## 8              9
## 9             10
## 10            11
## 11            12