Skip to content

Commit

Permalink
Align sample order between metadata and counts
Browse files Browse the repository at this point in the history
  • Loading branch information
sminot committed Feb 16, 2024
1 parent d2803d2 commit 8b78dee
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions templates/corncob.Rscript
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,18 @@ numCores = ${task.cpus}
print("Reading in ${metadata_csv}")
metadata <- read.csv("${metadata_csv}", sep=",")
metadata <- tibble::column_to_rownames(metadata, names(metadata)[1])
print(metadata)
print(head(metadata))
print(dim(metadata))

print("Reading in ${readcounts_csv_gz}")
counts <- read.csv("${readcounts_csv_gz}", sep=",")
counts <- tibble::column_to_rownames(counts, "specimen")
print(counts)
print(head(counts))
print(dim(counts))

# Subset the metadata to have the same rows and order as counts
print("Aligning sample order between metadata and counts")
metadata <- metadata[rownames(counts),]

#### Run the differentialAbundance analysis
da <- differentialTest(
Expand Down

0 comments on commit 8b78dee

Please sign in to comment.