Last updated: 2021-01-11

Checks: 6 1

Knit directory: Embryoid_Body_Pilot_Workflowr/analysis/

This reproducible R Markdown analysis was created with workflowr (version 1.6.2). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it's best to always run the code in an empty environment.

The command set.seed(20200804) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Using absolute paths to the files within your workflowr project makes it difficult for you and others to run your code on a different machine. Change the absolute path(s) below to the suggested relative path(s) to make your code more reproducible.

absolute relative
/project2/gilad/katie/Pilot_HumanEBs/Embryoid_Body_Pilot_Workflowr/output/Pseudobulk_Limma_res0.1_OnevAllTopTables.csv ../output/Pseudobulk_Limma_res0.1_OnevAllTopTables.csv
/project2/gilad/katie/Pilot_HumanEBs/Embryoid_Body_Pilot_Workflowr/output/Pseudobulk_Limma_res0.1_OnevAll_top10Upregby_adjP.csv ../output/Pseudobulk_Limma_res0.1_OnevAll_top10Upregby_adjP.csv
/project2/gilad/katie/Pilot_HumanEBs/Embryoid_Body_Pilot_Workflowr/output/Pseudobulk_Limma_res0.1_OnevAll_top10Upregby_logFC.csv ../output/Pseudobulk_Limma_res0.1_OnevAll_top10Upregby_logFC.csv

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version cbdbc9f. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/
    Ignored:    analysis/.Rhistory
    Ignored:    output/.Rhistory

Untracked files:
    Untracked:  analysis/CR_SampleFilteringandSCT_Batch1Lane1.Rmd
    Untracked:  analysis/ClusterInfoTables.Rmd
    Untracked:  analysis/CompiledFits_Explore.Rmd
    Untracked:  analysis/IntegrateAnalysis.afterFilter.SCTregressLaneHarmonyBatchindividual.Rmd
    Untracked:  analysis/IntegrateAnalysis.afterFilter.SCTregressLaneHarmonyBatchindividual.knit.md
    Untracked:  analysis/IntegrateReference.Rmd
    Untracked:  analysis/IntegrateReference_SCTregressCao.Rmd
    Untracked:  analysis/IntegrateReference_SCTregressCaoPlusScHCL.Rmd
    Untracked:  analysis/IntegrateReference_ScaleregressCaoPlusScHCL.Rmd
    Untracked:  analysis/PowerAnalysis_EB.Rmd
    Untracked:  analysis/Pseudobulk_VariancePartition_Harmony.Batchindividual_ClusterRes0.1_byCluster.Rmd
    Untracked:  analysis/SingleCell_HierarchicalClustering_NoGeneFilter.Rmd
    Untracked:  analysis/SingleCell_VariancePartitionByCluster_Harmony.Batchindividual_ClusterRes0.1_minPCT0.2.Rmd
    Untracked:  analysis/VarPartPlots_res0.1_SCT.Rmd
    Untracked:  analysis/VarPart_SC_res0.1_RNA.Rmd
    Untracked:  analysis/VarPart_SC_res0.1_SCT.Rmd
    Untracked:  analysis/VarPart_SCres_res0.1.Rmd
    Untracked:  analysis/child/
    Untracked:  analysis/k10topics_Explore.Rmd
    Untracked:  analysis/k6topics_Explore.Rmd
    Untracked:  build_refint_scale.R
    Untracked:  build_refint_sct.R
    Untracked:  build_varpart_sc.R
    Untracked:  code/.ipynb_checkpoints/
    Untracked:  code/CellRangerPreprocess.Rmd
    Untracked:  code/ConvertToDGE.Rmd
    Untracked:  code/ConvertToDGE_PseudoBulk.Rmd
    Untracked:  code/ConvertToDGE_SingleCellRes_minPCT0.2.Rmd
    Untracked:  code/EB.getHumanMetadata.Rmd
    Untracked:  code/PowerAnalysis_NoiseRatio.ipynb
    Untracked:  code/Untitled.ipynb
    Untracked:  code/Untitled1.ipynb
    Untracked:  code/compile_fits.Rmd
    Untracked:  code/fit_all_models.sh
    Untracked:  code/fit_poisson_nmf.R
    Untracked:  code/fit_poisson_nmf.sbatch
    Untracked:  code/functions_for_fit_comparison.Rmd
    Untracked:  code/get_genelist_byPCTthresh.Rmd
    Untracked:  code/prefit_poisson_nmf.R
    Untracked:  code/prefit_poisson_nmf.sbatch
    Untracked:  code/prepare_data_for_fastTopics.Rmd
    Untracked:  data/HCL_Fig1_adata.h5ad
    Untracked:  data/HCL_Fig1_adata.h5seurat
    Untracked:  data/dge/
    Untracked:  data/dge_raw_data.tar.gz
    Untracked:  data/ref.expr.rda
    Untracked:  figure/
    Untracked:  output/CR_sampleQCrds/
    Untracked:  output/CaoEtAl.Obj.CellsOfAllClusters.ProteinCodingGenes.rds
    Untracked:  output/CaoEtAl.Obj.rds
    Untracked:  output/ClusterInfo_res0.1.csv
    Untracked:  output/DGELists/
    Untracked:  output/GeneLists_by_minPCT/
    Untracked:  output/NearestReferenceCell.Cao.hESC.EuclideanDistanceinHarmonySpace.csv
    Untracked:  output/NearestReferenceCell.Cao.hESC.FrequencyofEachAnnotation.csv
    Untracked:  output/Pseudobulk_Limma_res0.1_OnevAllTopTables.csv
    Untracked:  output/Pseudobulk_Limma_res0.1_OnevAll_top10Upregby_adjP.csv
    Untracked:  output/Pseudobulk_Limma_res0.1_OnevAll_top10Upregby_logFC.csv
    Untracked:  output/SingleCell_VariancePartition_RNA_Res0.1_minPCT0.2.rds
    Untracked:  output/SingleCell_VariancePartition_Res0.1_minPCT0.2.rds
    Untracked:  output/SingleCell_VariancePartition_SCT_Res0.1_minPCT0.2.rds
    Untracked:  output/TopicModelling_k10_top10drivergenes.byBeta.csv
    Untracked:  output/TopicModelling_k6_top10drivergenes.byBeta.csv
    Untracked:  output/TopicModelling_k6_top15drivergenes.byZ.csv
    Untracked:  output/VarPart.ByCluster.Res0.1.rds
    Untracked:  output/fasttopics/
    Untracked:  output/merge.Cao.SCTwRegressOrigIdent.rds
    Untracked:  output/merge.all.SCTwRegressOrigIdent.Harmony.rds
    Untracked:  output/mergedObjects/
    Untracked:  output/pdfs/
    Untracked:  output/sampleQCrds/
    Untracked:  slurm-8007969.out

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/Pseudobulk_Limma_Harmony.BatchIndividual_ClusterRes0.1_minPCT0.2.Rmd) and HTML (docs/Pseudobulk_Limma_Harmony.BatchIndividual_ClusterRes0.1_minPCT0.2.html) files. If you've configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
Rmd cbdbc9f KLRhodes 2021-01-11 wflow_publish("analysis/Pseudobulk_Limma_Harmony.BatchIndividual_ClusterRes0.1_minPCT0.2.Rmd")
html 0e51844 KLRhodes 2021-01-11 Build site.
Rmd 63febc0 KLRhodes 2021-01-11 wflow_publish("analysis/Pseudobulk_Limma_Harmony.BatchIndividual_ClusterRes0.1_minPCT0.2.Rmd")
html dd2f60e KLRhodes 2020-10-19 Build site.
Rmd ad4d0f6 KLRhodes 2020-10-19 analysis/index.Rmd
html 7888de8 KLRhodes 2020-08-31 Build site.
Rmd 162da72 KLRhodes 2020-08-31 wflow_publish("analysis/Pseudobulk_Limma_Harmony.BatchIndividual_ClusterRes0.*")

library(Seurat)
library(Matrix)
library(dplyr)
library(edgeR)
library(limma)
library(reshape2)
library(ggplot2)
library(UpSetR)

choose parameters (integration type, clustering res, min pct threshold)

f<- 'Harmony.Batchindividual'
pct<-0.2
res<- 'SCT_snn_res.0.1'
path<- here::here("output/DGELists/")
dge<- readRDS(paste0(path,"Pseudobulk_dge_",f, "_", res,"_minPCT",pct,".rds"))
cpm<- cpmByGroup(dge, group=dge$samples$cluster)
lcpm<- cpmByGroup(dge, group=dge$samples$cluster, log=TRUE)
hist(lcpm)

Version Author Date
7888de8 KLRhodes 2020-08-31
L<- mean(dge$samples$lib.size) *1e-6
M<- median(dge$samples$lib.size) *1e-6
genes.ribo <- grep('^RP',rownames(dge),value=T)
genes.no.ribo <- rownames(dge)[which(!(rownames(dge) %in% genes.ribo))]
dge$counts <- dge$counts[which(rownames(dge$counts) %in% genes.no.ribo),] #remove ribosomal genes
dge<- calcNormFactors(dge, method="TMM")

summary(dge$samples$norm.factors)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
 0.8176  0.9349  1.0050  1.0052  1.0540  1.3300 
design<- model.matrix(~0+ dge$samples$cluster + dge$samples$batch + dge$samples$ind)
v<- voom(dge, design, plot=TRUE)

Version Author Date
7888de8 KLRhodes 2020-08-31
v
An object of class "EList"
$targets
                     group lib.size norm.factors cluster  batch     ind
0.Batch1.SNG-NA18511     1  1409771    1.0299240       0 Batch1 NA18511
0.Batch1.SNG-NA18858     1 88339833    1.0539880       0 Batch1 NA18858
0.Batch1.SNG-NA19160     1  1106878    1.0152859       0 Batch1 NA19160
0.Batch2.SNG-NA18511     1  3189774    0.9982165       0 Batch2 NA18511
0.Batch2.SNG-NA18858     1 99628244    1.0525291       0 Batch2 NA18858
                                    Group
0.Batch1.SNG-NA18511 0.Batch1.SNG-NA18511
0.Batch1.SNG-NA18858 0.Batch1.SNG-NA18858
0.Batch1.SNG-NA19160 0.Batch1.SNG-NA19160
0.Batch2.SNG-NA18511 0.Batch2.SNG-NA18511
0.Batch2.SNG-NA18858 0.Batch2.SNG-NA18858
56 more rows ...

$E
      0.Batch1.SNG-NA18511 0.Batch1.SNG-NA18858 0.Batch1.SNG-NA19160
NOC2L             6.638964             6.548069             6.237207
HES4              5.218783             4.940947             5.262894
ISG15             5.324717             5.452566             5.930318
AGRN              4.947481             4.330642             4.138905
SDF4              5.780662             5.935487             5.864730
      0.Batch2.SNG-NA18511 0.Batch2.SNG-NA18858 0.Batch2.SNG-NA19160
NOC2L             6.199990             6.052279             6.101584
HES4              5.376394             4.906240             4.724087
ISG15             5.440288             5.323509             5.484575
AGRN              4.359968             4.274032             4.109171
SDF4              5.491452             5.494177             5.266712
      0.Batch3.SNG-NA18511 0.Batch3.SNG-NA18858 0.Batch3.SNG-NA19160
NOC2L             6.330479             6.014823             6.197081
HES4              5.562119             4.879764             4.415591
ISG15             5.833719             5.420777             5.767354
AGRN              4.428086             4.335191             4.221235
SDF4              5.466343             5.484522             5.529410
      1.Batch1.SNG-NA18511 1.Batch1.SNG-NA18858 1.Batch1.SNG-NA19160
NOC2L             6.256989             6.071072             6.095699
HES4              9.216089             7.600635             8.691377
ISG15             5.457375             5.401419             5.792769
AGRN              5.096716             4.928903             4.839761
SDF4              6.013398             5.952802             6.177094
      1.Batch2.SNG-NA18511 1.Batch2.SNG-NA18858 1.Batch2.SNG-NA19160
NOC2L             6.020203             5.746048             5.921435
HES4              8.961112             6.914192             8.185544
ISG15             5.584400             5.846988             5.481842
AGRN              4.887505             4.771953             4.808975
SDF4              5.634987             5.441094             5.847058
      1.Batch3.SNG-NA18511 1.Batch3.SNG-NA18858 1.Batch3.SNG-NA19160
NOC2L             5.914525             5.947617             6.019365
HES4              8.108209             6.999682             7.433628
ISG15             5.726622             6.046938             5.898200
AGRN              4.772352             4.652745             4.453329
SDF4              5.779522             5.592372             5.824881
      2.Batch1.SNG-NA18511 2.Batch1.SNG-NA18858 2.Batch1.SNG-NA19160
NOC2L             6.149054             6.542508             6.178097
HES4              5.422492             5.948829             5.865813
ISG15             6.365217             6.825681             6.556433
AGRN              4.342569             4.811325             4.183400
SDF4              6.558424             6.317216             6.230266
      2.Batch2.SNG-NA18511 2.Batch2.SNG-NA18858 2.Batch2.SNG-NA19160
