I'm trying to run DESeq on a dds (created from a gse using information from tximeta) in which technical replicates from the same library (run on two different lanes) have been collapsed, so instead of 20 samples, I now have 10. When I run DESeq on the collapsed dds (ddsColl), I get an error:
`Error in validityMethod(object) : nrow(design) == ncol(object) is not TRUE>`
I wonder if it's because the colData that I used for my design matrix to create dds has 20 rows, and my ddsColl has only 10 columns. I originally had 20 samples that were collapsed to 10, and my colData rows represented samples. I'm not sure how to fix this besides rerunning DESeqDataSet with a new colData, but the order of operations seems wrong, in that I would want to run DESeqDataSet before I collapse replicates. My design formula doesn't include 'lane' information, so I don't think that would be an issue in running DESeq. It only includes condition and a term for condition:replicates.nested, to account for biological replicates nested within condition (
<~SPERM + SPERM:LINE.NESTED>). My colData is as follows:
`<DataFrame with 10 rows and 8 columns FASTQ_NAMES names SPERM LINE REP LANE LINE.NESTED runsCollapsed <factor> <integer> <factor> <factor> <factor> <factor> <factor> <character> 14120X1_170412_D00294_0311_ACAJ3TANXX_6 1 H H08 A 1 1 1,2 14120X2_170412_D00294_0311_ACAJ3TANXX_6 3 H H08 B 2 1 3,4 14120X3_170412_D00294_0311_ACAJ3TANXX_6 5 H H08 C 3 1 5,6 14120X4_170412_D00294_0311_ACAJ3TANXX_6 7 H H20 A 4 2 7,8 14120X5_170412_D00294_0311_ACAJ3TANXX_6 9 H H20 B 5 2 9,10 14120X6_170412_D00294_0311_ACAJ3TANXX_6 11 H H20 C 6 2 11,12 14120X7_170412_D00294_0311_ACAJ3TANXX_6 13 L L08 A 7 1 13,14 14120X8_170412_D00294_0311_ACAJ3TANXX_6 15 L L08 B 8 1 15,16 14120X11_170412_D00294_0311_ACAJ3TANXX_6 17 L L17 B 9 2 17,18 14120X12_170412_D00294_0311_ACAJ3TANXX_6 19 L L17 C 10 2 19,20`
Is there another step I'm missing between collapsing replicates and DESeq? Also, I'd love confirmation that my design formula is appropriate given I'm only interested in genes that are differentially expressed between H and L SPERM, after accounting for biological replicates LINE nested within SPERM and REP nested within LINE.