<p>Specify your genes of interest using the <code>features</code> parameter of the <code>ScaleData()</code> function. If this parameter is not specified, only &quot;variable genes&quot; are scaled and that makes sense, genes that do not demonstrate variability across conditions is not interesting in general. Anyhow, since the  <code>DoHeatmap()</code> would be looking at the &quot;scaled data slot&quot;, it will not be able to find your genes of interest unless they show variation.</p>

CC BY-SA 4.0
2021-08-05T17:53:07.080Z
Thank you. I use sctranscform, I should scale my data before or after sctransform function?
Mahta Mira
CC BY-SA 4.0
2021-08-05T17:57:24.787Z
From their vignette: `Note that this single command replaces NormalizeData(), ScaleData(), and FindVariableFeatures().`
haci
CC BY-SA 4.0
2021-08-05T18:02:25.970Z
I checked sctransform with or without scale data and the results was different
Mahta Mira
CC BY-SA 4.0
2021-08-05T18:28:32.850Z
1- Please do not edit your questions extensively, these questions meant to help future users too, now the answer and the question does not match. 2- Please read documentation associated with the functions/packages you use: `SCTransform()` doc says `return.only.var.genes: 
If set to TRUE the scale.data matrices in output assay are subset to contain only the variable genes; default is TRUE`. 3- Please show some effort, you will learn and develop faster if you learn by doing instead of asking questions on each step.
haci
CC BY-SA 4.0
2021-08-05T17:51:07.570Z
2021-08-05T17:51:07.570Z
haci
<p>I have a Seurat object</p>
<p>I want to plot a list of genes but I got a warning saying most of genes removed</p>
<p>I have tried with both <em><strong>my genes of interest</strong></em> and <em><strong>all variable genes</strong></em> but the results is very similar</p>
<p>Does this mean these genes are basically are not expressed in my data?</p>
<pre><code>   &gt; t<span class="math-container">$V1
  [1] "IGH"          "IGHV1-2"      "IGHV1-3"      "IGHV1-12"     "IGHV1-8"     
  [6] "IGHV1-14"     "IGHV1-17"     "IGHV1-18"     "IGHV1-24"     "IGHV1-45"    
 [11] "IGHV1-46"     "IGHV1-58"     "IGHV1-67"     "IGHV1-68"     "IGHV1-69"    
 [16] "IGHV1-69D"    "IGHV1-38-4"   "IGHV1-69-2"   "IGHV2-5"      "IGHV2-10"    
 [21] "IGHV2-26"     "IGHV2-70"     "IGHV2-70D"    "IGHV3-6"      "IGHV3-7"     
 [26] "IGHV3-9"      "IGHV3-11"     "IGHV3-13"     "IGHV3-15"     "IGHV3-16"    
 [31] "IGHV3-19"     "IGHV3-20"     "IGHV3-21"     "IGHV3-22"     "IGHV3-23"    
 [36] "IGHV3-25"     "IGHV3-29"     "IGHV3-30"     "IGHV3-30-2"   "IGHV3-30-3"  
 [41] "IGHV3-30-5"   "IGHV3-32"     "IGHV3-33"     "IGHV3-33-2"   "IGHV3-35"    
 [46] "IGHV3-36"     "IGHV3-37"     "IGHV3-38"     "IGHV3-41"     "IGHV3-42"    
 [51] "IGHV3-43"     "IGHV3-43D"    "IGHV3-47"     "IGHV3-48"     "IGHV3-49"    
 [56] "IGHV3-50"     "IGHV3-52"     "IGHV3-53"     "IGHV3-54"     "IGHV3-57"    
 [61] "IGHV3-60"     "IGHV3-62"     "IGHV3-63"     "IGHV3-64"     "IGHV3-65"    
 [66] "IGHV3-66"     "IGHV3-71"     "IGHV3-72"     "IGHV3-73"     "IGHV3-74"    
 [71] "IGHV3-75"     "IGHV3-76"     "IGHV3-79"     "IGHV3-38-3"   "IGHV3-69-1"  
 [76] "IGHV4-4"      "IGHV4-28"     "IGHV4-30-1"   "IGHV4-30-2"   "IGHV4-30-4"  
 [81] "IGHV4-31"     "IGHV4-34"     "IGHV4-39"     "IGHV4-55"     "IGHV4-59"    
 [86] "IGHV4-61"     "IGHV4-80"     "IGHV4-38-2"   "IGHV5-51"     "IGHV5-78"    
 [91] "IGHV5-10-1"   "IGHV6-1"      "IGHV7-4-1"    "IGHV7-40"     "IGHV7-27"    
 [96] "IGHV7-56"     "IGHV7-34-1"   "IGHV7-81"     "IGHVII-1-1"   "IGHVII-15-1" 