NOC2L             5.641101             5.599918             5.903909
HES4              4.928728             3.725449             5.163926
ISG15             6.415605             6.227950             6.253017
AGRN              4.249301             3.725449             4.083683
SDF4              6.121796             5.840927             6.134677
      2.Batch3.SNG-NA18511 2.Batch3.SNG-NA18858 2.Batch3.SNG-NA19160
NOC2L             5.963510             5.792228             6.070385
HES4              3.754793             5.140152             4.853651
ISG15             6.171530             6.856359             6.341741
AGRN              3.641582             2.332797             3.678776
SDF4              6.076721             6.033237             5.917017
      3.Batch1.SNG-NA18511 3.Batch1.SNG-NA18858 3.Batch1.SNG-NA19160
NOC2L             6.383545             6.537884             6.196177
HES4              6.978209             6.813518             6.519236
ISG15             5.982072             4.792456             5.050893
AGRN              5.329995             4.792456             5.120687
SDF4              6.209964             5.749388             5.823875
      3.Batch2.SNG-NA18511 3.Batch2.SNG-NA18858 3.Batch2.SNG-NA19160
NOC2L             6.196577             5.693029             6.128192
HES4              6.250516             5.330458             6.447564
ISG15             5.822182             4.845032             4.889632
AGRN              5.672156             4.108066             5.295435
SDF4              5.925275             5.330458             5.721170
      3.Batch3.SNG-NA18511 3.Batch3.SNG-NA18858 3.Batch3.SNG-NA19160
NOC2L             5.994855             6.599351             5.966133
HES4              4.473739             5.751354             5.540253
ISG15             4.581992             5.014388             4.174892
AGRN              4.948419             5.014388             5.113659
SDF4              5.519835             4.651818             5.866677
      4.Batch1.SNG-NA18511 4.Batch1.SNG-NA18858 4.Batch1.SNG-NA19160
NOC2L             5.918890             5.328737             5.762589
HES4              7.235340             6.879672             6.893938
ISG15             6.687102             7.898486             6.987736
AGRN              5.703063             5.636471             6.149612
SDF4              6.595062             6.477205             6.186046
      4.Batch2.SNG-NA18511 4.Batch2.SNG-NA18858 4.Batch2.SNG-NA19160
NOC2L             5.854994             5.556499             5.720397
HES4              7.052565             6.942778             6.623749
ISG15             6.710415             7.537390             6.824020
AGRN              5.162011             5.149874             5.353835
SDF4              6.310723             5.952428             6.315556
      4.Batch3.SNG-NA18511 4.Batch3.SNG-NA18858 4.Batch3.SNG-NA19160
NOC2L             5.930439             5.816523             5.906183
HES4              5.598550             7.025558             6.325320
ISG15             6.128039             7.888389             6.978991
AGRN              5.083501             5.427112             5.260126
SDF4              6.150940             6.018832             6.292194
      5.Batch1.SNG-NA18511 5.Batch1.SNG-NA18858 5.Batch1.SNG-NA19160
NOC2L             6.528132             6.624561             6.524047
HES4              7.887655             5.609915             6.989321
ISG15             4.556548             6.103729             4.032053
AGRN              5.669662             5.124488             5.417393
SDF4              6.155089             5.723125             5.803557
      5.Batch2.SNG-NA18511 5.Batch2.SNG-NA18858 5.Batch2.SNG-NA19160
NOC2L             6.063413             5.989100             6.104674
HES4              7.772730             6.188409             6.472066
ISG15             4.773593             5.141103             3.318892
AGRN              5.462839             5.757775             5.057730
SDF4              5.383646             5.626530             5.431484
      5.Batch3.SNG-NA18511 5.Batch3.SNG-NA18858 5.Batch3.SNG-NA19160
NOC2L             5.988417             5.583832             6.089701
HES4              7.132890             4.760710             6.115973
ISG15             4.611302             4.760710             3.113801
AGRN              4.935043             4.760710             4.590511
SDF4              5.292772             5.815157             5.713177
      6.Batch1.SNG-NA18511 6.Batch1.SNG-NA18858 6.Batch1.SNG-NA19160
NOC2L             5.973298             5.483099             5.672436
HES4              7.170099             5.968526             6.889853
ISG15             9.596589             5.483099             8.101527
AGRN              6.550843             4.746133             6.535801
SDF4              6.490089             6.331096             6.167761
      6.Batch2.SNG-NA18511 6.Batch2.SNG-NA19160 6.Batch3.SNG-NA18511
NOC2L             6.106462             5.711079             5.503024
HES4              5.888282             6.776502             6.943597
ISG15             7.994672             7.437596             7.991602
AGRN              5.028460             6.122393             5.245866
SDF4              5.558975             5.825412             6.038061
      6.Batch3.SNG-NA19160
NOC2L             5.637787
HES4              6.401613
ISG15             8.324006
AGRN              5.186803
SDF4              6.011076
10180 more rows ...

$weights
         [,1]     [,2]     [,3]     [,4]     [,5]      [,6]     [,7]     [,8]
[1,] 6.431916 41.51425 5.284795 9.811831 40.40790 11.140958 25.98550 39.87328
[2,] 4.550121 30.19087 3.723621 6.313930 28.19284  6.855538 17.96080 24.99744
[3,] 4.528174 35.58762 3.660784 7.239058 35.82264  7.742423 21.68234 35.05005
[4,] 3.095077 25.45962 2.375542 4.439929 24.85733  4.987377 14.45915 22.57551
[5,] 4.886507 35.50497 4.230978 7.072442 33.62303  8.365265 21.44130 32.96049
         [,9]    [,10]    [,11]    [,12]    [,13]    [,14]    [,15]    [,16]
[1,] 20.08378 27.67708 14.68138 27.70318 27.94566 18.93523 21.87930 26.97333
[2,] 12.54769 52.22316 25.89675 50.39992 50.50964 30.70401 38.13841 43.67227
[3,] 15.57410 25.06019 13.71973 23.99115 26.17103 18.56348 19.42460 25.03075
[4,] 10.04298 21.07287  9.32857 20.98907 21.36202 12.99572 16.19713 18.80142
[5,] 16.41662 26.84389 14.04097 27.13414 26.36484 17.66351 20.77130 25.26352
         [,17]    [,18]     [,19]     [,20]     [,21]     [,22]     [,23]
[1,]  9.134733 22.80686 13.667003 2.5520182 19.241403  9.217620 0.6980291
[2,] 15.484326 35.64761 11.203415 1.2808396 15.670514  6.558968 0.4335242
[3,]  8.719828 20.10535 15.531270 3.4625833 20.420649 11.403381 0.9609097
[4,]  4.556935 15.39915  5.968453 0.7479667  9.926134  3.957180 0.3158993
[5,]  8.073718 21.51586 14.760670 2.9102387 20.730546  9.708264 0.7309726
         [,24]     [,25]     [,26]     [,27]    [,28]     [,29]    [,30]
[1,] 14.176676 12.661618 0.6563529 16.932067 6.431747 2.0237300 19.77768
[2,] 10.349558  7.889203 0.3536638 10.941530 7.352719 1.7630311 20.55233
[3,] 15.859331 14.927886 0.8818901 18.529036 3.832212 1.0393622 12.62874
[4,]  6.263387  4.724821 0.2718365  7.032874 4.208964 0.9955042 14.59363
[5,] 14.943063 13.075462 0.6789117 17.597051 5.154360 1.4536564 17.45418
        [,31]     [,32]     [,33]    [,34]     [,35]    [,36]     [,37]
[1,] 3.728046 0.6475818 14.517105 6.425352 0.8934026 17.27681 10.132333
[2,] 3.884228 0.5584429 14.378407 5.549849 0.6336634 15.04216 16.762215
[3,] 1.972346 0.4461850  8.819443 3.962643 0.5858969 11.00485 15.790206
[4,] 2.190698 0.4137049 10.059942 3.773516 0.4831896 11.08245  9.451264
[5,] 2.845599 0.5090940 12.013245 4.856936 0.6777276 14.44734 12.619581
         [,38]     [,39]    [,40]    [,41]     [,42]     [,43]    [,44]
[1,]  5.551504  7.791019 10.68701 2.447371 10.025377  9.944092 3.254204
[2,]  8.783537 13.245523 16.58118 3.694754 15.119523 13.671604 3.801898
[3,] 10.728431 12.235040 17.09536 4.900442 15.462474 16.056730 6.047476
[4,]  4.811975  7.139187 10.04651 1.964783  9.321564  8.057447 2.232151
[5,]  7.265883 10.269233 12.71600 3.190897 12.204877 11.832167 3.873585
        [,45]     [,46]    [,47]     [,48]     [,49]     [,50]     [,51]
[1,] 18.01059 10.222377 3.138945 15.444373 10.530066 1.1815080 10.304070
[2,] 21.96642 13.928699 3.679351 19.016687 13.489610 1.3268478 12.610055
[3,] 24.76003  4.571048 1.147407  7.124721  4.964830 0.6028348  4.532964
[4,] 15.56020  7.030687 1.655454 11.581170  7.325607 0.7382867  7.076254
[5,] 20.62655  8.434597 2.402367 13.524820  8.295530 0.8877284  8.239576
         [,52]     [,53]     [,54]    [,55]     [,56]    [,57]    [,58]
[1,]  9.745966 1.3454345 11.867007 2.648834 0.4577756 3.572129 1.742307
[2,] 10.820897 1.1826829 12.357834 4.453690 0.6094011 5.362935 3.333483
[3,]  4.543722 0.6518845  5.190990 6.684286 1.2943609 8.171292 5.347110
[4,]  5.758106 0.7087039  7.233630 2.678536 0.4337226 3.572191 1.779529
[5,]  7.494726 0.9758391  9.590081 3.275818 0.5301035 4.177155 2.125773
        [,59]    [,60]     [,61]
[1,] 3.436238 2.369097  4.525188
[2,] 4.793791 3.356727  5.524276
[3,] 8.319574 6.458774 11.269555
[4,] 3.453803 1.933325  4.058538
[5,] 3.890978 2.791188  5.100664
10180 more rows ...

$design
  dge$samples$cluster0 dge$samples$cluster1 dge$samples$cluster2
1                    1                    0                    0
2                    1                    0                    0
3                    1                    0                    0
4                    1                    0                    0
5                    1                    0                    0
  dge$samples$cluster3 dge$samples$cluster4 dge$samples$cluster5
1                    0                    0                    0
2                    0                    0                    0
3                    0                    0                    0
4                    0                    0                    0
5                    0                    0                    0
  dge$samples$cluster6 dge$samples$batchBatch2 dge$samples$batchBatch3
1                    0                       0                       0
2                    0                       0                       0
3                    0                       0                       0
4                    0                       1                       0
5                    0                       1                       0
  dge$samples$indNA18858 dge$samples$indNA19160
1                      0                      0
2                      1                      0
3                      0                      1
4                      0                      0
5                      1                      0
56 more rows ...
fit<- lmFit(v,design)
dim(fit)
[1] 10185    11
head(fit)
An object of class "MArrayLM"
$coefficients
        dge$samples$cluster0 dge$samples$cluster1 dge$samples$cluster2
NOC2L               6.521581             6.234605             6.220112
HES4                6.202813             8.991581             5.781038
ISG15               5.528388             5.742573             6.459499
AGRN                4.668509             5.076479             4.285475
SDF4                5.895164             6.074760             6.383872
B3GALT6             5.065073             5.569461             5.492295
        dge$samples$cluster3 dge$samples$cluster4 dge$samples$cluster5
NOC2L               6.335556             6.036905             6.435496
HES4                6.879074             7.443107             7.624007
ISG15               4.949419             6.996131             4.240453
AGRN                5.440944             5.702992             5.457458
SDF4                6.016760             6.547579             5.870733
B3GALT6             5.594514             5.460039             5.425492
        dge$samples$cluster6 dge$samples$batchBatch2 dge$samples$batchBatch3
NOC2L               5.929965              -0.2924504              -0.2539852
HES4                7.351417              -0.3779818              -0.9139473
ISG15               8.240399              -0.1721220              -0.0828577
AGRN                6.084659              -0.2004012              -0.3806297
SDF4                6.267931              -0.3584514              -0.3307362
B3GALT6             5.501144              -0.4206694              -0.5606689
        dge$samples$indNA18858 dge$samples$indNA19160
NOC2L              -0.13883794           -0.039787837
HES4               -1.06722538           -0.416795987
ISG15               0.10743035           -0.022116613
AGRN               -0.15866862           -0.120606924
SDF4               -0.08343974           -0.002033915
B3GALT6            -0.31880604            0.042704121

$stdev.unscaled
        dge$samples$cluster0 dge$samples$cluster1 dge$samples$cluster2
