``` r
# Ensure rownames of metadata are used as the desired column order
desired_order <- rownames(metadata)

# Reorder data frame columns
energetic_state_GO_genes_filt <- energetic_state_GO_genes_filt[, desired_order]
Apul_miRNA_filt <- Apul_miRNA_filt[, desired_order]
Apul_lncRNA_filt <- Apul_lncRNA_filt[, desired_order]
filtered_wgbs <- filtered_wgbs[, desired_order]

# Check they all match
identical(rownames(metadata), colnames(energetic_state_GO_genes_filt))
```

```
## [1] TRUE
```

``` r
identical(rownames(metadata), colnames(Apul_miRNA_filt))
```

```
## [1] TRUE
```

``` r
identical(rownames(metadata), colnames(Apul_lncRNA_filt))
```

```
## [1] TRUE
```

``` r
identical(rownames(metadata), colnames(filtered_wgbs))
```

```
## [1] TRUE
```