[101] "IGHVII-20-1"  "IGHVII-22-1"  "IGHVII-26-2"  "IGHVII-28-1"  "IGHVII-30-1" 
[106] "IGHVII-30-21" "IGHVII-31-1"  "IGHVII-33-1"  "IGHVII-40-1"  "IGHVII-43-1" 
[111] "IGHVII-44-2"  "IGHVII-46-1"  "IGHVII-49-1"  "IGHVII-51-2"  "IGHVII-53-1" 
[116] "IGHVII-60-1"  "IGHVII-62-1"  "IGHVII-65-1"  "IGHVII-67-1"  "IGHVII-74-1" 
[121] "IGHVII-78-1"  "IGHVIII-2-1"  "IGHVIII-5-1"  "IGHVIII-5-2"  "IGHVIII-11-1"
[126] "IGHVIII-13-1" "IGHVIII-16-1" "IGHVIII-22-2" "IGHVIII-25-1" "IGHVIII-26-1"
[131] "IGHVIII-38-1" "IGHVIII-44"   "IGHVIII-47-1" "IGHV8-51-1"   "IGHVIII-67-2"
[136] "IGHVIII-67-3" "IGHVIII-67-4" "IGHVIII-76-1" "IGHVIII-82"   "IGHVIV-44-1" 
[141] "IGHD1-1"      "IGHD1-7"      "IGHD1-14"     "IGHD1-20"     "IGHD1-26"    
[146] "IGHD2-2"      "IGHD2-8"      "IGHD2-15"     "IGHD2-21"     "IGHD3-3"     
[151] "IGHD3-9"      "IGHD3-10"     "IGHD3-16"     "IGHD3-22"     "IGHD4-4"     
[156] "IGHD4-11"     "IGHD4-17"     "IGHD4-23"     "IGHD5-5"      "IGHD5-12"    
[161] "IGHD5-18"     "IGHD5-24"     "IGHD6-6"      "IGHD6-13"     "IGHD6-19"    
[166] "IGHD6-25"     "IGHD7-27"     "IGHJ1"        "IGHJ1P"       "IGHJ2"       
[171] "IGHJ2P"       "IGHJ3"        "IGHJ3P"       "IGHJ4"        "IGHJ5"       
[176] "IGHJ6"        "IGHA1"        "IGHA2"        "IGHG1"        "IGHG2"       
[181] "IGHG3"        "IGHG4"        "IGHGP"        "IGHD"         "IGHE"        
[186] "IGHEP1"       "IGHM"        
&gt; pbmc=ScaleData(
+     pbmc,
+     features = t$</span>V1)
Centering and scaling data matrix
  |================================================================================| 100%