NOC2L              0.1208544           0.10048815            0.1270000
HES4               0.1237550           0.08264593            0.1390293
ISG15              0.1283113           0.10401559            0.1219884
AGRN               0.1574168           0.11993347            0.1818788
SDF4               0.1288437           0.10285136            0.1252621
B3GALT6            0.1504900           0.11363853            0.1449090
        dge$samples$cluster3 dge$samples$cluster4 dge$samples$cluster5
NOC2L              0.1435807            0.1359875            0.1354571
HES4               0.1397886            0.1140146            0.1223383
ISG15              0.1720368            0.1176188            0.1869172
AGRN               0.1765880            0.1513562            0.1656992
SDF4               0.1547563            0.1279624            0.1473214
B3GALT6            0.1760660            0.1568445            0.1696538
        dge$samples$cluster6 dge$samples$batchBatch2 dge$samples$batchBatch3
NOC2L              0.2429432              0.09277119              0.09046154
HES4               0.2015405              0.08360033              0.08479876
ISG15              0.1636313              0.09500493              0.09273144
AGRN               0.2535648              0.11292364              0.11300332
SDF4               0.2268140              0.09552078              0.09324332
B3GALT6            0.2926169              0.10955877              0.10776691
        dge$samples$indNA18858 dge$samples$indNA19160
NOC2L                0.1082216             0.08784922
HES4                 0.1015368             0.07922947
ISG15                0.1104477             0.08936361
AGRN                 0.1391136             0.10823923
SDF4                 0.1137425             0.09004569
B3GALT6              0.1370325             0.10302609

$sigma
[1] 0.4845726 1.6703666 1.3986638 0.6227602 0.4840251 0.5306907

$df.residual
[1] 50 50 50 50 50 50

$cov.coefficients
                     dge$samples$cluster0 dge$samples$cluster1
dge$samples$cluster0           0.17748918           0.06637807
dge$samples$cluster1           0.06637807           0.17748918
dge$samples$cluster2           0.06637807           0.06637807
dge$samples$cluster3           0.06637807           0.06637807
dge$samples$cluster4           0.06637807           0.06637807
                     dge$samples$cluster2 dge$samples$cluster3
dge$samples$cluster0           0.06637807           0.06637807
dge$samples$cluster1           0.06637807           0.06637807
dge$samples$cluster2           0.17748918           0.06637807
dge$samples$cluster3           0.06637807           0.17748918
dge$samples$cluster4           0.06637807           0.06637807
                     dge$samples$cluster4 dge$samples$cluster5
dge$samples$cluster0           0.06637807           0.06637807
dge$samples$cluster1           0.06637807           0.06637807
dge$samples$cluster2           0.06637807           0.06637807
dge$samples$cluster3           0.06637807           0.06637807
dge$samples$cluster4           0.17748918           0.06637807
                     dge$samples$cluster6 dge$samples$batchBatch2
dge$samples$cluster0           0.05627706             -0.04978355
dge$samples$cluster1           0.05627706             -0.04978355
dge$samples$cluster2           0.05627706             -0.04978355
dge$samples$cluster3           0.05627706             -0.04978355
dge$samples$cluster4           0.05627706             -0.04978355
                     dge$samples$batchBatch3 dge$samples$indNA18858
dge$samples$cluster0             -0.04978355            -0.05194805
dge$samples$cluster1             -0.04978355            -0.05194805
dge$samples$cluster2             -0.04978355            -0.05194805
dge$samples$cluster3             -0.04978355            -0.05194805
dge$samples$cluster4             -0.04978355            -0.05194805
                     dge$samples$indNA19160
dge$samples$cluster0            -0.04761905
dge$samples$cluster1            -0.04761905
dge$samples$cluster2            -0.04761905
dge$samples$cluster3            -0.04761905
dge$samples$cluster4            -0.04761905
6 more rows ...

$pivot
 [1]  1  2  3  4  5  6  7  8  9 10 11

$rank
[1] 11

$Amean
   NOC2L     HES4    ISG15     AGRN     SDF4  B3GALT6 
6.020134 6.259862 5.956768 4.883920 5.873302 4.950374 

$method
[1] "ls"

$design
  dge$samples$cluster0 dge$samples$cluster1 dge$samples$cluster2
1                    1                    0                    0
2                    1                    0                    0
3                    1                    0                    0
4                    1                    0                    0
5                    1                    0                    0
  dge$samples$cluster3 dge$samples$cluster4 dge$samples$cluster5
1                    0                    0                    0
2                    0                    0                    0
3                    0                    0                    0
4                    0                    0                    0
5                    0                    0                    0
  dge$samples$cluster6 dge$samples$batchBatch2 dge$samples$batchBatch3
1                    0                       0                       0
2                    0                       0                       0
3                    0                       0                       0
4                    0                       1                       0
5                    0                       1                       0
  dge$samples$indNA18858 dge$samples$indNA19160
1                      0                      0
2                      1                      0
3                      0                      1
4                      0                      0
5                      1                      0
56 more rows ...
#all pairwise cluster comparisons
nclust<- length(unique(dge$samples$cluster))
nterms<- ncol(fit)
contrasts<- NULL
for (b in 1:nclust){
for (i in 1:nclust){
    c<- rep(0,nterms)
    c[b]<- 1
    c[i]<- -1
    contrasts<- cbind(contrasts, c)
}
}

selfcols<- c()
el<- 1
while (length(selfcols) <= nclust){
  selfcols<- c(selfcols, el)
  el<- el + nclust + 1
}

contrasts<- contrasts[,-selfcols]
contrasts
       c  c  c  c  c  c  c  c  c  c  c  c  c  c  c  c  c  c  c  c  c  c  c  c
 [1,]  1  1  1  1  1  1 -1  0  0  0  0  0 -1  0  0  0  0  0 -1  0  0  0  0  0
 [2,] -1  0  0  0  0  0  1  1  1  1  1  1  0 -1  0  0  0  0  0 -1  0  0  0  0
 [3,]  0 -1  0  0  0  0  0 -1  0  0  0  0  1  1  1  1  1  1  0  0 -1  0  0  0
 [4,]  0  0 -1  0  0  0  0  0 -1  0  0  0  0  0 -1  0  0  0  1  1  1  1  1  1
 [5,]  0  0  0 -1  0  0  0  0  0 -1  0  0  0  0  0 -1  0  0  0  0  0 -1  0  0
 [6,]  0  0  0  0 -1  0  0  0  0  0 -1  0  0  0  0  0 -1  0  0  0  0  0 -1  0
 [7,]  0  0  0  0  0 -1  0  0  0  0  0 -1  0  0  0  0  0 -1  0  0  0  0  0 -1
 [8,]  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
 [9,]  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
[10,]  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
[11,]  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
       c  c  c  c  c  c  c  c  c  c  c  c  c  c  c  c  c  c
 [1,] -1  0  0  0  0  0 -1  0  0  0  0  0 -1  0  0  0  0  0
 [2,]  0 -1  0  0  0  0  0 -1  0  0  0  0  0 -1  0  0  0  0
 [3,]  0  0 -1  0  0  0  0  0 -1  0  0  0  0  0 -1  0  0  0
 [4,]  0  0  0 -1  0  0  0  0  0 -1  0  0  0  0  0 -1  0  0
 [5,]  1  1  1  1  1  1  0  0  0  0 -1  0  0  0  0  0 -1  0
 [6,]  0  0  0  0 -1  0  1  1  1  1  1  1  0  0  0  0  0 -1
 [7,]  0  0  0  0  0 -1  0  0  0  0  0 -1  1  1  1  1  1  1
 [8,]  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
 [9,]  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
[10,]  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
[11,]  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
#first, testing all pairwise cluster comparisons. 
fit<- contrasts.fit(fit, contrasts= contrasts)
efit<- eBayes(fit)
plotSA(efit)

Version Author Date
7888de8 KLRhodes 2020-08-31
summary(decideTests(efit))
          c    c    c    c    c    c    c    c    c    c    c    c    c    c
Down   3699 3580 3432 3532 3644 2885 4047 2981 1350 3371 2770 2496 3898 3429
NotSig 2439 2707 2837 3073 2267 4232 2439 3775 7024 3185 4055 4892 2707 3775
Up     4047 3898 3916 3580 4274 3068 3699 3429 1811 3629 3360 2797 3580 2981
          c    c    c    c    c    c    c    c    c    c    c    c    c    c
Down   2544 2409 3152 1671 3916 1811 2491 3100 2448 2254 3580 3629 2588 3134
NotSig 5150 5188 3617 6975 2837 7024 5150 3951 5019 5665 3073 3185 5188 3951
Up     2491 2588 3416 1539 3432 1350 2544 3134 2718 2266 3532 3371 2409 3100
          c    c    c    c    c    c    c    c    c    c    c    c    c    c
Down   3462 2013 4274 3360 3416 2718 3644 2700 3068 2797 1539 2266 1904 2690
NotSig 3079 6268 2267 4055 3617 5019 3079 4795 4232 4892 6975 5665 6268 4795
Up     3644 1904 3644 2770 3152 2448 3462 2690 2885 2496 1671 2254 2013 2700
topTable(efit, coef=1, sort.by= "P")
           logFC  AveExpr         t      P.Value    adj.P.Val        B
TTC3   -4.555146 7.213926 -29.36546 3.374794e-35 3.437227e-31 70.06161
SDK2   -4.259555 3.438961 -28.06537 3.462373e-34 1.763214e-30 67.20281
PLAGL1 -4.916252 4.292829 -27.27100 1.504927e-33 5.109229e-30 65.78618
FZD3   -2.921795 6.088419 -25.82754 2.395099e-32 6.098520e-29 63.55308
LIX1   -7.007386 4.120840 -25.11608 9.838029e-32 1.718866e-28 61.70090
MAPK10 -4.975294 4.251468 -25.10174 1.012587e-31 1.718866e-28 61.85524
DACH1  -5.334254 3.809426 -24.35787 4.604243e-31 6.699173e-28 60.27756
PHC2   -4.707853 5.434183 -23.98984 9.880943e-31 1.084531e-27 59.71449
WLS    -4.446207 5.516756 -23.96553 1.039573e-30 1.084531e-27 59.77035
BTBD17 -5.135767 2.561903 -23.95405 1.064831e-30 1.084531e-27 59.25296
vol<- topTable(efit, coef=13, n=nrow(fit))
labsig<- vol[abs(vol$logFC) >=9.5 | vol$adj.P.Val < 1e-29,]
labsiggenes<- rownames(labsig)
thresh<- vol$adj.P.Val < 0.05
vol<-cbind(vol, thresh)
ggplot(vol, aes(x=logFC, y= -log10(adj.P.Val))) +
  geom_point(aes(colour=thresh), show.legend = FALSE) +
  scale_colour_manual(values = c("TRUE" = "red", "FALSE" = "black")) +
  geom_text(data=labsig, aes(label=labsiggenes))

Version Author Date
0e51844 KLRhodes 2021-01-11
vol<- topTable(efit, coef=1, n=nrow(fit))
labsig<-  vol[(vol$adj.P.Val < 5e-29) | (vol$logFC> 0 & vol$adj.P.Val < 1e-22) |vol$logFC> 5 |vol$logFC < -7,]
labsiggenes<- rownames(labsig)
thresh<- vol$adj.P.Val < 0.05
vol<-cbind(vol, thresh)
ggplot(vol, aes(x=logFC, y= -log10(adj.P.Val))) +
  geom_point(aes(colour=thresh), show.legend = FALSE) +
  scale_colour_manual(values = c("TRUE" = "red", "FALSE" = "black")) +
  geom_text(data=labsig, aes(label=labsiggenes))

Version Author Date
0e51844 KLRhodes 2021-01-11
7888de8 KLRhodes 2020-08-31
dt<- decideTests(efit)

#which genes are always significantly upreg in cluster 0
c0.common<- which(dt[,1]>0 & dt[,2]>0 & dt[,3]>0 & dt[,4]>0 & dt[,5]>0 & dt[,6]>0)

length(c0.common)
[1] 1281
genes.common<- rownames(dt[c0.common,])
tops0<- topTable(efit, coef=c(1:9), n=nrow(fit))
tops0.common<- tops0[rownames(tops0) %in% genes.common,]

head(tops0.common, n=40)
                 c      c.1       c.2       c.3       c.4       c.5        c.6
