I have some RNAseq data - n=2, treated vs control. I have carried out alignment & quantification via Hisat2 > Stringtie > PrepDE.py > DESeq2

I would like to filter out D.E. genes that show high variance between the two replicates. But I don't seem to have an objective way of doing this.

![](https://image.ibb.co/hyyo3J/REP_CONCORDANCE.png)

In the screenshot as shown, I'd like to retain data that looks like the top panel, while filtering out data that looks like the bottom panel. As you can see, genes with very poor concordance between reps also show up with good p-vals and adjusted p-vals, and I was wondering why that is so.

Thanks
Check out the DESeq2 manual for Cooks Distance [here][1]. Cooks Distance is not applied to datasets with less than three replicates, but you can look at Mike Love's code sample [here][2] for an idea of how to apply it to your dataset. 

    maxCooks <- apply(assays(dds)[["cooks"]], 1, max)

From the Manual:

> The results function automatically flags genes which contain a Cook’s
> distance above a cutoff for samples which have 3 or more replicates.
> The p values and adjusted p values for these genes are set to NA. At
> least 3 replicates are required for flagging, as it is difficult to
> judge which sample might be an outlier with only 2 replicates. This
> filtering can be turned off with results(dds, cooksCutoff=FALSE)


  [1]: https://bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html
  [2]: https://support.bioconductor.org/p/68277/