1 Differential Expression version: 20180410

2 L. major differential expression

lm_filt <- normalize_expt(lm_expt, filter=TRUE)
## This function will replace the expt$expressionset slot with:
## hpgl(data)
## It backs up the current data into a slot named:
##  expt$backup_expressionset. It will also save copies of each step along the way
##  in expt$normalized with the corresponding libsizes. Keep the libsizes in mind
##  when invoking limma.  The appropriate libsize is the non-log(cpm(normalized)).
##  This is most likely kept at:
##  'new_expt$normalized$intermediate_counts$normalization$libsizes'
##  A copy of this may also be found at:
##  new_expt$best_libsize
## Leaving the data in its current base format, keep in mind that
##  some metrics are easier to see when the data is log2 transformed, but
##  EdgeR/DESeq do not accept transformed data.
## Leaving the data unconverted.  It is often advisable to cpm/rpkm
##  the data to normalize for sampling differences, keep in mind though that rpkm
##  has some annoying biases, and voom() by default does a cpm (though hpgl_voom()
##  will try to detect this).
## Leaving the data unnormalized.  This is necessary for DESeq, but
##  EdgeR/limma might benefit from normalization.  Good choices include quantile,
##  size-factor, tmm, etc.
## Not correcting the count-data for batch effects.  If batch is
##  included in EdgerR/limma's model, then this is probably wise; but in extreme
##  batch effects this is a good parameter to play with.
## Step 1: performing count filter with option: hpgl
## Removing 53 low-count genes (7917 remaining).
## Step 2: not normalizing the data.
## Step 3: not converting the data.
## Step 4: not transforming the data.
## Step 5: not doing batch correction.
lm_pairwise <- all_pairwise(input=lm_filt, model_batch=TRUE, parallel=FALSE)
## Using limma's removeBatchEffect to visualize before/after batch inclusion.
## Starting limma pairwise comparison.
## libsize was not specified, this parameter has profound effects on limma's result.
## Using the libsize from expt$best_libsize.
## Limma step 1/6: choosing model.
## Choosing the non-intercept containing model.
## Limma step 2/6: running limma::voom(), switch with the argument 'which_voom'.
## Using normalize.method=quantile for voom.
## Limma step 3/6: running lmFit with method: ls.
## Limma step 4/6: making and fitting contrasts with no intercept. (~ 0 + factors)
## Limma step 5/6: Running eBayes with robust=FALSE and trend=FALSE.
## Limma step 6/6: Writing limma outputs.
## Limma step 6/6: 1/15: Creating table: pmn12hinf_vs_ama.  Adjust=BH
## Limma step 6/6: 2/15: Creating table: pmn12huninf_vs_ama.  Adjust=BH
## Limma step 6/6: 3/15: Creating table: pmn14dinf_vs_ama.  Adjust=BH
## Limma step 6/6: 4/15: Creating table: pmn14duninf_vs_ama.  Adjust=BH
## Limma step 6/6: 5/15: Creating table: pro_vs_ama.  Adjust=BH
## Limma step 6/6: 6/15: Creating table: pmn12huninf_vs_pmn12hinf.  Adjust=BH
## Limma step 6/6: 7/15: Creating table: pmn14dinf_vs_pmn12hinf.  Adjust=BH
## Limma step 6/6: 8/15: Creating table: pmn14duninf_vs_pmn12hinf.  Adjust=BH
## Limma step 6/6: 9/15: Creating table: pro_vs_pmn12hinf.  Adjust=BH
## Limma step 6/6: 10/15: Creating table: pmn14dinf_vs_pmn12huninf.  Adjust=BH
## Limma step 6/6: 11/15: Creating table: pmn14duninf_vs_pmn12huninf.  Adjust=BH
## Limma step 6/6: 12/15: Creating table: pro_vs_pmn12huninf.  Adjust=BH
## Limma step 6/6: 13/15: Creating table: pmn14duninf_vs_pmn14dinf.  Adjust=BH
## Limma step 6/6: 14/15: Creating table: pro_vs_pmn14dinf.  Adjust=BH
## Limma step 6/6: 15/15: Creating table: pro_vs_pmn14duninf.  Adjust=BH
## Limma step 6/6: 1/6: Creating table: ama.  Adjust=BH
## Limma step 6/6: 2/6: Creating table: pmn12hinf.  Adjust=BH
## Limma step 6/6: 3/6: Creating table: pmn12huninf.  Adjust=BH
## Limma step 6/6: 4/6: Creating table: pmn14dinf.  Adjust=BH
## Limma step 6/6: 5/6: Creating table: pmn14duninf.  Adjust=BH
## Limma step 6/6: 6/6: Creating table: pro.  Adjust=BH
## Starting DESeq2 pairwise comparisons.
## The data should be suitable for EdgeR/DESeq. If EdgeR/DESeq freaks out, check
## the state of the count table and ensure that it is in integer counts.
## Choosing the non-intercept containing model.
## DESeq2 step 1/5: Including batch and condition in the deseq model.
## using counts and average transcript lengths from tximport
## DESeq2 step 2/5: Estimate size factors.
## using 'avgTxLength' from assays(dds), correcting for library size
## DESeq2 step 3/5: Estimate dispersions.
## gene-wise dispersion estimates
## mean-dispersion relationship
## final dispersion estimates
## Using a parametric fitting seems to have worked.
## DESeq2 step 4/5: nbinomWaldTest.
## Plotting dispersions.