ADD2     1.0762450 3.191322 1.8612156 3.5196754 0.3805445 1.7427946 -1.0762450
RBPJ     0.5305750 1.251712 0.7478626 1.4086629 0.3196658 1.3547030 -0.5305750
TPD52    2.0292328 3.008293 2.8663648 0.7893244 0.6878505 3.3360945 -2.0292328
TERF1    2.2393122 2.434590 2.4817362 3.5126054 2.1503258 3.2624666 -2.2393122
PHC1     2.0006741 2.324878 2.3995770 2.8016117 2.1013867 2.6855842 -2.0006741
FNDC10   0.8079705 2.096710 1.3363445 2.3715854 1.0572707 1.5331611 -0.8079705
JARID2   1.3737733 1.989100 1.7273883 2.2051412 0.9734495 2.0254508 -1.3737733
DPPA4    1.8142902 2.610799 1.7390857 3.3161013 1.7416934 2.5253857 -1.8142902
TBC1D23  2.0478753 1.588847 1.7311491 1.8175799 1.8344121 1.8614789 -2.0478753
ZNF398   2.2692475 2.228380 2.3656815 2.4200679 2.0681632 1.9467357 -2.2692475
CDCA7L   0.6416218 2.984502 0.9350240 1.8729450 1.0213561 2.8335479 -0.6416218
RAP1GAP2 3.2419153 4.317927 4.1983904 2.7456710 1.4466505 3.0239989 -3.2419153
SEPHS1   1.6680305 2.229236 1.6687873 2.6861440 1.6177193 2.3965022 -1.6680305
VASH2    2.6042807 3.120869 3.2083566 4.3919440 0.8433217 3.7341930 -2.6042807
MYC      3.5117579 1.391381 4.1560120 4.4581655 3.5523878 0.9076810 -3.5117579
TLCD1    2.1086952 1.749002 3.5363316 0.9977126 3.9858821 2.3970504 -2.1086952
GABRB3   2.3208404 3.768053 3.2313303 3.5547162 0.6861179 4.0041570 -2.3208404
VSIG10   2.3878375 3.129086 3.0924190 2.3299073 2.8914969 2.3500252 -2.3878375
HPRT1    0.4465502 1.023549 0.9317182 1.8326043 0.8813376 0.6117789 -0.4465502
ZSCAN2   2.3988085 1.358081 2.1346100 1.9782067 1.3865234 1.7970320 -2.3988085
LRRC47   0.9211033 1.055227 1.1516966 1.2186692 0.8903629 1.1825924 -0.9211033
UGP2     1.9704665 2.309099 2.3103801 2.3595844 1.9650201 2.6661639 -1.9704665
HAGHL    2.4342165 2.140565 2.4994430 2.9061823 2.4119192 2.3955740 -2.4342165
SOCS1    3.5654454 0.886749 3.2648022 2.2054795 3.3592612 2.9800047 -3.5654454
USO1     1.3235493 1.432494 1.2682643 1.4479385 1.2127183 1.5933690 -1.3235493
ZNF589   1.2101177 2.242965 1.3514383 2.3624792 1.6262473 1.8271858 -1.2101177
CARMIL2  3.1635508 4.732247 2.8854415 2.8972600 0.6189099 3.5012907 -3.1635508
ABCA7    2.9648325 1.430140 4.0102640 1.2278926 2.8161351 2.2138990 -2.9648325
ETV4     2.1238857 4.151495 4.1174351 1.9045015 4.3027872 2.5667720 -2.1238857
INTS13   1.2326159 1.382125 0.8589813 1.6839006 1.5046232 1.2874264 -1.2326159
PPARGC1B 3.0023832 2.743984 2.8888505 2.9244727 2.4454271 2.0100548 -3.0023832
DNAJB6   0.7285440 1.198174 0.8268977 1.4398291 0.2467220 0.8386550 -0.7285440
FRAT2    2.1742313 3.125506 2.0458956 2.1917566 1.6379688 1.9355715 -2.1742313
CYCS     1.0291318 1.277607 1.0940186 1.5337022 0.5480318 1.2756189 -1.0291318
PDCD2L   1.3609128 1.698955 1.8522889 1.4132858 1.3142644 1.6903733 -1.3609128
DDX21    1.0950546 1.552972 1.1875878 1.5943816 1.0423820 1.1812003 -1.0950546
NFE2L3   2.3934931 4.868765 3.9734604 1.8859697 3.7752511 3.2608496 -2.3934931
SLC29A1  1.1875736 2.701955 2.2261250 0.9053475 2.3501282 1.0038323 -1.1875736
SKA3     1.6767070 2.094118 1.7426533 2.5976425 3.0334423 2.5320663 -1.6767070
TKT      0.8635789 1.187676 0.6781470 1.1630237 0.9159787 1.3426905 -0.8635789
                 c.7          c.8  AveExpr         F      P.Value    adj.P.Val
ADD2      2.11507657  0.784970548 4.166766 107.87048 1.643498e-28 6.199640e-27
RBPJ      0.72113718  0.217287526 7.153192  95.38602 3.542209e-27 9.322325e-26
TPD52     0.97905981  0.837132048 4.661170  85.52196 5.247080e-26 1.014070e-24
TERF1     0.19527768  0.242424032 7.578498  82.09970 1.427405e-25 2.485149e-24
PHC1      0.32420361  0.398902919 3.639425  76.61300 7.696156e-25 1.137668e-23
FNDC10    1.28873956  0.528374028 3.830290  76.07478 9.131385e-25 1.330517e-23
JARID2    0.61532665  0.353614961 6.547235  75.55727 1.077407e-24 1.549915e-23
DPPA4     0.79650855 -0.075204536 7.137063  75.08860 1.252621e-24 1.767029e-23
TBC1D23  -0.45902793 -0.316726160 4.673767  73.52998 2.080050e-24 2.794896e-23
ZNF398   -0.04086744  0.096434035 3.653416  72.94447 2.522768e-24 3.323983e-23
CDCA7L    2.34287978  0.293402257 5.217570  72.48083 2.942116e-24 3.788300e-23
RAP1GAP2  1.07601146  0.956475175 1.815557  71.03922 4.772359e-24 5.870347e-23
SEPHS1    0.56120553  0.000756847 7.332304  70.68298 5.385437e-24 6.545426e-23
VASH2     0.51658795  0.604075849 4.588320  68.37019 1.195993e-23 1.357992e-22
MYC      -2.12037706  0.644254065 3.868981  66.02013 2.757155e-23 2.910013e-22
TLCD1    -0.35969317  1.427636437 3.433076  64.87588 4.179824e-23 4.240190e-22
GABRB3    1.44721257  0.910489935 4.429625  64.20572 5.349027e-23 5.299595e-22
VSIG10    0.74124880  0.704581582 4.340578  64.13301 5.494831e-23 5.407233e-22
HPRT1     0.57699903  0.485168006 5.420837  63.90241 5.985125e-23 5.838937e-22
ZSCAN2   -1.04072715 -0.264198528 3.785062  63.14985 7.925411e-23 7.529880e-22
LRRC47    0.13412389  0.230593294 5.387962  61.69550 1.374959e-22 1.257088e-21
UGP2      0.33863254  0.339913647 7.393647  61.16606 1.684998e-22 1.516051e-21
HAGHL    -0.29365127  0.065226529 4.273916  61.11243 1.720209e-22 1.545003e-21
SOCS1    -2.67869637 -0.300643197 4.376965  60.72917 1.995118e-22 1.774697e-21
USO1      0.10894499 -0.055285055 6.282203  60.68325 2.030982e-22 1.803448e-21
ZNF589    1.03284734  0.141320583 3.631530  60.16624 2.484129e-22 2.160619e-21
CARMIL2   1.56869624 -0.278109295 1.523537  59.73428 2.942726e-22 2.514402e-21
ABCA7    -1.53469269  1.045431499 3.068505  59.45114 3.290210e-22 2.780978e-21
ETV4      2.02760934  1.993549427 4.218631  58.79489 4.269143e-22 3.520747e-21
INTS13    0.14950859 -0.373634588 4.659950  58.52857 4.748469e-22 3.881474e-21
PPARGC1B -0.25839944 -0.113532706 2.214953  58.06650 5.716929e-22 4.602919e-21
DNAJB6    0.46962964  0.098353764 7.211588  57.80936 6.342485e-22 5.070503e-21
FRAT2     0.95127499 -0.128335714 5.295428  57.78769 6.398345e-22 5.107143e-21
CYCS      0.24847475  0.064886819 8.499625  57.06949 8.569848e-22 6.667983e-21
PDCD2L    0.33804242  0.491376149 4.223995  57.06723 8.577761e-22 6.669046e-21
DDX21     0.45791714  0.092533122 7.100406  57.00243 8.808293e-22 6.837841e-21
NFE2L3    2.47527209  1.579967274 3.705582  56.75409 9.752900e-22 7.505264e-21
SLC29A1   1.51438145  1.038551457 4.693604  56.36385 1.145487e-21 8.706559e-21
SKA3      0.41741136  0.065946318 4.590506  56.12904 1.262473e-21 9.468546e-21
TKT       0.32409682 -0.185431989 9.112727  56.03231 1.314203e-21 9.820364e-21
"POU5F1" %in% rownames(tops0.common)
[1] TRUE
"NANOG" %in% rownames(tops0.common)
[1] TRUE
#upsetr plot showing overlaps in DE genes between cluster 0 and all other clusters
c0v1<- as.vector(rownames(dt[which(dt[,1] != 0),]))
c0v2<-as.vector(rownames(dt[which(dt[,2] != 0),]))
c0v3<-as.vector(rownames(dt[which(dt[,3] != 0),]))
c0v4<-as.vector(rownames(dt[which(dt[,4] != 0),]))
c0v5<-as.vector(rownames(dt[which(dt[,5] != 0),]))
c0v6<-as.vector(rownames(dt[which(dt[,6] != 0),]))
c0v7<-as.vector(rownames(dt[which(dt[,7] != 0),]))
c0v8<-as.vector(rownames(dt[which(dt[,8] != 0),]))
c0v9<-as.vector(rownames(dt[which(dt[,9] != 0),]))

List.0<- list(c0vc1=c0v1,c0vc2=c0v2,c0vc3=c0v3,c0vc4=c0v4,c0vc5=c0v5,c0vc6=c0v6,c0vc7=c0v7,c0vc8=c0v8,c0vc9=c0v9)

#List.0<- list(dt[,1:9])
upset(fromList(List.0), nsets = 9)

1 v all contrasts

fit<- lmFit(v,design)
contrasts<- NULL
for (i in 1:nclust){
    c<- c(rep(-1,nclust),0,0,0,0)
    c[i]<- nclust-1
    
    contrasts<- cbind(contrasts, c)
}
contrasts
       c  c  c  c  c  c  c
 [1,]  6 -1 -1 -1 -1 -1 -1
 [2,] -1  6 -1 -1 -1 -1 -1
 [3,] -1 -1  6 -1 -1 -1 -1
 [4,] -1 -1 -1  6 -1 -1 -1
 [5,] -1 -1 -1 -1  6 -1 -1
 [6,] -1 -1 -1 -1 -1  6 -1
 [7,] -1 -1 -1 -1 -1 -1  6
 [8,]  0  0  0  0  0  0  0
 [9,]  0  0  0  0  0  0  0
[10,]  0  0  0  0  0  0  0
[11,]  0  0  0  0  0  0  0
fit<- contrasts.fit(fit, contrasts= contrasts)
efit<- eBayes(fit)
plotSA(efit)

c0vall<- topTable(efit, coef=1, n=nrow(fit))

head(c0vall, n=40)
              logFC   AveExpr         t      P.Value    adj.P.Val        B
