So I am no R programmer and my skills in this languages are very limited but I needed to perform a certain analysis in it. I needed to use DESeq2, after many hours I finally got a working script.
library(DESeq2)
a = read.table (file = "superEnhancer_counts.txt",header = T,sep = "\t",row.names = 1)
coldata = read.table(file = "superEnhancer_names.txt",header = T,sep = "\t")[,]
dso = DESeqDataSetFromMatrix(countData = a,colData = coldata,design = ~ Sample)
dsoA<-DESeq(dso )
write.table((results(dsoA)),file="results.txt",sep = "\t",quote = F)
dev.off()
not the prettiest but it works ... But now I need to perform a DESeq2 analysis with paired samples. So two samples are from the same patients. I have read many posts about this but for the world can't figure it out .. is there anybody that can help? This is the name.txt file:
Name Sample
a_unst1 a_unst
b_Rux1 b_Rux
b_Rux2 b_Rux
a_unst2 a_unst
b_Rux3 b_Rux
a_unst3 a_unst
b_Rux4 b_Rux
a_unst4 a_unst
So the unst1 should be paired with the Rux1, the unst2 with the rux2 etc...