error when using several factors in deseq2

I am having an issue using DESeq2 at
I have an RNA-seq using data from the litterature, I aligned using Hisat2 and made my count files using featureCounts. These data come from 2 separate studies one with 3 RNA-seq with 2 replicates each and one study with 3 RNA-seq with 3 replicates each. I’m trying to compare the populations in each study.
I first used DESeq2 with only one factor and 6 factorlevels, and it worked. I have an output, however in the PCA it looks like the 2 studies are far away on PC1 which I believe could be due to batch effect.
I then tried 2 things to take into account batch effect.

  1. creating a 2nd factor, I basically put each study in one factor. However I get the following error:
    Error in .rowNamesDF<-(x, value = value) : invalid ‘row.names’ length
    Calls: rownames<- … row.names<- -> row.names< -> .rowNamesDF<-
    not sure why it does not work while it worked well when I put them all under the same factor. Should I change names of my conditions? They are indeed long but they worked when using only one factor…
  2. tried to keep one factor but used RUV in galaxy. However I am not sure how to proceed, I had an error. Should I make only one global file using RUV with all RNA-seq from one study Vs the other? It does not look like the output file keeps all the names…?
    thanks a lot for any help,
    best regards