TTC3     -27.577990  7.213926 -33.03441 7.502936e-38 7.641740e-34 71.58323
ASXL1    -12.600599  5.423634 -26.39076 8.011183e-33 4.079695e-29 60.73509
BCL7C    -12.415042  6.107591 -25.55948 4.062625e-32 1.194063e-28 60.46400
CST3     -18.385421  7.795340 -24.51773 3.314379e-31 6.751390e-28 59.67992
MAGED2   -11.892399  8.065005 -23.17049 5.604485e-30 7.135209e-27 57.42178
PHC2     -27.285655  5.434183 -25.48709 4.689497e-32 1.194063e-28 57.26356
TERF1     16.081036  7.578498  22.73501 1.439039e-29 1.221384e-26 56.63456
N4BP2L2   -6.602763  7.030785 -22.96675 8.696564e-30 9.841612e-27 56.58471
FAM89B   -17.973680  5.685971 -23.74819 1.640065e-30 2.386295e-27 56.27116
TCF25     -7.605582  7.069119 -22.76051 1.361195e-29 1.221384e-26 56.19843
ZNF428   -16.865533  7.151197 -22.40509 2.968995e-29 2.159944e-26 55.21821
VIM      -21.799711 10.234124 -21.90020 9.146643e-29 5.419027e-26 55.13542
DDX17     -6.006953  8.026253 -21.91529 8.841506e-29 5.419027e-26 54.88433
VPS28     -9.054529  7.137609 -21.87976 9.577072e-29 5.419027e-26 54.41352
MXD4     -14.985027  6.260003 -21.99581 7.379584e-29 5.010737e-26 53.73964
ADD1      -6.483498  5.894285 -21.53194 2.105681e-28 9.188987e-26 52.98095
NAA38     -8.727147  6.877280 -21.16266 4.914516e-28 1.787655e-25 52.74264
EFNB2    -21.619587  6.072235 -21.70457 1.422415e-28 7.239391e-26 52.74131
YAF2     -22.680261  4.129871 -23.87002 1.269640e-30 2.155214e-27 52.73104
FRMD4A   -14.442369  4.560023 -22.56036 2.109197e-29 1.652474e-26 52.58378
C5orf24  -11.871752  5.610553 -21.59132 1.839332e-28 8.515270e-26 52.52431
CIRBP     -9.638583  8.336993 -20.68679 1.490531e-27 4.337445e-25 52.21730
TMEM132A -14.904199  5.549007 -21.51969 2.165299e-28 9.188987e-26 52.13800
ARL2BP   -10.948403  5.960584 -21.19098 4.603338e-28 1.736481e-25 52.09586
RDX      -10.029886  7.663631 -20.68748 1.488133e-27 4.337445e-25 52.00903
NRIP1    -18.338440  5.045814 -21.82277 1.088920e-28 5.837185e-26 51.91901
PLAGL1   -22.403436  4.292829 -22.86631 1.081256e-29 1.101259e-26 51.53936
CCDC50   -11.731418  5.837919 -20.88818 9.297636e-28 3.156547e-25 51.32637
H2AFY    -17.341738  7.668655 -20.43437 2.706832e-27 7.068995e-25 51.30182
COMMD3   -15.152130  4.627146 -21.68330 1.492658e-28 7.239391e-26 51.00580
PRTG     -34.091343  5.971539 -21.44859 2.547047e-28 1.037667e-25 50.99613
SEPHS1    12.266419  7.332304  20.10262 5.981200e-27 1.428958e-24 50.82337
MSRB2     -8.951263  6.636048 -20.28261 3.885335e-27 9.651740e-25 50.68947
IDH2     -16.395862  6.637623 -20.36733 3.174616e-27 8.083365e-25 50.64952
PGLS      -6.059248  7.601152 -19.97400 8.155653e-27 1.767347e-24 50.44106
TCAF1    -17.503481  5.041447 -21.03158 6.658343e-28 2.338456e-25 50.36320
UGP2      13.580714  7.393647  19.89353 9.909455e-27 2.018556e-24 50.32348
HP1BP3   -10.514628  6.668708 -20.09904 6.032912e-27 1.428958e-24 50.26390
MARCKS   -18.093872  9.016948 -19.80646 1.224255e-26 2.444909e-24 50.22220
NSD3      -9.257932  6.823146 -19.92764 9.123392e-27 1.896362e-24 49.97306
summary(decideTests(efit))
          c    c    c    c    c    c    c
Down   3752 3137 2544 2616 3172 3683 1902
NotSig 2211 3557 5124 4972 3989 3248 6232
Up     4222 3491 2517 2597 3024 3254 2051
up.0<- which(c0vall$adj.P.Val < 0.05 & c0vall$logFC >0)

length(up.0)
[1] 4222
head(c0vall[up.0,], n=40)
            logFC  AveExpr        t      P.Value    adj.P.Val        B
TERF1   16.081036 7.578498 22.73501 1.439039e-29 1.221384e-26 56.63456
SEPHS1  12.266419 7.332304 20.10262 5.981200e-27 1.428958e-24 50.82337
UGP2    13.580714 7.393647 19.89353 9.909455e-27 2.018556e-24 50.32348
DPPA4   13.747355 7.137063 19.76765 1.345549e-26 2.585738e-24 49.94979
JARID2  10.294303 6.547235 19.44684 2.953992e-26 5.014401e-24 48.99389
PHC1    14.313711 3.639425 20.85504 1.004599e-27 3.300594e-25 48.97870
USO1     8.278334 6.282203 19.33787 3.866947e-26 6.251565e-24 48.63691
TBC1D23 10.881343 4.673767 19.70660 1.561576e-26 2.891756e-24 48.26631
LRRC47   6.419652 5.387962 18.76872 1.608413e-25 2.073631e-23 46.79981
ZNF398  13.298276 3.653416 19.25535 4.745369e-26 7.551811e-24 45.99546
FKBP4    7.614425 7.592202 17.99633 1.171990e-24 1.193672e-22 45.75787
TKT      6.151095 9.112727 17.66536 2.796986e-24 2.498886e-22 45.03825
HAGHL   14.787900 4.273916 18.26502 5.832943e-25 6.457448e-23 44.66419
VSIG10  16.180772 4.340578 18.23523 6.299826e-25 6.899326e-23 44.61177
RBPJ     5.613182 7.153192 17.31340 7.144051e-24 5.774774e-22 43.89780
SKA3    13.676630 4.590506 17.55426 3.755105e-24 3.241165e-22 43.33384
MIB2     8.593087 4.851255 17.41485 5.444658e-24 4.582962e-22 43.19837
DNMT3B  17.309703 6.461688 17.03466 1.515644e-23 1.104834e-21 43.06287
DDX21    7.653578 7.100406 16.89228 2.232917e-23 1.557689e-21 42.80322
PDCD2L   9.330080 4.223995 17.30736 7.260865e-24 5.774919e-22 42.36584
VASH2   17.902965 4.588320 16.79080 2.947246e-23 1.987927e-21 41.39904
ADD2    11.771797 4.166766 16.92599 2.036793e-23 1.440607e-21 41.38411
INTS13   7.949672 4.659950 16.66541 4.159402e-23 2.698313e-21 41.22785
FNDC10   9.203042 3.830290 16.86412 2.411462e-23 1.659510e-21 41.05917
ZNF589  10.620433 3.631530 16.77040 3.116767e-23 2.074251e-21 40.48451
ETV4    19.166876 4.218631 16.40429 8.571677e-23 5.017387e-21 40.27313
FRAT2   13.110930 5.295428 16.13289 1.832472e-22 9.620476e-21 40.25681
CYCS     6.758110 8.499625 15.87657 3.784758e-22 1.826343e-20 40.17016
MAD2L2   8.414309 7.078103 15.76691 5.173945e-22 2.395301e-20 39.75864
TOMM7    7.527693 8.939071 15.69145 6.421164e-22 2.893785e-20 39.65924
PSMG4    6.819823 4.947974 15.91168 3.425297e-22 1.692692e-20 39.43145
TLCD1   14.774674 3.433076 16.46275 7.285782e-23 4.314284e-21 39.38515
POLR3G  22.864011 4.119681 15.97227 2.884359e-22 1.440432e-20 39.08744
MAL2    19.822159 3.837282 16.27068 1.244669e-22 7.003844e-21 38.99007
ATP5PD   5.781917 8.188874 15.45405 1.272274e-21 5.376808e-20 38.96505
TDGF1   22.213829 6.271011 15.50264 1.105521e-21 4.771074e-20 38.85369
ZSCAN2  11.053262 3.785062 15.97217 2.885107e-22 1.440432e-20 38.69981
ZNF90    9.415134 4.781361 15.65464 7.136395e-22 3.173982e-20 38.63426
FGF2    15.592319 4.347030 15.71340 6.029853e-22 2.741248e-20 38.44487
ZNF770   7.097085 6.062098 15.37988 1.577470e-21 6.325407e-20 38.44180
vol<- topTable(efit, coef=1, n=nrow(fit))
labsig<- vol[(vol$adj.P.Val < 5e-28) | (vol$logFC> 0 & vol$adj.P.Val < 5e-25) |vol$logFC> 32 |vol$logFC < -35,]
labsiggenes<- rownames(labsig)
thresh<- vol$adj.P.Val < 0.05
vol<-cbind(vol, thresh)
ggplot(vol, aes(x=logFC, y= -log10(adj.P.Val))) +
  geom_point(aes(colour=thresh), show.legend = FALSE) +
  scale_colour_manual(values = c("TRUE" = "red", "FALSE" = "black")) +
  geom_text(data=labsig, aes(label=labsiggenes))

c1vall<- topTable(efit, coef=2, n=nrow(fit))

head(c1vall, n=40)
             logFC   AveExpr         t      P.Value    adj.P.Val        B
TPBG     22.101800  5.718580  25.65465 3.365897e-32 3.428166e-28 61.45532
FGFBP3   19.934064  4.738138  24.43626 3.917992e-31 1.995237e-27 58.27076
FZD3     12.751362  6.088419  23.44222 3.134444e-30 7.981077e-27 57.38200
RUNX1T1 -21.936842  4.583494 -24.16659 6.839176e-31 2.321900e-27 55.93510
LIX1     22.457451  4.120840  19.95297 8.581129e-27 1.456647e-23 48.35581
PLAGL1   12.010326  4.292829  19.45351 2.905798e-26 3.288395e-23 48.32236
DEK       6.350184  8.394821  18.90102 1.151543e-25 1.172847e-22 48.17003
DACH1    17.253507  3.809426  19.71155 1.542837e-26 1.964224e-23 48.11494
SDK2     15.087592  3.438961  20.02142 7.273184e-27 1.456647e-23 47.31320
S100A10 -20.446352  9.208456 -18.46999 3.442476e-25 2.697048e-22 47.08324
ZNF219    8.841571  5.224911  18.79642 1.499533e-25 1.388432e-22 47.02358
WLS      13.119184  5.516756  18.58097 2.592072e-25 2.200021e-22 46.90958
SOX2     15.380397  7.079785  18.21840 6.580037e-25 4.188605e-22 46.19610
PHLDA1  -20.043491  5.389407 -18.39465 4.176733e-25 3.038573e-22 45.59212
BTBD17   22.234310  2.561903  19.83256 1.148984e-26 1.671772e-23 45.12275
KALRN   -11.624326  3.744429 -18.23114 6.366739e-25 4.188605e-22 44.15741
CRB2     16.785551  3.443880  18.03772 1.052028e-24 6.302887e-22 43.51480
METRN    11.192753  7.096879  16.85927 2.443614e-23 1.244411e-20 42.77735
NUCKS1    4.380327 10.053209  16.75721 3.231568e-23 1.496069e-20 42.61695
MMP15   -10.687066  4.142716 -17.19833 9.735335e-24 5.218652e-21 42.30404
GLI3     14.209729  4.907882  16.60387 4.928779e-23 2.091651e-20 41.44667
MMRN1    17.981186  2.099102  17.80638 1.928033e-24 1.090946e-21 41.12482
ANP32E    5.032155  8.075231  15.90776 3.463635e-22 1.175904e-19 40.26148
GINS2     7.750517  6.170958  15.96673 2.929923e-22 1.065759e-19 40.24504
RNF175   16.557374  3.530654  16.37330 9.344580e-23 3.806982e-20 39.40595
SOX3     27.530583  2.974193  16.82437 2.688334e-23 1.303842e-20 39.12236
TLE4     13.089684  5.786874  15.37683 1.591517e-21 4.631315e-19 38.45262
DPYSL5   19.134970  2.620642  16.60591 4.901171e-23 2.091651e-20 38.37753
NR2F1    17.845406  5.113486  15.41332 1.431605e-21 4.288500e-19 38.23440
POLD3     6.610797  5.268455  15.31941 1.880603e-21 5.320540e-19 38.19756
POLD2     4.658573  6.727042  15.20406 2.632987e-21 7.057099e-19 38.18097
HES4     12.668030  6.259862  15.13171 3.254429e-21 8.039797e-19 37.96756
CDON     12.508958  3.198887  15.91155 3.426525e-22 1.175904e-19 37.96214
MAPK10   13.372408  4.251468  15.43393 1.348616e-21 4.162321e-19 37.87271
CDH2     13.022568  6.170357  15.10997 3.468836e-21 8.163710e-19 37.81627
BOC      14.524705  3.646838  15.49530 1.129204e-21 3.594045e-19 37.69272
H1FX      5.654379  8.583590  14.96123 5.375262e-21 1.216601e-18 37.54922
ELOVL1   -8.840217  4.741981 -15.13036 3.267363e-21 8.039797e-19 37.35612
DOK4    -13.177945  4.008562 -15.17019 2.907366e-21 7.592698e-19 36.92994
ILDR2    19.790009  1.999447  16.08294 2.109390e-22 7.957089e-20 36.81883
c2vall<- topTable(efit, coef=3, n=nrow(fit))

head(c2vall, n=40)
              logFC   AveExpr        t      P.Value    adj.P.Val        B