&gt; DoHeatmap(pbmc,t<span class="math-container">$V1,group.by = "Condition")
Warning message:
In DoHeatmap(pbmc, t$</span>V1, group.by = &quot;Condition&quot;) :
  The following features were omitted as they were not found in the scale.data slot for the SCT assay: IGHEP1, IGHE, IGHJ6, IGHJ5, IGHJ4, IGHJ3P, IGHJ3, IGHJ2P, IGHJ2, IGHJ1P, IGHJ1, IGHD7-27, IGHD6-25, IGHD6-19, IGHD6-13, IGHD6-6, IGHD5-24, IGHD5-18, IGHD5-12, IGHD5-5, IGHD4-23, IGHD4-17, IGHD4-11, IGHD4-4, IGHD3-22, IGHD3-16, IGHD3-10, IGHD3-9, IGHD3-3, IGHD2-21, IGHD2-15, IGHD2-8, IGHD2-2, IGHD1-26, IGHD1-20, IGHD1-14, IGHD1-7, IGHD1-1, IGHVIV-44-1, IGHVIII-82, IGHVIII-76-1, IGHVIII-67-4, IGHVIII-67-3, IGHVIII-67-2, IGHV8-51-1, IGHVIII-47-1, IGHVIII-44, IGHVIII-38-1, IGHVIII-26-1, IGHVIII-25-1, IGHVIII-22-2, IGHVIII-16-1, IGHVIII-13-1, IGHVIII-11-1, IGHVIII-5-2, IGHVIII-5-1, IGHVIII-2-1, IGHVII-78-1, IGHVII-74-1, IGHVII-67-1, IGHVII-65-1, IGHVII-62-1, IGHVII-60-1, IGHVII-53-1, IGHVII-51-2, IGHVII-49-1, IGHVII-46-1, IGHVII-44-2, IGHVII-43-1, IGHVII-40-1, IGHVII-33-1, IGHVII-31-1, IGHVII-30-21, IGHVII-30-1, IGHVII-28-1, IGHVII-26-2, IGHVII-22-1, IGHVII-20-1, IGHVII-15-1, IGHVII-1-1, IGH [... truncated]
&gt; pbmc=ScaleData(
+     pbmc,
+     features =rownames(pbmc))
Centering and scaling data matrix
  |================================================================================| 100%
&gt; rm(pbmc)
&gt; pbmc=readRDS(&quot;pbmc.rds&quot;)
&gt; pbmc=ScaleData(
+     pbmc,
+     features =rownames(pbmc))
Centering and scaling data matrix
  |================================================================================| 100%
&gt; DoHeatmap(pbmc,t<span class="math-container">$V1,group.by = "Condition")
Warning message:
In DoHeatmap(pbmc, t$</span>V1, group.by = &quot;Condition&quot;) :
  The following features were omitted as they were not found in the scale.data slot for the SCT assay: IGHEP1, IGHE, IGHJ6, IGHJ5, IGHJ4, IGHJ3P, IGHJ3, IGHJ2P, IGHJ2, IGHJ1P, IGHJ1, IGHD7-27, IGHD6-25, IGHD6-19, IGHD6-13, IGHD6-6, IGHD5-24, IGHD5-18, IGHD5-12, IGHD5-5, IGHD4-23, IGHD4-17, IGHD4-11, IGHD4-4, IGHD3-22, IGHD3-16, IGHD3-10, IGHD3-9, IGHD3-3, IGHD2-21, IGHD2-15, IGHD2-8, IGHD2-2, IGHD1-26, IGHD1-20, IGHD1-14, IGHD1-7, IGHD1-1, IGHVIV-44-1, IGHVIII-82, IGHVIII-76-1, IGHVIII-67-4, IGHVIII-67-3, IGHVIII-67-2, IGHV8-51-1, IGHVIII-47-1, IGHVIII-44, IGHVIII-38-1, IGHVIII-26-1, IGHVIII-25-1, IGHVIII-22-2, IGHVIII-16-1, IGHVIII-13-1, IGHVIII-11-1, IGHVIII-5-2, IGHVIII-5-1, IGHVIII-2-1, IGHVII-78-1, IGHVII-74-1, IGHVII-67-1, IGHVII-65-1, IGHVII-62-1, IGHVII-60-1, IGHVII-53-1, IGHVII-51-2, IGHVII-49-1, IGHVII-46-1, IGHVII-44-2, IGHVII-43-1, IGHVII-40-1, IGHVII-33-1, IGHVII-31-1, IGHVII-30-21, IGHVII-30-1, IGHVII-28-1, IGHVII-26-2, IGHVII-22-1, IGHVII-20-1, IGHVII-15-1, IGHVII-1-1, IGH [... truncated]
