---
title: "Pilot 1.1 *in vivo* NiCl~2~ x *Botryllus schlosseri* Exposure"
author: "Celeste Valdivia"
date: "2023-09-28"
categories: [study plans, nickel chloride]
image: "S151C001_24hpe_45-R4-230930140353639.jpg"
---

```{r setup, include=TRUE, warning=FALSE}
library(knitr)
library(tidyverse)
library(tidyr)
library(dplyr)
library(hrbrthemes)
library(ggplot2)
knitr::opts_chunk$set(echo = TRUE)
```

# Summary

First pilot study for NiCl~2~ exposures on whole field-sourced *Botryllus schlosseri* colonies.

## Objectives

-   Promote cell proliferation *in vitro* through the induction of clastogenic damage of epithelial cells derived from *B. schlosseri*.

-   If no changes are observed across the different treatments in this pilot study, identify the ideal sample size, identify manipulations to the independent variables, time or concentration of NiCl~2~.

# Research Questions

1.  Does an *in vivo* exposure to NiCl~2~ promote *in vitro* cellular proliferation of epithelial tissue subsequently seeded post exposure?

2.  What is the rate of cell division that occurs within those first 24 hours?

3.  How does exposure to nickel chloride impact gene expression in epithelial tissue across the different concentrations after 24 hours post exposure *in vivo*?

# Suggestions for Experimental Design

Dr. Gardell's suggested modifications to design 09/01/23:

-   Log distribution of the concentrations.

-   qPCR should be left for follow up experiment with better defined (targeted) concentrations and time points. Do not snap freeze tissue for qPCR, alternatively use tissue for:

-   Primary epithelial cell culturing to address question regarding stress-induced evolution

-   Use for comet assay

Valerie (UCD) Suggestions 09/23/23:

-   Seed tissue immediately after dissection to avoid lag time in TCM aliquot.

-   Reduce scale for preliminary trial to avoid 9 hours of micro-dissection time.

# Final Experimental Schematic

![](v3_design.jpeg)

## Notes and considerations

Will not control for blastogenic stage at this time.

-   If system is in C2 - D blastogenic stages, seed the primary buds

-   If system is in A1-C1 stages, seed the parental zooids

Tissue seeding density

-   5-9 zooids (one whole system) in one well.

Using well plates, however, we will need to control for evaporation more effectively, currently randomly lose anywhere from 30-50% of the media, drastically causing differences in the osmolarity of the wells.

-   Improve humidity conditions

-   Add a lot of media from initiation. 2 mL in each well.

-   Ideal to measure media quality.

-   Randomize well assignments

Could be interesting to incorporate in future design, freezing tissue at the end of the exposure and then freezing after seeding. Evaluating differences in gene expression across those time points.

# Experimental Planning

## Animal Handling Prior to Exposure

Divided animals into separate system, 3 days prior to start of exposure, 8 days acclimated to the recirculating system.

## Randomize Treatment and Plate Assignments

Here we will have R randomly assign each animal to a treatment and each treatment/animal to a different well on the plate. The idea here is to randomize placements as there may be variations in the well design.

```{r}
set.seed(3455)
plate_number_12_well <- c(rep(1, times = 12))
well_placements <- c("A1", "A2", "A3", "A4", "B1", "B2", "B3", "B4", "C1", "C3", "C2", "C4")
conditions <- c("Control R1", "Control R2", "Control R3", "Control R4", "5 mg/L R1", "5 mg/L R2", "5 mg/L R3", "5 mg/L R4", "45 mg/L R1", "45 mg/L R2", "45 mg/L R3", "45 mg/L R4")
animal_id <- c("S177C001", "S178C001", "S160C001", "S162C001", "S167C001", "S151C001", "S180C001", "S154C001", "S148C001", "S147C001", "S149C001", "S158C001")
well_assignments <- data.frame(
  Plate_Number = sample(plate_number_12_well),
  Well_Placements = sample(well_placements),
  Conditions = sample(conditions),
  animal_ID = sample(animal_id)
)
print(well_assignments)

#save assignments in csv for downstream use as metadata
write.csv(well_assignments, file = "data/pilot_random_assignments.csv")
```

![plate assignments](12.jpeg)

## Nickel Chloride Dilutions

Review resources prior to handling nickel chloride:

-   Nickel chloride [SDS](https://www.fishersci.com/store/msds?partNumber=AC270510050&productDescription=NICKEL%28II%29+CHLORIDE+HEXA+5KG&vendorId=VN00032119&countryCode=US&language=en).

-   [Chemical resistance of gloves.](https://amo-csd.lbl.gov/downloads/Chemical%20Resistance%20of%20Gloves.pdf)

All handling of stock solution and treatments to be done in a chemical fume hood. Once spiked water has been distributed, add animals, parafilm jars, place in secondary container, and move to environmental chamber.

### Required Volume of Artificial Seawater

Calculations for spiking artificial seawater. 225 mL of seawater required to mostly submerge glass slide in wide mouth 16 oz Kerr mason jar.

Considerations:

-   4 replicates

-   225 mL per jar

-   3 conditions

-   Account for 10% loss of water during transferring

$$(4*225 * 3) + (0.1*(4*225*3)) = 2,970$$

Need 2,970 mL of artificial seawater total for exposure, particularly, 990 mL of artificial seawater per condition.

### Calculations

Stock solution of NiCl~2~ made by undergraduate Gina Jones on 02/08/23.

-   NiCl~2~

-   Suspended in MilliQ water (0 PPT)

#### Low Dose: 5 mg/L

$$ C_1*V_1 = C_2*V_2$$ $$ 1 g/L * V_1 = 0.005g/L*0.99L$$ $$V_1 = 0.00495 L = 4.95 mL$$ Spike 990 mL of aerated, artificial seawater (16 C) with 4.95 mL of stock NiCl~2~ solution. Change in salinity negligible (+/- 1 PPT).

#### High Dose: 45 mg/L

$$ C_1*V_1 = C_2*V_2$$ $$ 1 g/L * V_1 = 0.045g/L*0.99L$$ $$V_1 = 0.04455 L = 44.55 mL$$ Spike 990 mL of aerated, artificial seawater (16 C) with 44.55 mL of stock NiCl~2~ solution. Change in salinity negligible (+/- 1 PPT).

# Protocol

1.  Subdivide animals 3 days prior to exposure start.

2.  Make sufficient volume of artificial seawater at appropriate salinity, 25 PPT, to match recirculating seawater system parameters. In this case for a 3 x 4 exposure at 250 mL, will require about 7 L of artificial seawater.

-   30.8 g / L of Red Sea Salt

3.  Rinse all glassware to be used during exposure as follows:

-   Triplicate rinse with lab detergent

-   Triplicate rinse with tap water

-   Triplicate rinse with DI water

4.  Add lab bench paper to environmental chambers top rack to reduce light intensity. Include 4 slits in bench paper to allow for air flow.

5.  Add 1000 mL of artificial seawater to three 1 L beakers and place in environmental chamber (set to ambient 23 C to achieve 16 C for water) with gentle aeration (targeting \~ 67 % DO) in preparation the night before exposure.

#### *Day of Exposure Commencement*

6.  Take 10 mL from each 1 L beaker and document temperature, DO, pH, salinity, and ammonia of artificial seawater prior to spiking the water.

7.  In a chemical fume hood add the appropriate volume to achieve desired concentration of nickel chloride concentration to each of the 1 L beakers using a 25 mL or 50 mL serological pipette. Be sure to homogenize solution well with the serological pipette. Distribute 225 mL of each stock to the appropriate mason jar or beaker using designated serological pipette.

8.  Transfer animals to a portable container with artificial seawater from the recirculating system. Image the animals using the Excelis stereomicroscope. Use a razor blade to clean around the animal and to clean glass slide of excess algae and debris.

-   Document stage, zooid number, cumulative system number.

9.  Distribute animals to appropriate jar in fume hood.

10. Parafilm jar and place in secondary container.

11. Transfer secondary container with jars to second rack of environmental chamber.

12. Leave animals for 24 hours.

#### *Day of Dissections*

Order of Takedown:

1.  5-R3
2.  45-R4
3.  5-R2
4.  0-R3
5.  5-R4
6.  45-R3
7.  45-R1
8.  5-R1
9.  0-R2
10. 0-R4
11. 45-R2
12. 0-R1

The following steps should be conducted in a chemical fume hood and iterated through one beaker at a time to avoid desiccation stress:

13. Remove 100% of the exposure water from beaker and dispose of NiCl~2~ dosed artificial seawater in the appropriately marked hazardous waste container.

14. With the animal and glass slide still in the beaker, quadruplicate rinse the glass slide and animal with deionized water.

15. Glass slide may now be handled with nitrile gloves and should be quadruplicate rinsed with artificial seawater over exposure beaker.

16. Transfer glass slide and animal to a fresh 16 oz mason jar containing 200 mL of 15 C artificial seawater.

17. Dispose of excess liquid in exposure beaker in appropriately labeled hazardous waste container.

You may now work outside the chemical fumehood. Note there may be residual NiCl~2~ in animal so continue to wear the appropriate PPE and work carefully.

18. Using a stainless steel razor blade, remove one of the two cumulative systems on the glass slide. Use forceps to transfer cumulative system to appropriately labeled snap cap 1.5 mL eppendorf PCR safe tube containing 500 uL of RNAProtect by Qiagen.

19. Proceed with dissection of the primary buds or zooids of the second cumulative system on the slide. Refer to [epithelial isolation protocol](https://valeste.github.io/tough-tunicates/posts/epi-isolation-protocol/)

-   However, avoid using any ethanol in this procedure.

20. Once tissue has been removed, take cell strainer and rinse it with 30 mL ASW-PSA.

21. Place tissue in aliquot of TCM and immediately go to seed tissue in biosaftey cabinet. Mark time of seeding.

22. No replacement of media over course of trial.

23. Transfer samples containing cumulative system suspended in RNAProtect to -20 C freezer overnight. The following day, transfer samples to -80 C freezer for long term storage.

# Data

## Morphometric Records

Make sure you have made your Google sheet publicly available to anyone that has the link. If you make any updates to the sheet just re-curl the data, meaning just re-run the code below.

```{r, engine='bash', eval = FALSE}

curl -L https://docs.google.com/spreadsheets/d/10uM3N3PD9xIP4yUnadfhkcXa8TPMRMD-adOIKbmkYzY/export?exportFormat=csv | tee ~/tough-tunicates/posts/nicl2-botryllus-pilot/data/morph.csv
```

### Data clean up

Read in the data into your environment:

```{r}
morph <- read.csv(file = "data/morph.csv")  

```

Manipulate and clean up data set:

```{r}
morph$date <- mdy(morph$date) #convert the date column from characters to true date

morph <- morph %>%
  separate(jar_id, c("treatment_mg_per_L", "replicate"), sep = "-") #create two new columns, treatment and replicate from jar id 

morph_fact <- morph %>%
  mutate(treatment_mg_per_L = as.factor(treatment_mg_per_L)) %>%
  mutate(stage = as.factor(stage)) %>%
  mutate(animal_id = as.factor(animal_id)) %>%
  mutate(date = as.factor(date)) %>%
  mutate(treatment_order = factor(paste(treatment_mg_per_L, animal_id))) # Create a new variable for ordering by treatment

```

```{r}
summary(morph_fact)
```

### Exploratory plots

Lollipop chart to visualize the jumps or arrests in blastogenic stage progression for each animal.

```{r}

# Create the plot
ggplot(data = morph_fact, aes(x = stage, y = treatment_order, color = date)) +
  geom_point(size = 3, position = position_jitter(h = 0.1, w = 0)) +
  geom_line(aes(group = treatment_order), size = 0.5, color = 'grey') +
  labs(title = "Blastogenic Stage Change Over Two Days",
       x = "Stage", y = "Treatment Group - Animal ID") +
  scale_color_brewer(palette = "Set1") +
  theme_minimal() +
  theme(legend.position = "top")

```

### Analyzing differences in blastogenic progression across treatments

Since all the animals start at different blastogenic stages, we will need to quantify changes in blastogenic rate with a numeric scale

```{r}
# Define a numeric scale
blastogenic_scale <- c("A1", "A2", "B1", "B2", "C1", "C2", "TO")
numeric_scale <- 1:7

# Create a new variable with the numeric scale
morph <- morph %>%
  mutate(stage_numeric = as.integer(factor(stage, levels = blastogenic_scale, labels = numeric_scale)))


```

```{r}
summary(morph)
```

```{r}
library(dplyr)

# Group by treatment and animal_id, then count stage skips
skips_data <- morph %>%
  group_by(treatment_mg_per_L, animal_id) %>%
  summarize(skips = max(stage_numeric) - min(stage_numeric))

```

```{r}
library(ggplot2)

# Calculate standard deviations for each treatment
std_dev <- skips_data %>%
  group_by(treatment_mg_per_L) %>%
  summarize(std_dev = sd(skips))

# Calculate means for each treatment
means_data <- skips_data %>%
  group_by(treatment_mg_per_L) %>%
  summarize(mean_skips = mean(skips))

combined_data <- left_join(std_dev, means_data, by = "treatment_mg_per_L")

print(combined_data)

#A bar with error bars
bar_plot2 <- ggplot(combined_data, aes(x = factor(treatment_mg_per_L, levels = c("0", "5", "45")), y = mean_skips, fill = treatment_mg_per_L)) +
  geom_bar(stat = "identity", position = "dodge", width = 0.7) +
  geom_errorbar(aes(ymin = pmax(mean_skips - std_dev, 0), ymax = mean_skips + std_dev), 
                width = 0.2, position = position_dodge(width = 0.7)) +
  labs(title = "Blastogenic Stage Skips by Treatment",
       x = "Nickel Chloride Concentration (mg/L)",
       y = "Mean Skips") +
  scale_fill_brewer(palette = "Set1", name = "Nickel Chloride Concentration") +
  scale_x_discrete(limits = c("0", "5", "45")) + # Set the order of concentrations
  theme_minimal() +
  theme(legend.position = "top")

# Display the bar graph
print(bar_plot2)

```

```{r}
# Perform a Kruskal-Wallis test to compare the treatments
kruskal.test(combined_data$mean_skips ~ combined_data$treatment_mg_per_L)

```

## Cell culture monitoring

```{r, engine='bash', eval = FALSE}

curl -L https://docs.google.com/spreadsheets/d/13o7wsaFG9QAbBtIo31XtbfPtFOcf5HUEEYDksrcqaok/export?exportFormat=csv | tee ~/tough-tunicates/posts/nicl2-botryllus-pilot/data/cell.csv
```

```{r}
cell <- read.csv(file = "data/cell.csv")

cell$date <- mdy(cell$date)

```