TNNI1      40.70212 2.7228493 40.82299 1.081978e-42 1.101995e-38 70.50955
TMEM88     33.69564 4.8364459 28.95391 6.982264e-35 1.185239e-31 66.23925
COL5A1     25.90639 3.3745876 29.76865 1.669845e-35 5.669123e-32 64.26380
ACTA2      32.29965 3.5890806 29.27456 3.959548e-35 8.065599e-32 63.36468
DOK4       22.03021 4.0085622 28.02692 3.714517e-34 5.404622e-31 63.04533
COL6A3     39.84215 2.1126229 33.14146 6.336918e-38 3.227076e-34 62.26711
COL6A2     23.55907 5.6163531 25.66821 3.277045e-32 3.034245e-29 61.59429
COL3A1     43.51845 4.0150207 25.95085 1.881227e-32 1.916029e-29 60.80590
RGS4       34.80188 2.0793145 29.59594 2.254861e-35 5.741440e-32 58.74099
SLC9A3R1   21.91053 5.6035053 23.88670 1.226031e-30 7.345365e-28 57.83929
PCOLCE     26.17836 4.1215745 24.66241 2.465338e-31 1.931498e-28 57.36847
COL6A1     17.30678 6.2672488 22.75576 1.375353e-29 6.090423e-27 56.28398
LIX1       27.20448 4.1208395 24.04619 8.785181e-31 5.592317e-28 56.14164
PKP2       21.37326 4.0327937 24.51147 3.357222e-31 2.442379e-28 56.14085
CYB5D1     24.74627 2.9393467 25.54047 4.218477e-32 3.580432e-29 55.93821
PARVA      10.72248 4.7540148 23.22540 4.981299e-30 2.709944e-27 55.88896
CDH11      22.05367 4.3415742 23.21852 5.055370e-30 2.709944e-27 55.67428
MFAP4      31.80278 3.0790634 24.35705 4.612005e-31 3.131551e-28 54.62730
SIPA1L2    17.77420 5.1211097 22.04047 6.677321e-29 2.518834e-26 54.19347
SLC40A1    33.83430 1.6515464 27.10250 2.065104e-33 2.629135e-30 53.80100
IL6ST      15.79988 4.2065868 22.08566 6.035637e-29 2.364345e-26 53.37473
ADAMTS9    24.43687 3.2941860 22.57692 2.033881e-29 8.631282e-27 53.01510
KCTD12     26.12105 2.9600572 22.84463 1.133397e-29 5.247112e-27 52.58597
MMP2       17.44437 4.5727593 21.42398 2.694549e-28 8.316359e-26 52.50543
NID2       31.69763 2.5954720 23.12880 6.130034e-30 2.973066e-27 52.37082
HAND1      45.21544 3.0694362 22.40851 2.946668e-29 1.200473e-26 52.32234
KRT19      21.25244 7.6277865 20.60746 1.796873e-27 4.357418e-25 52.03265
HAND2      39.85881 0.7517947 26.39914 7.882933e-33 8.920852e-30 49.98338
BAMBI      20.74585 5.5592107 19.65429 1.774581e-26 3.614822e-24 49.39029
WNT5A      22.53489 2.9577383 20.68730 1.488763e-27 3.790763e-25 48.44260
PRRX1      35.94369 2.1476154 21.07962 5.956042e-28 1.685064e-25 48.06460
ST6GALNAC3 15.15410 3.2022024 20.40967 2.870408e-27 6.798861e-25 47.81639
RGS5       24.04455 4.7808114 19.01821 8.577366e-26 1.432139e-23 47.69149
LEF1       14.42013 3.9269779 19.36670 3.600671e-26 7.052468e-24 47.59629
ADAMTS1    15.94466 3.3625283 19.77366 1.325991e-26 2.756167e-24 47.28734
PDGFRB     23.09537 1.9758235 21.11377 5.502992e-28 1.601371e-25 47.08036
WIPF1      15.04493 3.0135050 19.82846 1.160503e-26 2.514835e-24 46.95906
PMP22      17.87131 3.7248274 19.09079 7.151871e-26 1.255893e-23 46.70140
LUM        47.08760 3.3323636 19.27471 4.522643e-26 8.375113e-24 46.52270
MSRB3      20.40214 1.6928324 21.39009 2.912003e-28 8.723162e-26 46.27155
c3vall<- topTable(efit, coef=4, n=nrow(fit))

head(c3vall, n=40)
            logFC  AveExpr        t      P.Value    adj.P.Val        B
NR2F1   27.259897 5.113486 22.84719 1.127126e-29 1.147978e-25 55.09757
CNP     12.436813 5.491823 20.54441 2.085419e-27 8.231646e-24 50.74612
FGFBP3  17.781302 4.738138 20.06111 6.609706e-27 1.346397e-23 49.32649
DNAJC1  13.566884 5.886947 19.05404 7.840743e-26 1.140828e-22 47.76852
ATP1A2  23.594471 3.785417 19.83360 1.146095e-26 1.945497e-23 47.21788
ZEB2    19.087833 4.710630 18.97829 9.481171e-26 1.207072e-22 46.97331
METRN   13.448468 7.096879 18.02418 1.089827e-24 1.109988e-21 45.66109
S100B   34.071411 1.899250 20.48076 2.424638e-27 8.231646e-24 44.88785
EDNRA   28.715723 1.937977 20.25544 4.146051e-27 1.055688e-23 44.62876
LMO4    13.409311 6.906923 17.59454 3.374245e-24 2.863890e-21 44.49439
PLEKHA4 15.892794 3.941248 16.66216 4.196826e-23 2.722695e-20 40.18253
NPR3    31.665173 2.001425 17.20553 9.548103e-24 7.480572e-21 39.43758
PHACTR3 29.133146 1.582047 18.16991 7.460755e-25 8.443088e-22 39.40007
PRELP   28.016345 1.397240 17.82957 1.813990e-24 1.679590e-21 38.58424
HDDC2    7.808879 7.067837 15.30764 1.946182e-21 8.259109e-19 38.39282
LSAMP   15.258975 4.274772 15.33662 1.788758e-21 7.921088e-19 37.51913
NRIP1   10.980717 5.045814 15.13992 3.176965e-21 1.244515e-18 37.36601
ERBB3   26.063915 3.772975 15.53613 1.003641e-21 4.646399e-19 37.35704
RFTN2   15.629228 2.333311 16.09497 2.039044e-22 1.221627e-19 37.11441
SOX10   35.357216 1.445070 16.73496 3.435181e-23 2.499094e-20 36.85874
MOXD1   31.301026 1.630318 16.65528 4.277184e-23 2.722695e-20 36.59608
MPZ     37.989571 2.185961 15.74695 5.477763e-22 2.789551e-19 36.23134
CUEDC2   8.812910 6.739784 14.55156 1.821170e-20 5.796443e-18 36.20308
ADAMTS4 16.080498 2.185148 15.80840 4.596037e-22 2.463718e-19 35.86527
SDK2    12.408714 3.438961 15.08119 3.774783e-21 1.423932e-18 35.77713
SMOC1   23.609160 2.764959 15.25646 2.259319e-21 9.204465e-19 35.55062
RNF165  14.605165 3.395552 14.85101 7.449088e-21 2.528965e-18 35.35444
SCRG1   32.287827 2.756581 14.97339 5.185653e-21 1.821237e-18 35.23881
RHOB     9.618255 6.099518 14.10621 7.025470e-20 2.097178e-17 34.81597
CDH6    21.729757 4.433859 14.09788 7.206797e-20 2.097178e-17 34.27559
CMTM5   19.554999 1.322153 15.83496 4.260839e-22 2.410925e-19 34.20197
ADSS     7.531949 6.431948 13.91046 1.281740e-19 3.626255e-17 34.19718
SOX5    15.152791 3.722675 14.23530 4.738359e-20 1.462430e-17 34.14772
KANK4   26.484723 2.501823 14.58598 1.642395e-20 5.396061e-18 33.78969
ASXL1    6.095035 5.423634 13.67716 2.640877e-19 7.269550e-17 33.29193
ITGA4   26.867650 1.080979 15.58144 8.807960e-22 4.271861e-19 32.84077
UBXN2A   5.564068 5.249474 13.47126 5.027079e-19 1.347389e-16 32.57378
COL2A1  15.960632 5.349475 13.37149 6.880597e-19 1.796894e-16 32.40181
FUNDC2   5.210381 6.720313 12.97442 2.429925e-18 5.499730e-16 31.41366
FZD3     8.129218 6.088419 12.92457 2.851092e-18 6.178377e-16 31.15240
c4vall<- topTable(efit, coef=5, n=nrow(fit))

head(c4vall, n=40)
             logFC  AveExpr        t      P.Value    adj.P.Val        B
S100A16  27.080627 4.866912 27.36428 1.264020e-33 1.287405e-29 63.08509
CST3     14.942772 7.795340 25.47559 4.797783e-32 1.221635e-28 62.22486
KRT19    24.227074 7.627787 23.64002 2.060481e-30 4.197200e-27 58.49467
LGALS3   38.931399 3.708124 26.60588 5.300631e-33 1.799564e-29 58.28405
GATA3    28.257190 2.729964 26.71297 4.320131e-33 1.799564e-29 57.05943
FN1      25.545354 6.483732 21.57219 1.921207e-28 3.261249e-25 54.03110
MGST2    17.991057 4.874313 20.15560 5.266298e-27 4.876113e-24 49.94709
S100A10  18.776220 9.208456 19.56199 2.225056e-26 1.743246e-23 49.84590
DYNLT3   11.823213 4.429137 20.40886 2.875933e-27 3.254597e-24 49.58531
HDHD3    14.391718 3.937994 20.45588 2.572042e-27 3.254597e-24 48.83829
B4GALT1  13.975120 4.286524 19.77059 1.335956e-26 1.133893e-23 48.27729
PKP2     17.912688 4.032794 20.23659 4.337290e-27 4.417530e-24 48.27183
DSP      19.933232 6.193595 18.88281 1.205599e-25 6.821678e-23 47.66443
ACAA1    10.884221 4.937621 18.81365 1.435604e-25 7.695592e-23 46.69846
ANXA3    27.349190 3.958828 19.41961 3.159261e-26 2.013562e-23 46.41686
BCAM     14.764030 4.901107 18.58850 2.542742e-25 1.294891e-22 46.18236
PTGR1    12.793966 6.906708 18.18455 7.182952e-25 3.483732e-22 46.12791
SPINT2   13.341676 7.667458 18.00630 1.141883e-24 5.056556e-22 45.74786
ATP1A1    7.008755 6.677654 17.78639 2.032202e-24 7.665918e-22 44.99305
C12orf75 13.308721 5.519731 17.98375 1.211125e-24 5.139710e-22 44.93519
LYPD6B   22.957248 2.444422 19.51791 2.479643e-26 1.803940e-23 44.61536
KRT8     17.246164 8.333419 17.39495 5.742068e-24 1.840958e-21 44.29065
EPSTI1   36.019508 1.661485 20.99559 7.239140e-28 1.053295e-24 44.24209
STARD10  15.066063 4.457784 17.68847 2.631140e-24 9.570771e-22 43.63256
WFDC2    20.211786 5.987506 17.39223 5.784060e-24 1.840958e-21 43.47320
COL18A1  13.226814 6.099623 17.08565 1.319995e-23 3.841186e-21 43.17723
SMAGP    20.018105 3.310236 17.90978 1.469687e-24 5.987504e-22 42.85857
LAMA1    16.993142 4.218577 17.30335 7.339346e-24 2.265189e-21 42.30523
MPC2      8.990799 7.303518 16.52722 6.092724e-23 1.513522e-20 41.85776
CAMK2D   13.126956 4.828020 16.87222 2.358635e-23 6.492622e-21 41.81023
FREM2    17.644108 3.314543 17.62590 3.104999e-24 1.054147e-21 41.80537
CEBPA    24.897862 1.767795 19.07916 7.362938e-26 4.411266e-23 41.47196
S100A14  46.606615 1.798091 19.41911 3.163181e-26 2.013562e-23 41.28707
AMOT     15.355215 3.625547 16.98462 1.736344e-23 4.912406e-21 41.20077
NFE2L2    7.379952 5.323262 16.50202 6.533384e-23 1.584346e-20 41.17583
SPINT1   21.661490 4.268353 16.80332 2.847831e-23 7.632936e-21 40.89153
AHNAK    20.204225 4.421089 16.41992 8.206873e-23 1.857489e-20 40.78613
ANXA4    16.553834 3.837055 16.65474 4.283459e-23 1.090676e-20 40.43755
PCBD1    14.108516 6.534839 16.01753 2.537481e-22 4.970047e-20 40.35659
MYOF     25.554015 2.071093 17.81479 1.885888e-24 7.387602e-22 40.32981
c5vall<- topTable(efit, coef=6, n=nrow(fit))

head(c5vall, n=40)
           logFC  AveExpr        t      P.Value    adj.P.Val        B