&gt;
</code></pre>

<scrnaseq><seurat><10x-genomics><heatmap>
Avoiding the warning 'The following features were omitted as they were not found in the scale.data slot for the SCT assay' in Seurat
# Avoiding the warning 'The following features were omitted as they were not found in the scale.data slot for the SCT assay' in Seurat

(Asked by: username_0 on 2021-08-05)

I have a Seurat object
I want to plot a list of genes but I got a warning saying most of genes removed
I have tried with both my genes of interest and all variable genes but the results is very similar
Does this mean these genes are basically are not expressed in my data?
   > t$V1
  [1] "IGH"          "IGHV1-2"      "IGHV1-3"      "IGHV1-12"     "IGHV1-8"     
  [6] "IGHV1-14"     "IGHV1-17"     "IGHV1-18"     "IGHV1-24"     "IGHV1-45"    
 [11] "IGHV1-46"     "IGHV1-58"     "IGHV1-67"     "IGHV1-68"     "IGHV1-69"    
 [16] "IGHV1-69D"    "IGHV1-38-4"   "IGHV1-69-2"   "IGHV2-5"      "IGHV2-10"    
 [21] "IGHV2-26"     "IGHV2-70"     "IGHV2-70D"    "IGHV3-6"      "IGHV3-7"     
 [26] "IGHV3-9"      "IGHV3-11"     "IGHV3-13"     "IGHV3-15"     "IGHV3-16"    
 [31] "IGHV3-19"     "IGHV3-20"     "IGHV3-21"     "IGHV3-22"     "IGHV3-23"    
 [36] "IGHV3-25"     "IGHV3-29"     "IGHV3-30"     "IGHV3-30-2"   "IGHV3-30-3"  
 [41] "IGHV3-30-5"   "IGHV3-32"     "IGHV3-33"     "IGHV3-33-2"   "IGHV3-35"    
 [46] "IGHV3-36"     "IGHV3-37"     "IGHV3-38"     "IGHV3-41"     "IGHV3-42"    
 [51] "IGHV3-43"     "IGHV3-43D"    "IGHV3-47"     "IGHV3-48"     "IGHV3-49"    
 [56] "IGHV3-50"     "IGHV3-52"     "IGHV3-53"     "IGHV3-54"     "IGHV3-57"    
 [61] "IGHV3-60"     "IGHV3-62"     "IGHV3-63"     "IGHV3-64"     "IGHV3-65"    
 [66] "IGHV3-66"     "IGHV3-71"     "IGHV3-72"     "IGHV3-73"     "IGHV3-74"    
 [71] "IGHV3-75"     "IGHV3-76"     "IGHV3-79"     "IGHV3-38-3"   "IGHV3-69-1"  
 [76] "IGHV4-4"      "IGHV4-28"     "IGHV4-30-1"   "IGHV4-30-2"   "IGHV4-30-4"  
 [81] "IGHV4-31"     "IGHV4-34"     "IGHV4-39"     "IGHV4-55"     "IGHV4-59"    
 [86] "IGHV4-61"     "IGHV4-80"     "IGHV4-38-2"   "IGHV5-51"     "IGHV5-78"    
 [91] "IGHV5-10-1"   "IGHV6-1"      "IGHV7-4-1"    "IGHV7-40"     "IGHV7-27"    
 [96] "IGHV7-56"     "IGHV7-34-1"   "IGHV7-81"     "IGHVII-1-1"   "IGHVII-15-1" 