## 
  |                                                                       
  |                                                                 |   0%
  |                                                                       
  |====                                                             |   7%
  |                                                                       
  |=========                                                        |  13%
  |                                                                       
  |=============                                                    |  20%
  |                                                                       
  |=================                                                |  27%
  |                                                                       
  |======================                                           |  33%
  |                                                                       
  |==========================                                       |  40%
  |                                                                       
  |==============================                                   |  47%
  |                                                                       
  |===================================                              |  53%
  |                                                                       
  |=======================================                          |  60%
  |                                                                       
  |===========================================                      |  67%
  |                                                                       
  |================================================                 |  73%
  |                                                                       
  |====================================================             |  80%
  |                                                                       
  |========================================================         |  87%
  |                                                                       
  |=============================================================    |  93%
  |                                                                       
  |=================================================================| 100%
## Starting edgeR pairwise comparisons.
## The data should be suitable for EdgeR/DESeq. If EdgeR/DESeq freaks out, check
## the state of the count table and ensure that it is in integer counts.
## Choosing the non-intercept containing model.
## EdgeR step 1/9: importing and normalizing data.
## EdgeR step 2/9: Estimating the common dispersion.
## EdgeR step 3/9: Estimating dispersion across genes.
## EdgeR step 4/9: Estimating GLM Common dispersion.
## EdgeR step 5/9: Estimating GLM Trended dispersion.
## EdgeR step 6/9: Estimating GLM Tagged dispersion.
## EdgeR step 7/9: Running glmFit, switch to glmQLFit by changing the argument 'edger_test'.
## EdgeR step 8/9: Making pairwise contrasts.

## 
  |                                                                       
  |                                                                 |   0%
  |                                                                       
  |====                                                             |   7%
  |                                                                       
  |=========                                                        |  13%
  |                                                                       
  |=============                                                    |  20%
  |                                                                       
  |=================                                                |  27%
  |                                                                       
  |======================                                           |  33%
  |                                                                       
  |==========================                                       |  40%
  |                                                                       
  |==============================                                   |  47%
  |                                                                       
  |===================================                              |  53%
  |                                                                       
  |=======================================                          |  60%
  |                                                                       
  |===========================================                      |  67%
  |                                                                       
  |================================================                 |  73%
  |                                                                       
  |====================================================             |  80%
  |                                                                       
  |========================================================         |  87%
  |                                                                       
  |=============================================================    |  93%
  |                                                                       
  |=================================================================| 100%
## Starting basic pairwise comparison.
## Basic step 0/3: Normalizing data.
## Basic step 0/3: Converting data.
## Basic step 0/3: Transforming data.
## Basic step 1/3: Creating median and variance tables.
## Basic step 2/3: Performing 21 comparisons.
## 
  |                                                                       
  |                                                                 |   0%
  |                                                                       
  |====                                                             |   7%
  |                                                                       
  |=========                                                        |  13%
  |                                                                       
  |=============                                                    |  20%
  |                                                                       
  |=================                                                |  27%
  |                                                                       
  |======================                                           |  33%
  |                                                                       
  |==========================                                       |  40%
  |                                                                       
  |==============================                                   |  47%
  |                                                                       
  |===================================                              |  53%
  |                                                                       
  |=======================================                          |  60%
  |                                                                       
  |===========================================                      |  67%
  |                                                                       
  |================================================                 |  73%
  |                                                                       
  |====================================================             |  80%
  |                                                                       
  |========================================================         |  87%
  |                                                                       
  |=============================================================    |  93%
  |                                                                       
  |=================================================================| 100%