TAGLN3  39.27827 3.789455 36.91588 2.211015e-40 2.251919e-36 70.92052
RTN1    36.01647 3.277588 36.13899 6.774968e-40 3.450153e-36 68.74791
MLLT11  20.89371 7.328851 28.83936 8.562225e-35 8.720627e-32 67.96028
PCBP4   22.31930 5.195819 30.12132 9.086148e-36 1.322035e-32 67.77555
STMN2   46.66226 4.359924 31.34054 1.162611e-36 2.499848e-33 67.23802
ELAVL2  29.44406 3.476656 31.30791 1.227221e-36 2.499848e-33 64.19872
ELAVL4  36.55510 3.163252 29.94288 1.235271e-35 1.572655e-32 63.08840
KLC1    11.06287 5.725723 26.00295 1.699252e-32 1.018052e-29 61.67888
BASP1   16.82605 8.299298 24.78377 1.925540e-31 6.762629e-29 60.99429
MAP1B   19.80586 8.655748 24.61743 2.702512e-31 9.175029e-29 60.82784
HES6    25.84775 6.033686 25.19891 8.331461e-32 3.689388e-29 60.54604
ACAP3   17.63769 3.784109 26.99525 2.528159e-33 1.839236e-30 60.14522
NHLH1   49.39919 1.853023 35.08292 3.218412e-39 1.092651e-35 59.99047
DCX     36.36060 3.182446 29.70821 1.854585e-35 2.098772e-32 59.34817
PPP1R1A 22.18553 4.854119 25.73511 2.872238e-32 1.539670e-29 59.24161
TUBA1A  20.19511 9.700915 23.66903 1.937973e-30 5.194278e-28 59.07819
GDI1    12.10738 5.553161 24.49601 3.465450e-31 1.138568e-28 58.85907
OLFM1   31.47044 3.200861 27.92111 4.509037e-34 3.827045e-31 58.79719
FNDC5   30.00669 2.213297 30.97722 2.129275e-36 3.614444e-33 58.65621
CDKN2D  20.10065 3.777317 25.26904 7.240447e-32 3.351998e-29 57.64370
CRMP1   24.21700 4.946283 23.80231 1.463591e-30 4.028832e-28 56.96594
DLL3    23.50378 4.195074 24.00489 9.575414e-31 2.868400e-28 56.32955
KLHL35  34.76979 1.911985 27.95029 4.274084e-34 3.827045e-31 55.55411
GNG3    32.81053 2.968788 25.53496 4.264855e-32 2.171878e-29 54.79885
BTBD17  28.18865 2.561903 25.11260 9.907062e-32 4.036137e-29 53.58640
RNF165  21.97121 3.395552 23.47306 2.935422e-30 7.665967e-28 53.56862
GADD45G 18.64181 4.708401 22.01092 7.133971e-29 1.513739e-26 53.47786
BCL7A   12.53809 5.004675 21.80622 1.130333e-28 2.257342e-26 53.04609
TERF2IP 13.98878 6.062423 21.25503 3.971313e-28 6.973762e-26 52.90267
GPC2    15.62513 4.981706 21.59537 1.822503e-28 3.437444e-26 52.71414
NHLH2   28.21825 1.920786 26.25848 1.034235e-32 7.022456e-30 52.46803
INA     32.41813 3.051580 23.80835 1.445128e-30 4.028832e-28 52.03332
SCG3    28.80869 3.886964 22.11342 5.672946e-29 1.256064e-26 51.44738
CADM3   24.69370 2.273654 24.01672 9.341917e-31 2.868400e-28 51.29941
MAP1A   21.25699 4.080536 21.49502 2.290668e-28 4.241901e-26 50.86803
PHF21B  18.89498 3.066879 22.68879 1.591899e-29 3.684885e-27 50.76081
BRSK2   22.22791 2.683183 23.29822 4.261881e-30 1.058714e-27 50.55647
L1CAM   23.17027 2.462770 23.17140 5.593453e-30 1.356412e-27 50.30607
ZBTB20  16.53605 3.853132 20.97404 7.611319e-28 1.292021e-25 50.29049
CNTN2   35.07210 1.547870 25.37668 5.840792e-32 2.832784e-29 50.28118
c6vall<- topTable(efit, coef=7, n=nrow(fit))

head(c6vall, n=40)
             logFC   AveExpr        t      P.Value    adj.P.Val        B
EGFL7    27.935828 5.8780322 41.89393 2.735599e-43 2.786208e-39 80.53473
GNG11    36.280582 5.1706361 34.96649 3.831685e-39 1.074681e-35 73.40601
RAMP2    31.610475 5.1932897 35.20625 2.677035e-39 1.074681e-35 72.76896
IGFBP4   27.086680 4.9010287 34.90211 4.220644e-39 1.074681e-35 71.11308
S100A16  32.245851 4.8669123 27.45909 1.059188e-33 8.298328e-31 61.69936
S100A4   24.943083 6.3252678 25.39660 5.613631e-32 2.598856e-29 60.36321
PPM1F    20.623640 3.5752285 30.03755 1.049324e-35 2.137472e-32 58.90080
CCDC85B  13.676949 6.9139066 24.59261 2.843196e-31 1.072517e-28 58.67505
MAP4K2   21.197349 3.3771246 28.76027 9.861217e-35 1.255456e-31 56.48165
KDR      41.415348 3.2418243 26.43943 7.294636e-33 4.370345e-30 55.42011
DOCK6    23.057354 3.1436171 27.72007 6.528440e-34 6.649216e-31 55.11032
PLXND1   29.363815 2.9192194 27.49950 9.824661e-34 8.298328e-31 55.08149
SLC9A3R2 23.540806 4.3409448 23.82427 1.397586e-30 4.313457e-28 54.20405
RALB     16.914324 4.7312516 23.86447 1.284522e-30 4.088391e-28 53.77659
MAST4    22.773947 3.3625695 25.78205 2.618960e-32 1.270195e-29 53.61937
TIMP3    27.052457 4.0709583 22.85844 1.099883e-29 2.732271e-27 52.94415
RGL1     20.835340 3.0819442 24.99454 1.256608e-31 5.332729e-29 51.81292
SPTBN1   16.346511 6.5896602 20.62004 1.744319e-27 2.960981e-25 50.79827
LIMS1    13.068649 6.1960830 20.87661 9.552215e-28 1.737309e-25 50.66937
FLT1     40.731797 2.8799215 22.93230 9.370305e-30 2.385914e-27 49.76982
PMP22    25.706666 3.7248274 21.56229 1.964989e-28 4.002682e-26 49.68797
LDB2     25.277510 4.0010548 21.32516 3.379794e-28 6.749647e-26 49.22420
TMEM255B 28.648616 1.9343944 26.57145 5.661778e-33 3.604075e-30 48.49353
JCAD     31.714567 2.0172058 24.39303 4.282439e-31 1.504022e-28 48.19190
IFI16    30.122255 4.6247185 19.60301 2.012033e-26 2.661371e-24 47.72291
ADAM15   20.451034 3.5760753 21.17113 4.819338e-28 9.261313e-26 47.67574
CPNE2    18.756595 4.2381291 20.16864 5.104074e-27 7.534057e-25 47.47991
RCSD1    45.680446 0.5769777 28.98220 6.639939e-35 9.661111e-32 47.44877
HOPX     51.070142 1.4882899 23.09900 6.536220e-30 1.751879e-27 47.27070
BCL6B    33.786968 1.2859310 26.98907 2.557842e-33 1.736775e-30 47.07730
SHANK3   23.620230 2.0559392 24.86990 1.616761e-31 6.333350e-29 46.98638
LYL1     41.845726 1.0664785 26.35787 8.535659e-33 4.829761e-30 46.71356
MSN      15.214456 6.0684067 18.89753 1.161707e-25 1.300218e-23 46.55920
KLF2     43.460135 2.1565324 21.83917 1.049397e-28 2.226689e-26 46.54210
RGS5     29.352348 4.7808114 18.83845 1.348397e-25 1.461002e-23 46.50183
TM4SF18  48.774491 0.8848746 27.37220 1.245457e-33 9.060700e-31 46.46727
SNX3      9.913782 7.9900052 18.47346 3.412005e-25 3.247782e-23 46.41573
AFAP1L1  37.626171 1.7753216 23.75956 1.601284e-30 4.796789e-28 46.03140
SOX7     40.967625 1.4044632 24.44126 3.877910e-31 1.410590e-28 45.65633
MEF2C    32.094321 2.4308036 20.70614 1.424227e-27 2.500991e-25 45.61710
#output results from each cluster
TopTable.EachCluster.OnevAll<- list(c0vall, c1vall, c2vall,c3vall,c4vall,c5vall,c6vall)

write.csv(TopTable.EachCluster.OnevAll, "/project2/gilad/katie/Pilot_HumanEBs/Embryoid_Body_Pilot_Workflowr/output/Pseudobulk_Limma_res0.1_OnevAllTopTables.csv")
#output table with top 5 upreg DE genes in each cluster by adjusted p
OnevAll.top10.adjP<- NULL
for(i in 1:nclust){
  c<- TopTable.EachCluster.OnevAll[[i]]
  top10<- c[c$logFC>0,]
  top10<- top10[order(top10$adj.P.Val),]
  top10<- rownames(top10)[1:10]
  OnevAll.top10.adjP<- cbind(OnevAll.top10.adjP, top10)
}
colnames(OnevAll.top10.adjP)<- as.character(0:(nclust-1))

write.csv(OnevAll.top10.adjP, "/project2/gilad/katie/Pilot_HumanEBs/Embryoid_Body_Pilot_Workflowr/output/Pseudobulk_Limma_res0.1_OnevAll_top10Upregby_adjP.csv")
#output table with top 5 upreg DE genes in each cluster by logFC
OnevAll.top10.logFC<- NULL
for(i in 1:nclust){
  c<- TopTable.EachCluster.OnevAll[[i]]
  top10<- c[order(c$logFC, decreasing = T),]
  top10<- rownames(top10)[1:10]
  OnevAll.top10.logFC<- cbind(OnevAll.top10.logFC, top10)
}
colnames(OnevAll.top10.logFC)<- as.character(0:(nclust-1))

write.csv(OnevAll.top10.logFC, "/project2/gilad/katie/Pilot_HumanEBs/Embryoid_Body_Pilot_Workflowr/output/Pseudobulk_Limma_res0.1_OnevAll_top10Upregby_logFC.csv")

batch + ind comparisons

fit<- lmFit(v,design)
fit<-contrasts.fit(fit, coefficients = (nclust+1):(nclust+4))
efit<- eBayes(fit)
plotSA(efit)

Version Author Date
0e51844 KLRhodes 2021-01-11
7888de8 KLRhodes 2020-08-31
topsBatch<- topTable(efit, coef=c(1:2),n=nrow(fit))

head(topsBatch, n=40)
           dge.samples.batchBatch2 dge.samples.batchBatch3   AveExpr        F
EEF1A1                  -1.4791738              -1.1167572  9.749261 684.4828
PPP1CB                   1.3016015               1.2975520  6.997330 421.2482
SF3A2                   -0.9947448              -1.4471413  5.267949 390.3477
LRRC75A                  2.1998212               1.4979476  5.947189 348.3474
CAPZA1                   1.0415420               1.0795632  6.761536 340.4220
NME2                    -1.6596490              -1.2434545  3.944569 330.5270
SMARCB1                 -1.5074928              -1.1727631  4.712074 293.5627
TBL1XR1                  1.0973611               1.2155075  6.220793 293.4778
GPBP1                    0.8362809               0.9114806  6.875262 291.4102
N4BP2L2                  0.7686978               0.8243599  7.030785 277.5289
CLIC1                   -2.0353258              -1.3288341  4.964395 274.0515
H3F3A                   -1.3347640              -0.9083080  6.258322 273.0554
AP001267.5              -2.3481522              -1.5381703  3.417069 269.5045
MIF                     -0.8688510              -0.5720611  8.660693 263.5818
TRA2A                    1.0237494               0.9581491  6.127337 238.0555
MRPL42                   0.8793849               1.0035707  7.229988 234.4949
SLC25A6                 -1.5132971              -1.3065878  4.648292 217.3173
RSL24D1                  0.7001932               0.7729428  7.682960 216.9857
TMEM167A                 0.6305888               0.8042721  7.370792 206.6786
EIF3E                    0.7964242               0.7201832  9.206035 206.4162
USP14                    0.5719998               0.7918276  6.914613 206.0501
LYPLA2                  -1.0497894              -1.0226395  4.933563 203.8434
C6orf62                  0.9171443               0.9140221  5.526238 203.7501
BZW1                     0.6007710               0.8522946  7.017364 200.4837
TMED2                    0.9137557               0.8730322  6.767068 200.3655
SYNC                     1.3436519               1.3901722  4.225984 198.5465
CMTM6                    0.7755768               0.8802948  6.703665 192.8530
ACTR2                    0.6239884               0.8535300  7.166270 191.7977
HSF1                    -0.6855173              -0.8774926  5.377362 189.7591
PSMA4                    0.5184325               0.7521368  8.449685 185.8011
YWHAG                    0.6880251               0.9595232  6.742297 184.0940
DNAJA2                   0.5636804               0.7819193  7.020326 182.4614
EIF4E                    1.0723537               0.8565844  5.618441 180.3326
EXOC5                    0.6868452               0.7515148  5.693740 179.7984
COPB1                    0.5412550               0.6692869  6.673308 176.2850
PRPF31                  -1.6305304              -1.0639102  3.137675 173.4246
PEF1                    -0.5756065              -0.6952513  5.665333 170.4290
MT-ND1                  -0.7758269              -0.8125726 11.379796 167.6785
MTX1                    -1.1698806              -0.9499482  4.538119 166.0297
MZT1                     0.7710912               0.8157323  6.249351 162.6154
                P.Value    adj.P.Val