[101] "IGHVII-20-1"  "IGHVII-22-1"  "IGHVII-26-2"  "IGHVII-28-1"  "IGHVII-30-1" 
[106] "IGHVII-30-21" "IGHVII-31-1"  "IGHVII-33-1"  "IGHVII-40-1"  "IGHVII-43-1" 
[111] "IGHVII-44-2"  "IGHVII-46-1"  "IGHVII-49-1"  "IGHVII-51-2"  "IGHVII-53-1" 
[116] "IGHVII-60-1"  "IGHVII-62-1"  "IGHVII-65-1"  "IGHVII-67-1"  "IGHVII-74-1" 
[121] "IGHVII-78-1"  "IGHVIII-2-1"  "IGHVIII-5-1"  "IGHVIII-5-2"  "IGHVIII-11-1"
[126] "IGHVIII-13-1" "IGHVIII-16-1" "IGHVIII-22-2" "IGHVIII-25-1" "IGHVIII-26-1"
[131] "IGHVIII-38-1" "IGHVIII-44"   "IGHVIII-47-1" "IGHV8-51-1"   "IGHVIII-67-2"
[136] "IGHVIII-67-3" "IGHVIII-67-4" "IGHVIII-76-1" "IGHVIII-82"   "IGHVIV-44-1" 
[141] "IGHD1-1"      "IGHD1-7"      "IGHD1-14"     "IGHD1-20"     "IGHD1-26"    
[146] "IGHD2-2"      "IGHD2-8"      "IGHD2-15"     "IGHD2-21"     "IGHD3-3"     
[151] "IGHD3-9"      "IGHD3-10"     "IGHD3-16"     "IGHD3-22"     "IGHD4-4"     
[156] "IGHD4-11"     "IGHD4-17"     "IGHD4-23"     "IGHD5-5"      "IGHD5-12"    
[161] "IGHD5-18"     "IGHD5-24"     "IGHD6-6"      "IGHD6-13"     "IGHD6-19"    
[166] "IGHD6-25"     "IGHD7-27"     "IGHJ1"        "IGHJ1P"       "IGHJ2"       
[171] "IGHJ2P"       "IGHJ3"        "IGHJ3P"       "IGHJ4"        "IGHJ5"       
[176] "IGHJ6"        "IGHA1"        "IGHA2"        "IGHG1"        "IGHG2"       
[181] "IGHG3"        "IGHG4"        "IGHGP"        "IGHD"         "IGHE"        
[186] "IGHEP1"       "IGHM"        
> pbmc=ScaleData(
+     pbmc,
+     features = t$V1)
Centering and scaling data matrix
  |================================================================================| 100%
> DoHeatmap(pbmc,t$V1,group.by = "Condition")
Warning message:
In DoHeatmap(pbmc, t$V1, group.by = "Condition") :
  The following features were omitted as they were not found in the scale.data slot for the SCT assay: IGHEP1, IGHE, IGHJ6, IGHJ5, IGHJ4, IGHJ3P, IGHJ3, IGHJ2P, IGHJ2, IGHJ1P, IGHJ1, IGHD7-27, IGHD6-25, IGHD6-19, IGHD6-13, IGHD6-6, IGHD5-24, IGHD5-18, IGHD5-12, IGHD5-5, IGHD4-23, IGHD4-17, IGHD4-11, IGHD4-4, IGHD3-22, IGHD3-16, IGHD3-10, IGHD3-9, IGHD3-3, IGHD2-21, IGHD2-15, IGHD2-8, IGHD2-2, IGHD1-26, IGHD1-20, IGHD1-14, IGHD1-7, IGHD1-1, IGHVIV-44-1, IGHVIII-82, IGHVIII-76-1, IGHVIII-67-4, IGHVIII-67-3, IGHVIII-67-2, IGHV8-51-1, IGHVIII-47-1, IGHVIII-44, IGHVIII-38-1, IGHVIII-26-1, IGHVIII-25-1, IGHVIII-22-2, IGHVIII-16-1, IGHVIII-13-1, IGHVIII-11-1, IGHVIII-5-2, IGHVIII-5-1, IGHVIII-2-1, IGHVII-78-1, IGHVII-74-1, IGHVII-67-1, IGHVII-65-1, IGHVII-62-1, IGHVII-60-1, IGHVII-53-1, IGHVII-51-2, IGHVII-49-1, IGHVII-46-1, IGHVII-44-2, IGHVII-43-1, IGHVII-40-1, IGHVII-33-1, IGHVII-31-1, IGHVII-30-21, IGHVII-30-1, IGHVII-28-1, IGHVII-26-2, IGHVII-22-1, IGHVII-20-1, IGHVII-15-1, IGHVII-1-1, IGH [... truncated]