## Basic step 3/3: Creating faux DE Tables.
## Basic: Returning tables.
## Comparing analyses 1/15: pmn12hinf_vs_ama
## Comparing analyses 2/15: pmn12huninf_vs_ama
## Comparing analyses 3/15: pmn14dinf_vs_ama
## Comparing analyses 4/15: pmn14duninf_vs_ama
## Comparing analyses 5/15: pro_vs_ama
## Comparing analyses 6/15: pmn12huninf_vs_pmn12hinf
## Comparing analyses 7/15: pmn14dinf_vs_pmn12hinf
## Comparing analyses 8/15: pmn14duninf_vs_pmn12hinf
## Comparing analyses 9/15: pro_vs_pmn12hinf
## Comparing analyses 10/15: pmn14dinf_vs_pmn12huninf
## Comparing analyses 11/15: pmn14duninf_vs_pmn12huninf
## Comparing analyses 12/15: pro_vs_pmn12huninf
## Comparing analyses 13/15: pmn14duninf_vs_pmn14dinf
## Comparing analyses 14/15: pro_vs_pmn14dinf
## Comparing analyses 15/15: pro_vs_pmn14duninf

keepers <- list(
    "12hr_infuninf" = c("pmn12hinf", "pmn12huninf"),
    "14d_infuninf" = c("pmn14dinf", "pmn14duninf"),
    "ama_pro" = c("ama", "pro"),
    "inf_14d12hr" = c("pmn14dinf", "pmn12hinf"),
    "uninf_14d12hr" = c("pmn14duninf", "pmn12huninf")
)
lm_tables <- combine_de_tables(lm_pairwise, keepers=keepers,
                               excel=paste0("excel/lm_pairwise-v", ver, ".xlsx"))
## Writing a legend of columns.
## Printing a pca plot before/after surrogates/batch estimation.
## Working on 1/5: 12hr_infuninf
## Found inverse table with pmn12huninf_vs_pmn12hinf
## Working on 2/5: 14d_infuninf
## Found inverse table with pmn14duninf_vs_pmn14dinf
## Working on 3/5: ama_pro
## Found inverse table with pro_vs_ama
## Working on 4/5: inf_14d12hr
## Found table with pmn14dinf_vs_pmn12hinf
## Working on 5/5: uninf_14d12hr
## Found table with pmn14duninf_vs_pmn12huninf
## Adding venn plots for pmn12hinf_vs_pmn12huninf.

## Limma expression coefficients for pmn12hinf_vs_pmn12huninf; R^2: 0.238; equation: y = 1.14x - 1.18
## Edger expression coefficients for pmn12hinf_vs_pmn12huninf; R^2: 0.259; equation: y = 0.196x + 11.2
## DESeq2 expression coefficients for pmn12hinf_vs_pmn12huninf; R^2: 0.389; equation: y = 0.653x + 2.16
## Adding venn plots for pmn14dinf_vs_pmn14duninf.

## Limma expression coefficients for pmn14dinf_vs_pmn14duninf; R^2: 0.601; equation: y = 1.09x - 0.678
## Edger expression coefficients for pmn14dinf_vs_pmn14duninf; R^2: 0.618; equation: y = 0.574x + 5.95
## DESeq2 expression coefficients for pmn14dinf_vs_pmn14duninf; R^2: 0.663; equation: y = 0.81x + 1.2
## Adding venn plots for ama_vs_pro.

## Limma expression coefficients for ama_vs_pro; R^2: 0.579; equation: y = 0.766x + 1.15
## Edger expression coefficients for ama_vs_pro; R^2: 0.66; equation: y = 0.864x + 1.26
## DESeq2 expression coefficients for ama_vs_pro; R^2: 0.6; equation: y = 0.817x + 0.509
## Adding venn plots for pmn14dinf_vs_pmn12hinf.