EEF1A1     1.794281e-39 1.827475e-35
PPP1CB     5.555113e-34 2.828941e-30
SF3A2      3.921206e-33 1.331249e-29
LRRC75A    7.139153e-32 1.817807e-28
CAPZA1     1.279942e-31 2.607242e-28
NME2       2.700998e-31 4.584945e-28
SMARCB1    5.345146e-30 6.854543e-27
TBL1XR1    5.384030e-30 6.854543e-27
GPBP1      6.426789e-30 7.272983e-27
N4BP2L2    2.175001e-29 2.215239e-26
CLIC1      2.977627e-29 2.757012e-26
H3F3A      3.260149e-29 2.767051e-26
AP001267.5 4.514790e-29 3.537164e-26
MIF        7.839522e-29 5.703252e-26
TRA2A      9.689002e-28 6.578832e-25
MRPL42     1.402466e-27 8.927575e-25
SLC25A6    8.989789e-27 5.279190e-24
RSL24D1    9.329939e-27 5.279190e-24
TMEM167A   3.036585e-26 1.585285e-23
EIF3E      3.131314e-26 1.585285e-23
USP14      3.268629e-26 1.585285e-23
LYPLA2     4.239612e-26 1.898278e-23
C6orf62    4.286734e-26 1.898278e-23
BZW1       6.329875e-26 2.615694e-23
TMED2      6.420457e-26 2.615694e-23
SYNC       7.997097e-26 3.132709e-23
CMTM6      1.608711e-25 6.068417e-23
ACTR2      1.834841e-25 6.674233e-23
HSF1       2.369908e-25 8.323282e-23
PSMA4      3.922023e-25 1.331527e-22
YWHAG      4.887971e-25 1.605935e-22
DNAJA2     6.043629e-25 1.923574e-22
EIF4E      7.990344e-25 2.466111e-22
EXOC5      8.574077e-25 2.568440e-22
COPB1      1.369603e-24 3.985544e-22
PRPF31     2.017476e-24 5.707776e-22
PEF1       3.044789e-24 8.381399e-22
MT-ND1     4.467737e-24 1.197471e-21
MTX1       5.636908e-24 1.472100e-21
MZT1       9.180328e-24 2.337541e-21
topsInd<- topTable(efit, coef=c(3:4),n=nrow(fit))

head(topsInd, n=40)
        dge.samples.indNA18858 dge.samples.indNA19160    AveExpr         F
TYW3                0.25900494          -5.5786091185  3.9153379 1289.7631
CRYZ                0.26953668          -5.0114953983  2.5630224  493.1262
EIF1AY              0.08536481           7.2729620097  2.1264870  488.0851
TRIM61              1.95841374          -4.6331041121  0.5692649  413.6447
CAT                -0.76816953          -5.3323629470  2.5536514  391.0041
THOC3              -0.04410403          -1.5652975910  4.2625854  311.3598
USP51              -4.92885108          -0.0084824783  2.9998932  274.8907
RNF187             -1.14008040          -0.0377434330  7.1200184  274.2047
HCCS                1.21423618          -0.0187454376  5.1492210  265.6899
UBLCP1              0.36983263          -0.8610092760  5.3901002  261.1132
DDX3Y               0.63592287           6.8417320935  1.7912693  254.0598
MRPS21             -0.82809392           0.0116661758  8.5068062  251.8755
NXT2                1.42061031          -0.0359131846  3.3454497  242.1401
NDUFS2             -1.10424148          -0.1363851583  7.4857218  238.3313
RAB4A              -1.06601365           0.1243146623  6.9336206  232.1540
RRAGB              -3.69511078           0.0673397110  2.8059766  231.1645
PRRC2C             -0.76791553          -0.0692917671  8.9804387  230.8144
IAH1                2.94603002           3.5084157207  4.7423190  229.3740
HAX1               -0.73716863           0.1521285583  7.0031109  228.5330
TAF9B              -0.16815868          -3.4231593635  3.0872820  219.3648
UBA1                0.19050176          -0.8314916148  6.7972613  218.7919
LLGL1              -1.32491454          -1.3623149053  3.4453191  217.6748
MAGEH1             -4.45892874          -0.0008943073  4.0026780  216.6919
MRPL55             -0.69771503           0.1475720506  6.8884481  216.0936
HEPH               -2.64148467           0.2748949441  2.9329243  212.1952
NUCKS1             -0.77087961           0.1576923726 10.0532090  211.3153
CDK16               0.07004454          -0.7601982941  6.2405778  210.6172
RBBP7               0.09385378          -0.7309515475  7.1947857  209.7569
ZNF280D             2.96973513           3.6692981471  2.5523706  208.0365
FAM199X             1.23456145           0.0362300439  4.4238350  207.8805
PSMD4              -0.83164888          -0.1028603790  7.9053555  206.5466
TOMM20             -0.69656936           0.2201459624  8.6468736  206.3766
NAXE               -0.83283017           0.0212083883  6.9900205  203.6572
KRTCAP2            -0.91592070           0.0603693043  7.0562363  203.2405
NSMCE1             -0.33795416          -1.0650492066  5.0861788  200.9750
QPCT                0.25367332          -3.8935678799  3.1436452  200.7503
PNPLA4              1.40337010           0.1328337504  5.1149287  199.0405
KDM6A               1.17940662          -0.1081981092  4.1317553  195.2829
LYPLAL1            -0.47966710           0.6338695811  5.3940200  194.0716
FDPS               -1.24361616          -0.0379751006  8.3715190  193.5837
             P.Value    adj.P.Val
TYW3    8.625784e-47 8.785361e-43
CRYZ    9.491511e-36 4.206489e-32
EIF1AY  1.239025e-35 4.206489e-32
TRIM61  8.871225e-34 2.258836e-30
CAT     3.756173e-33 7.651324e-30
THOC3   1.219311e-30 2.069781e-27
USP51   2.759348e-29 3.738533e-26
RNF187  2.936501e-29 3.738533e-26
HCCS    6.433319e-29 7.280373e-26
UBLCP1  9.899722e-29 1.008287e-25
DDX3Y   1.949843e-28 1.805378e-25
MRPS21  2.413586e-28 2.048531e-25
NXT2    6.377724e-28 4.996701e-25
NDUFS2  9.417324e-28 6.851104e-25
RAB4A   1.793403e-27 1.217720e-24
RRAGB   1.991170e-27 1.238039e-24
PRRC2C  2.066437e-27 1.238039e-24
IAH1    2.408549e-27 1.362837e-24
HAX1    2.634959e-27 1.412477e-24
TAF9B   7.155685e-27 3.644033e-24
UBA1    7.626000e-27 3.698610e-24
LLGL1   8.637492e-27 3.998766e-24
MAGEH1  9.642455e-27 4.269931e-24
MRPL55  1.031269e-26 4.376449e-24
HEPH    1.604490e-26 6.536693e-24
NUCKS1  1.774575e-26 6.951556e-24
CDK16   1.922779e-26 7.253150e-24
RBBP7   2.123225e-26 7.723231e-24
ZNF280D 2.591743e-26 8.960134e-24
FAM199X 2.639215e-26 8.960134e-24
PSMD4   3.083870e-26 1.001272e-23
TOMM20  3.145873e-26 1.001272e-23
NAXE    4.334138e-26 1.337673e-23
KRTCAP2 4.553802e-26 1.364131e-23
NSMCE1  5.967333e-26 1.734381e-23
QPCT    6.130362e-26 1.734381e-23
PNPLA4  7.532822e-26 2.073562e-23
KDM6A   1.191189e-25 3.192701e-23
LYPLAL1 1.383103e-25 3.612026e-23
FDPS    1.469218e-25 3.740996e-23
"UTF1" %in% rownames(topsInd)
[1] TRUE
topsInd[rownames(topsInd)== "UTF1",]
     dge.samples.indNA18858 dge.samples.indNA19160  AveExpr        F
UTF1              0.2412929             -0.5291004 5.619477 6.251066
         P.Value   adj.P.Val
UTF1 0.003586998 0.007964591
topsInd[rownames(topsInd)== "TAC3",]
     dge.samples.indNA18858 dge.samples.indNA19160  AveExpr        F
TAC3               1.170806            -0.01437916 3.666656 10.03314
         P.Value    adj.P.Val
TAC3 0.000193839 0.0006255214
plot(density(topsBatch$adj.P.Val))
lines(density(topsInd$adj.P.Val), col= "red")

Version Author Date
dd2f60e KLRhodes 2020-10-19
7888de8 KLRhodes 2020-08-31
boxplot(-log10(topsBatch$adj.P.Val), -log10(topsInd$adj.P.Val), names= c("Batch", "Individual"), main="Distribution of p values from F tests", ylab="-log10(adjusted.p.val)")

Version Author Date
dd2f60e KLRhodes 2020-10-19
7888de8 KLRhodes 2020-08-31
median(topsBatch$F)
[1] 7.010019
median(topsInd$F)
[1] 5.318821

sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Scientific Linux 7.4 (Nitrogen)

Matrix products: default
BLAS/LAPACK: /software/openblas-0.2.19-el7-x86_64/lib/libopenblas_haswellp-r0.2.19.so

locale:
[1] C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] UpSetR_1.4.0    ggplot2_3.3.3   reshape2_1.4.4  edgeR_3.28.1   
[5] limma_3.42.2    dplyr_1.0.2     Matrix_1.2-18   Seurat_3.2.0   
[9] workflowr_1.6.2

loaded via a namespace (and not attached):
  [1] Rtsne_0.15            colorspace_2.0-0      deldir_0.1-28        
  [4] ellipsis_0.3.1        ggridges_0.5.2        rprojroot_2.0.2      
  [7] fs_1.4.2              spatstat.data_1.4-3   farver_2.0.3         
 [10] leiden_0.3.3          listenv_0.8.0         npsurv_0.4-0         
 [13] ggrepel_0.9.0         codetools_0.2-16      splines_3.6.1        
 [16] lsei_1.2-0            knitr_1.29            polyclip_1.10-0      
 [19] jsonlite_1.7.2        ica_1.0-2             cluster_2.1.0        
 [22] png_0.1-7             uwot_0.1.10           shiny_1.5.0          
 [25] sctransform_0.2.1     compiler_3.6.1        httr_1.4.2           
 [28] fastmap_1.0.1         lazyeval_0.2.2        later_1.1.0.1        
 [31] htmltools_0.5.0       tools_3.6.1           rsvd_1.0.3           
 [34] igraph_1.2.6          gtable_0.3.0          glue_1.4.2           
 [37] RANN_2.6.1            rappdirs_0.3.1        Rcpp_1.0.5           
 [40] spatstat_1.64-1       vctrs_0.3.6           gdata_2.18.0         
 [43] ape_5.4-1             nlme_3.1-140          lmtest_0.9-37        
 [46] xfun_0.16             stringr_1.4.0         globals_0.12.5       
 [49] mime_0.9              miniUI_0.1.1.1        lifecycle_0.2.0      
 [52] irlba_2.3.3           gtools_3.8.2          goftest_1.2-2        
 [55] future_1.18.0         MASS_7.3-51.4         zoo_1.8-8            
 [58] scales_1.1.1          promises_1.1.1        spatstat.utils_1.17-0
 [61] parallel_3.6.1        RColorBrewer_1.1-2    yaml_2.2.1           
 [64] reticulate_1.16       pbapply_1.4-2         gridExtra_2.3        
 [67] rpart_4.1-15          stringi_1.5.3         highr_0.8            
 [70] caTools_1.18.0        rlang_0.4.10          pkgconfig_2.0.3      
 [73] bitops_1.0-6          evaluate_0.14         lattice_0.20-38      
 [76] ROCR_1.0-7            purrr_0.3.4           tensor_1.5           
 [79] labeling_0.4.2        patchwork_1.0.1       htmlwidgets_1.5.1    
 [82] cowplot_1.1.1         tidyselect_1.1.0      here_0.1-11          
 [85] RcppAnnoy_0.0.18      plyr_1.8.6            magrittr_2.0.1       
 [88] R6_2.5.0              gplots_3.0.4          generics_0.1.0       
 [91] withr_2.3.0           pillar_1.4.7          whisker_0.4          
 [94] mgcv_1.8-28           fitdistrplus_1.0-14   survival_3.2-3       
 [97] abind_1.4-5           tibble_3.0.4          future.apply_1.6.0   
[100] crayon_1.3.4          KernSmooth_2.23-15    plotly_4.9.2.1       
[103] rmarkdown_2.3         locfit_1.5-9.4        grid_3.6.1           
[106] data.table_1.13.4     git2r_0.26.1          digest_0.6.27        
[109] xtable_1.8-4          tidyr_1.1.0           httpuv_1.5.4         
[112] munsell_0.5.0         viridisLite_0.3.0