> pbmc=ScaleData(
+     pbmc,
+     features =rownames(pbmc))
Centering and scaling data matrix
  |================================================================================| 100%
> rm(pbmc)
> pbmc=readRDS("pbmc.rds")
> pbmc=ScaleData(
+     pbmc,
+     features =rownames(pbmc))
Centering and scaling data matrix
  |================================================================================| 100%
> DoHeatmap(pbmc,t$V1,group.by = "Condition")
Warning message:
In DoHeatmap(pbmc, t$V1, group.by = "Condition") :
  The following features were omitted as they were not found in the scale.data slot for the SCT assay: IGHEP1, IGHE, IGHJ6, IGHJ5, IGHJ4, IGHJ3P, IGHJ3, IGHJ2P, IGHJ2, IGHJ1P, IGHJ1, IGHD7-27, IGHD6-25, IGHD6-19, IGHD6-13, IGHD6-6, IGHD5-24, IGHD5-18, IGHD5-12, IGHD5-5, IGHD4-23, IGHD4-17, IGHD4-11, IGHD4-4, IGHD3-22, IGHD3-16, IGHD3-10, IGHD3-9, IGHD3-3, IGHD2-21, IGHD2-15, IGHD2-8, IGHD2-2, IGHD1-26, IGHD1-20, IGHD1-14, IGHD1-7, IGHD1-1, IGHVIV-44-1, IGHVIII-82, IGHVIII-76-1, IGHVIII-67-4, IGHVIII-67-3, IGHVIII-67-2, IGHV8-51-1, IGHVIII-47-1, IGHVIII-44, IGHVIII-38-1, IGHVIII-26-1, IGHVIII-25-1, IGHVIII-22-2, IGHVIII-16-1, IGHVIII-13-1, IGHVIII-11-1, IGHVIII-5-2, IGHVIII-5-1, IGHVIII-2-1, IGHVII-78-1, IGHVII-74-1, IGHVII-67-1, IGHVII-65-1, IGHVII-62-1, IGHVII-60-1, IGHVII-53-1, IGHVII-51-2, IGHVII-49-1, IGHVII-46-1, IGHVII-44-2, IGHVII-43-1, IGHVII-40-1, IGHVII-33-1, IGHVII-31-1, IGHVII-30-21, IGHVII-30-1, IGHVII-28-1, IGHVII-26-2, IGHVII-22-1, IGHVII-20-1, IGHVII-15-1, IGHVII-1-1, IGH [... truncated]
>

**Tags:** scrnaseq, seurat, 10x-genomics, heatmap

---

## 1 answers

### Answer by username_1 on 2021-08-05. Score: 1

Specify your genes of interest using the `features` parameter of the `ScaleData()` function. If this parameter is not specified, only "variable genes" are scaled and that makes sense, genes that do not demonstrate variability across conditions is not interesting in general. Anyhow, since the `DoHeatmap()` would be looking at the "scaled data slot", it will not be able to find your genes of interest unless they show variation.

> **Comments:**
> **username_0**: Thank you. I use sctranscform, I should scale my data before or after sctransform function?  
> **username_1**: From their vignette: `Note that this single command replaces NormalizeData(), ScaleData(), and FindVariableFeatures().`  
> **username_0**: I checked sctransform with or without scale data and the results was different  
> **username_1**: 1- Please do not edit your questions extensively, these questions meant to help future users too, now the answer and the question does not match. 2- Please read documentation associated with the functions/packages you use: `SCTransform()` doc says `return.only.var.genes:  If set to TRUE the scale.data matrices in output assay are subset to contain only the variable genes; default is TRUE`. 3- Please show some effort, you will learn and develop faster if you learn by doing instead of asking questions on each step.  

---