## Limma expression coefficients for pmn14dinf_vs_pmn12hinf; R^2: 0.768; equation: y = 0.882x + 0.57
## Edger expression coefficients for pmn14dinf_vs_pmn12hinf; R^2: 0.796; equation: y = 0.987x + 0.0971
## DESeq2 expression coefficients for pmn14dinf_vs_pmn12hinf; R^2: 0.78; equation: y = 0.958x + 0.024
## Adding venn plots for pmn14duninf_vs_pmn12huninf.

## Limma expression coefficients for pmn14duninf_vs_pmn12huninf; R^2: 0.304; equation: y = 0.894x + 0.214
## Edger expression coefficients for pmn14duninf_vs_pmn12huninf; R^2: 0.187; equation: y = 0.24x + 10.2
## DESeq2 expression coefficients for pmn14duninf_vs_pmn12huninf; R^2: 0.509; equation: y = 0.944x + 0.202
## Writing summary information.
## Attempting to add the comparison plot to pairwise_summary at row: 23 and column: 1
## 
  |                                                                       
  |                                                                 |   0%
  |                                                                       
  |=============                                                    |  20%
  |                                                                       
  |==========================                                       |  40%
  |                                                                       
  |=======================================                          |  60%
  |                                                                       
  |====================================================             |  80%
  |                                                                       
  |=================================================================| 100%
## Performing save of the workbook.

lm_sig <- extract_significant_genes(combined=lm_tables,
                                    excel=paste0("excel/lm_sig-v", ver, ".xlsx"))
