Hello All, I am trying to use miodin package to define study design case control but i get an error which says
sample names must be unique
. please have a look at my code and tell me what i am doing wrong, thanks in advance.
library(miodin)
mp <- MiodinProject(
name = "MyProject",
author = "lee",
path ="." )
countTable <- read.table(paste0("data/",'seq.txt'),
header = TRUE,
sep = '\t',
stringsAsFactors = FALSE
)
sampleTable <- data.frame(
SampleName = colnames(countTable),
SamplingPoint = paste0('sp',rep(1, 15)),
Treatment = rep(c('control_1', 'affected_1'), 15)
)
assayTable <- data.frame(
SampleName = colnames(countTable),
DataFile = paste0("data/",'seq.txt'),
DataColumn = colnames(countTable))
ms <- studyDesignCaseControl(
studyName = "seq",
factorName = "Treatment",
caseName = "affected_1",
controlName = "control_1",
contrastName = "Treatment",
numCase = 15,
numControl = 15,
sampleTable = sampleTable,
assayTable = assayTable,
assayTableName = "RNAseq"
)
mshow(ms)