Skip to main content
added 49 characters in body
Source Link
fra
  • 577
  • 2
  • 7

HaveI am not sure if it's a v3 or also v2 thing, but have you tried by setting group.by and label?

From ?Seurat::DoHeatmap:

group.by   A vector of variables to group cells by; pass 'ident' to group by cell identity classes
label      Label the cell identies above the color bar

If you prefer external tools, you can use pheatmap and setting annotation_col e annotation_colors.

First define a data.frame (df) containing the data you want in the bar (clusters in your case)

Description Condition
liver       Tumour
lung        Normal

Then you have to assign the colours

anno <- as.data.frame(df)
anno_colori <- list(
   Condition = c(Normal = '#FFC000', Tumour = '#0070C0'),
   Description = c(liver = '#D55E00', lung = '#66CC99')
)

pheatmap(mat,
     annotation_col = anno,
     annotation_colors = anno_colori,
)

The code above will add 2 bars on the top of your heatmap, one for Condition and another for Description.

Have you tried by setting group.by and label?

From ?Seurat::DoHeatmap:

group.by   A vector of variables to group cells by; pass 'ident' to group by cell identity classes
label      Label the cell identies above the color bar

If you prefer external tools, you can use pheatmap and setting annotation_col e annotation_colors.

First define a data.frame (df) containing the data you want in the bar (clusters in your case)

Description Condition
liver       Tumour
lung        Normal

Then you have to assign the colours

anno <- as.data.frame(df)
anno_colori <- list(
   Condition = c(Normal = '#FFC000', Tumour = '#0070C0'),
   Description = c(liver = '#D55E00', lung = '#66CC99')
)

pheatmap(mat,
     annotation_col = anno,
     annotation_colors = anno_colori,
)

The code above will add 2 bars on the top of your heatmap, one for Condition and another for Description.

I am not sure if it's a v3 or also v2 thing, but have you tried by setting group.by and label?

From ?Seurat::DoHeatmap:

group.by   A vector of variables to group cells by; pass 'ident' to group by cell identity classes
label      Label the cell identies above the color bar

If you prefer external tools, you can use pheatmap and setting annotation_col e annotation_colors.

First define a data.frame (df) containing the data you want in the bar (clusters in your case)

Description Condition
liver       Tumour
lung        Normal

Then you have to assign the colours

anno <- as.data.frame(df)
anno_colori <- list(
   Condition = c(Normal = '#FFC000', Tumour = '#0070C0'),
   Description = c(liver = '#D55E00', lung = '#66CC99')
)

pheatmap(mat,
     annotation_col = anno,
     annotation_colors = anno_colori,
)

The code above will add 2 bars on the top of your heatmap, one for Condition and another for Description.

added 9 characters in body
Source Link
fra
  • 577
  • 2
  • 7

Have you tried by setting group.by and label?

From ?Seurat::DoHeatmap:

group.by   A vector of variables to group cells by; pass 'ident' to group by cell identity classes
label      Label the cell identies above the color bar

If you prefer external tools, you can use pheatmap and setting annotation_col e annotation_colors.

First define a data.frame (df) containing the data you want in the bar (clusters in your case)

Description Condition
liver       Tumour
lung        Normal

Then you have to assign the colours

anno <- as.data.frame(df)
anno_colori <- list(
   Condition = c(NTNormal = '#FFC000', TTumour = '#0070C0'),
   Description = c(liver = '#D55E00', lung = '#66CC99')
)

pheatmap(mat,
     annotation_col = anno,
     annotation_colors = anno_colori,
)

The code above will add 2 bars on the top of your heatmap, one for Condition and another for Description.

Have you tried by setting group.by and label?

From ?Seurat::DoHeatmap:

group.by   A vector of variables to group cells by; pass 'ident' to group by cell identity classes
label      Label the cell identies above the color bar

If you prefer external tools, you can use pheatmap and setting annotation_col e annotation_colors.

First define a data.frame (df) containing the data you want in the bar (clusters in your case)

Description Condition
liver       Tumour
lung        Normal

Then you have to assign the colours

anno <- as.data.frame(df)
anno_colori <- list(
   Condition = c(NT = '#FFC000', T = '#0070C0'),
   Description = c(liver = '#D55E00', lung = '#66CC99')
)

pheatmap(mat,
     annotation_col = anno,
     annotation_colors = anno_colori,
)

The code above will add 2 bars on the top of your heatmap, one for Condition and another for Description.

Have you tried by setting group.by and label?

From ?Seurat::DoHeatmap:

group.by   A vector of variables to group cells by; pass 'ident' to group by cell identity classes
label      Label the cell identies above the color bar

If you prefer external tools, you can use pheatmap and setting annotation_col e annotation_colors.

First define a data.frame (df) containing the data you want in the bar (clusters in your case)

Description Condition
liver       Tumour
lung        Normal

Then you have to assign the colours

anno <- as.data.frame(df)
anno_colori <- list(
   Condition = c(Normal = '#FFC000', Tumour = '#0070C0'),
   Description = c(liver = '#D55E00', lung = '#66CC99')
)

pheatmap(mat,
     annotation_col = anno,
     annotation_colors = anno_colori,
)

The code above will add 2 bars on the top of your heatmap, one for Condition and another for Description.

Source Link
fra
  • 577
  • 2
  • 7

Have you tried by setting group.by and label?

From ?Seurat::DoHeatmap:

group.by   A vector of variables to group cells by; pass 'ident' to group by cell identity classes
label      Label the cell identies above the color bar

If you prefer external tools, you can use pheatmap and setting annotation_col e annotation_colors.

First define a data.frame (df) containing the data you want in the bar (clusters in your case)

Description Condition
liver       Tumour
lung        Normal

Then you have to assign the colours

anno <- as.data.frame(df)
anno_colori <- list(
   Condition = c(NT = '#FFC000', T = '#0070C0'),
   Description = c(liver = '#D55E00', lung = '#66CC99')
)

pheatmap(mat,
     annotation_col = anno,
     annotation_colors = anno_colori,
)

The code above will add 2 bars on the top of your heatmap, one for Condition and another for Description.