Hi Kevin,
Thanks for your response. I believe it is not a sample mix up (but I am gonna check it again). I do not know it is a male with Klinefelter Syndrome. How can I check it?
For the normalization, I actually made a 3rd column in my sample table and grouped together the sex and condition.
column group of sample table: control_male, treatment_male, control_female, treatment_female
then the dds object as:
dds <- DESeqDataSetFromHTSeqCount( sampleTable = sampleTable, directory = directory, design= ~group)
rld <- rlog(dds, blind=TRUE)
data <- plotPCA(rld, intgroup=c("treatment", "sex"), returnData=TRUE )
percentVar <- round(100 * attr(data, "percentVar"))
ggplot(data, aes(PC1, PC2, color=treatment, shape=sex)) +
xlab(paste0("PC1: ",percentVar[1],"% variance")) +
ylab(paste0("PC2: ",percentVar[2],"% variance")) +
+coord_fixed()
Then I used contrasts for further analysis:
contrast_male <- c("group", "treatment_male", "control_male")
contrast_female <- c("group", "treatment_female", "control_female")
res_male_unshrunken <- results(dds, contrast = contrast_male, alpha = 0.05)
res_male <- lfcShrink(dds, contrast = contrast_male, res=res_male_unshrunken)
summary_res_male <- summary(res_male, alpha=0.05)
The result of the pca plot is from the above code. I think making the "group" column is including the sex in the design and is similar to ~sex+condition design. is that right? is the code above what you meant by including sex?
By segregating male | female, do you mean to run the analysis for male and female samples separately due to the major difference between the male/female samples?


C1,tr4,tr5 are kinda different compared to other samples.