``` r
# Factor variables
cod_sample_info$temp_treatment <- factor(cod_sample_info$temp_treatment)
cod_sample_info$tank <- factor(cod_sample_info$tank)
cod_sample_info$tissue_type <- factor(cod_sample_info$tissue_type)

# Remove bad samples
# MuliQC report: 149, 129
# PCA outliers: 31, 41 (per Laura)
cod_sample_info <- cod_sample_info[!(row.names(cod_sample_info) %in% c("sample_149", "sample_129", "sample_31", "sample_41")),]
cod_counts_data <- as.matrix(subset(cod_counts_data, select=-c(sample_149, sample_129, sample_31, sample_41)))

# Check that the column names of our count data match the row names of our sample info sheet
ncol(cod_counts_data)
```

```
[1] 76
```

``` r
nrow(cod_sample_info)
```

```
[1] 76
```

``` r
all(colnames(cod_counts_data) %in% rownames(cod_sample_info))
```

```
[1] TRUE
```

``` r
all(colnames(cod_counts_data) == rownames(cod_sample_info))
```

```
[1] TRUE
```