## Writing a legend of columns.
## Writing excel data for pmn12hinf_vs_pmn12huninf: 1/20.
## After (adj)p filter, the up genes table has 575 genes.
## After (adj)p filter, the down genes table has 1233 genes.
## After fold change filter, the up genes table has 575 genes.
## After fold change filter, the down genes table has 1233 genes.
## Writing excel data for pmn14dinf_vs_pmn14duninf: 2/20.
## After (adj)p filter, the up genes table has 54 genes.
## After (adj)p filter, the down genes table has 251 genes.
## After fold change filter, the up genes table has 54 genes.
## After fold change filter, the down genes table has 251 genes.
## Writing excel data for ama_vs_pro: 3/20.
## After (adj)p filter, the up genes table has 218 genes.
## After (adj)p filter, the down genes table has 249 genes.
## After fold change filter, the up genes table has 218 genes.
## After fold change filter, the down genes table has 249 genes.
## Writing excel data for pmn14dinf_vs_pmn12hinf: 4/20.
## After (adj)p filter, the up genes table has 2 genes.
## After (adj)p filter, the down genes table has 10 genes.
## After fold change filter, the up genes table has 2 genes.
## After fold change filter, the down genes table has 10 genes.
## Writing excel data for pmn14duninf_vs_pmn12huninf: 5/20.
## After (adj)p filter, the up genes table has 56 genes.
## After (adj)p filter, the down genes table has 6 genes.
## After fold change filter, the up genes table has 56 genes.
## After fold change filter, the down genes table has 6 genes.
## Printing significant genes to the file: excel/lm_sig-v20180410.xlsx
## 1/5: Creating significant table up_1limma_pmn12hinf_vs_pmn12huninf
## The sheet name was too long for Excel, truncating it by removing vowels.
## The sheet name was too long for Excel, truncating it by removing vowels.
## 2/5: Creating significant table up_2limma_pmn14dinf_vs_pmn14duninf
## The sheet name was too long for Excel, truncating it by removing vowels.
## The sheet name was too long for Excel, truncating it by removing vowels.
## 3/5: Creating significant table up_3limma_ama_vs_pro
## 4/5: Creating significant table up_4limma_pmn14dinf_vs_pmn12hinf
## The sheet name was too long for Excel, truncating it by removing vowels.
## The sheet name was too long for Excel, truncating it by removing vowels.
## 5/5: Creating significant table up_5limma_pmn14duninf_vs_pmn12huninf
## The sheet name was too long for Excel, truncating it by removing vowels.
## The sheet name was too long for Excel, truncating it by removing vowels.
## Writing excel data for pmn12hinf_vs_pmn12huninf: 6/20.
## After (adj)p filter, the up genes table has 128 genes.
## After (adj)p filter, the down genes table has 43 genes.
## After fold change filter, the up genes table has 128 genes.
## After fold change filter, the down genes table has 43 genes.
## Writing excel data for pmn14dinf_vs_pmn14duninf: 7/20.
## After (adj)p filter, the up genes table has 14 genes.
## After (adj)p filter, the down genes table has 6 genes.
## After fold change filter, the up genes table has 14 genes.
## After fold change filter, the down genes table has 6 genes.
## Writing excel data for ama_vs_pro: 8/20.
## After (adj)p filter, the up genes table has 79 genes.
## After (adj)p filter, the down genes table has 127 genes.
## After fold change filter, the up genes table has 79 genes.
## After fold change filter, the down genes table has 127 genes.
## Writing excel data for pmn14dinf_vs_pmn12hinf: 9/20.
## After (adj)p filter, the up genes table has 1 genes.
## After (adj)p filter, the down genes table has 3 genes.
## After fold change filter, the up genes table has 1 genes.
## After fold change filter, the down genes table has 3 genes.
## Writing excel data for pmn14duninf_vs_pmn12huninf: 10/20.
## After (adj)p filter, the up genes table has 85 genes.
## After (adj)p filter, the down genes table has 76 genes.
## After fold change filter, the up genes table has 85 genes.
## After fold change filter, the down genes table has 76 genes.
## Printing significant genes to the file: excel/lm_sig-v20180410.xlsx
## 1/5: Creating significant table up_1edger_pmn12hinf_vs_pmn12huninf
## The sheet name was too long for Excel, truncating it by removing vowels.
## The sheet name was too long for Excel, truncating it by removing vowels.
## 2/5: Creating significant table up_2edger_pmn14dinf_vs_pmn14duninf
## The sheet name was too long for Excel, truncating it by removing vowels.
## The sheet name was too long for Excel, truncating it by removing vowels.
## 3/5: Creating significant table up_3edger_ama_vs_pro
## 4/5: Creating significant table up_4edger_pmn14dinf_vs_pmn12hinf
## The sheet name was too long for Excel, truncating it by removing vowels.
## The sheet name was too long for Excel, truncating it by removing vowels.
## 5/5: Creating significant table up_5edger_pmn14duninf_vs_pmn12huninf
## The sheet name was too long for Excel, truncating it by removing vowels.
## The sheet name was too long for Excel, truncating it by removing vowels.
## Writing excel data for pmn12hinf_vs_pmn12huninf: 11/20.
## After (adj)p filter, the up genes table has 229 genes.
## After (adj)p filter, the down genes table has 60 genes.
## After fold change filter, the up genes table has 229 genes.
## After fold change filter, the down genes table has 60 genes.
## Writing excel data for pmn14dinf_vs_pmn14duninf: 12/20.
## After (adj)p filter, the up genes table has 32 genes.
## After (adj)p filter, the down genes table has 13 genes.
## After fold change filter, the up genes table has 32 genes.
## After fold change filter, the down genes table has 13 genes.
## Writing excel data for ama_vs_pro: 13/20.
## After (adj)p filter, the up genes table has 91 genes.
## After (adj)p filter, the down genes table has 271 genes.
## After fold change filter, the up genes table has 91 genes.
## After fold change filter, the down genes table has 271 genes.
## Writing excel data for pmn14dinf_vs_pmn12hinf: 14/20.
## After (adj)p filter, the up genes table has 3 genes.
## After (adj)p filter, the down genes table has 6 genes.
## After fold change filter, the up genes table has 3 genes.
## After fold change filter, the down genes table has 6 genes.
## Writing excel data for pmn14duninf_vs_pmn12huninf: 15/20.
## After (adj)p filter, the up genes table has 149 genes.
## After (adj)p filter, the down genes table has 86 genes.
## After fold change filter, the up genes table has 149 genes.
## After fold change filter, the down genes table has 86 genes.
## Printing significant genes to the file: excel/lm_sig-v20180410.xlsx
## 1/5: Creating significant table up_1deseq_pmn12hinf_vs_pmn12huninf
## The sheet name was too long for Excel, truncating it by removing vowels.
## The sheet name was too long for Excel, truncating it by removing vowels.
## 2/5: Creating significant table up_2deseq_pmn14dinf_vs_pmn14duninf
## The sheet name was too long for Excel, truncating it by removing vowels.
## The sheet name was too long for Excel, truncating it by removing vowels.
## 3/5: Creating significant table up_3deseq_ama_vs_pro
## 4/5: Creating significant table up_4deseq_pmn14dinf_vs_pmn12hinf
## The sheet name was too long for Excel, truncating it by removing vowels.
## The sheet name was too long for Excel, truncating it by removing vowels.
## 5/5: Creating significant table up_5deseq_pmn14duninf_vs_pmn12huninf
## The sheet name was too long for Excel, truncating it by removing vowels.
## The sheet name was too long for Excel, truncating it by removing vowels.
## Writing excel data for pmn12hinf_vs_pmn12huninf: 16/20.
## After (adj)p filter, the up genes table has 259 genes.
## After (adj)p filter, the down genes table has 264 genes.
## After fold change filter, the up genes table has 246 genes.
## After fold change filter, the down genes table has 262 genes.
## Writing excel data for pmn14dinf_vs_pmn14duninf: 17/20.
## After (adj)p filter, the up genes table has 0 genes.
## After (adj)p filter, the down genes table has 0 genes.
## After fold change filter, the up genes table has 0 genes.
## After fold change filter, the down genes table has 0 genes.
## Writing excel data for ama_vs_pro: 18/20.
## After (adj)p filter, the up genes table has 6 genes.
## After (adj)p filter, the down genes table has 12 genes.
## After fold change filter, the up genes table has 5 genes.
## After fold change filter, the down genes table has 12 genes.
## Writing excel data for pmn14dinf_vs_pmn12hinf: 19/20.
## After (adj)p filter, the up genes table has 0 genes.
## After (adj)p filter, the down genes table has 0 genes.
## After fold change filter, the up genes table has 0 genes.
## After fold change filter, the down genes table has 0 genes.
## Writing excel data for pmn14duninf_vs_pmn12huninf: 20/20.
## After (adj)p filter, the up genes table has 3 genes.
## After (adj)p filter, the down genes table has 0 genes.
## After fold change filter, the up genes table has 3 genes.
## After fold change filter, the down genes table has 0 genes.
## Printing significant genes to the file: excel/lm_sig-v20180410.xlsx
## 1/5: Creating significant table up_1basic_pmn12hinf_vs_pmn12huninf
## The sheet name was too long for Excel, truncating it by removing vowels.
## The sheet name was too long for Excel, truncating it by removing vowels.
## 2/5: Creating significant table up_2basic_pmn14dinf_vs_pmn14duninf
## The sheet name was too long for Excel, truncating it by removing vowels.
## The sheet name was too long for Excel, truncating it by removing vowels.
## 3/5: Creating significant table up_3basic_ama_vs_pro
## 4/5: Creating significant table up_4basic_pmn14dinf_vs_pmn12hinf
## The sheet name was too long for Excel, truncating it by removing vowels.
## The sheet name was too long for Excel, truncating it by removing vowels.
## 5/5: Creating significant table up_5basic_pmn14duninf_vs_pmn12huninf
## The sheet name was too long for Excel, truncating it by removing vowels.
## The sheet name was too long for Excel, truncating it by removing vowels.
## Adding significance bar plots.
if (!isTRUE(get0("skip_load"))) {
  pander::pander(sessionInfo())
  message(paste0("This is hpgltools commit: ", get_git_commit()))
  this_save <- paste0(gsub(pattern="\\.Rmd", replace="", x=rmd_file), "-v", ver, ".rda.xz")
  message(paste0("Saving to ", this_save))
  tmp <- sm(saveme(filename=this_save))
}
## If you wish to reproduce this exact build of hpgltools, invoke the following:
## > git clone http://github.com/abelew/hpgltools.git
## > git reset 7de4503f6bb5724c28cce24af5dbee22bb1c0cae
## R> packrat::restore()
## This is hpgltools commit: Thu Apr 12 22:08:53 2018 -0400: 7de4503f6bb5724c28cce24af5dbee22bb1c0cae
## Saving to 03_differential_expression_lmajor_201804-v20180410.rda.xz
LS0tCnRpdGxlOiAiTC4gbWFqb3IgMjAxNzogZGlmZmVyZW50aWFsIGV4cHJlc3Npb24gb2YgTGVpc2htYW5pYSBzYW1wbGVzICgyMDE4MDMpLiIKYXV0aG9yOiAiYX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