text: user3225: I have been working on RNA-Seq data from two different cohorts, and they show very strong batch effect (~35% variance explained by 1st component in PCA). Since I am trying to do a class discovery from a data set with the subtype of only some samples are known, the only methods I have been using are ComBat and pSVA from SVA package. I would like to compare them with more methods to make the clustering result more trust-worthy.
  I found that some papers used sva package, but not citing the paper on pSVA, meaning perhaps there are some other ways to use sva for this type of data that I am not aware of. Is there a method to construct a null model and a full model for sva only by knowing the batch the samples are from?
  Any other suggestion of batch effect correction tools for a data set with no known phenotype/subtype are also welcome.
  
  user3939: You can just remove the first component from the dataset by setting the first eigenvalue to 0 in the diagonal matrix and then multiplying the SVD matrices. 
  I am not sure which R code you are using to estimate the components (I have a comparison of PCA code in R on https://github.com/aedin/ODSC_2018/tree/master/PCA_vignette)  
  In ade4 R package, there is a function reconst() which reconstructs data from a selection of components: https://rdrr.io/rforge/ade4/man/reconst.html
  Happy to provide code to do this in other PCA versions if needed
  Aedin Culhane
  
original_text: 3225: <p>I have been working on RNA-Seq data from two different cohorts, and they show very strong batch effect (~35% variance explained by 1st component in PCA). Since I am trying to do a class discovery from a data set with the subtype of only some samples are known, the only methods I have been using are ComBat and pSVA from SVA package. I would like to compare them with more methods to make the clustering result more trust-worthy.</p>
  
  <p>I found that some papers used sva package, but not citing the paper on pSVA, meaning perhaps there are some other ways to use sva for this type of data that I am not aware of. Is there a method to construct a null model and a full model for sva only by knowing the batch the samples are from?</p>
  
  <p>Any other suggestion of batch effect correction tools for a data set with no known phenotype/subtype are also welcome.</p>
   3939: <p>You can just remove the first component from the dataset by setting the first eigenvalue to 0 in the diagonal matrix and then multiplying the SVD matrices. </p>
  
  <p>I am not sure which R code you are using to estimate the components (I have a comparison of PCA code in R on <a href="https://github.com/aedin/ODSC_2018/tree/master/PCA_vignette" rel="nofollow noreferrer">https://github.com/aedin/ODSC_2018/tree/master/PCA_vignette</a>)  </p>
  
  <p>In ade4 R package, there is a function <code>reconst()</code> which reconstructs data from a selection of components: <a href="https://rdrr.io/rforge/ade4/man/reconst.html" rel="nofollow noreferrer">https://rdrr.io/rforge/ade4/man/reconst.html</a></p>
  
  <p>Happy to provide code to do this in other PCA versions if needed
  Aedin Culhane</p>
  