plot_reduced {scGPS} | R Documentation

## plot reduced data

### Description

plot PCA, tSNE, and CIDR reduced datasets

### Usage

    plot_reduced(
      reduced_dat,
      color_fac = NULL,
      dims = c(1, 2),
      dimNames = c("Dim1", "Dim2"),
      palletes = NULL,
      legend_title = "Cluster"
    )

### Arguments

`reduced_dat` | is a matrix with genes in rows and cells in columns
`color_fac` | is a vector of colors corresponding to clusters to determine colors of scattered plots
`dims` | an integer of the number of dimestions
`dimNames` | a vector of the names of the dimensions
`palletes` | can be a customised color pallete that determine colors for density plots, if NULL it will use RColorBrewer colorRampPalette(RColorBrewer::brewer.pal(sample_num, 'Set1'))(sample_num)
`legend_title` | title of the plot's legend

### Value

a matrix with the top 20 CIDR dimensions

### Examples

    day2 <- day_2_cardio_cell_sample
    mixedpop1 <-new_scGPS_object(ExpressionMatrix = day2$dat2_counts,
        GeneMetadata = day2$dat2geneInfo, CellMetadata = day2$dat2_clusters)
    #CIDR_dim <-CIDR(expression.matrix=assay(mixedpop1))
    #p <- plot_reduced(CIDR_dim, color_fac = factor(colData(mixedpop1)[,1]),
    #     palletes = seq_len(length(unique(colData(mixedpop1)[,1]))))
    #plot(p)
    tSNE_dim <-tSNE(expression.mat=assay(mixedpop1))
    p2 <- plot_reduced(tSNE_dim, color_fac = factor(colData(mixedpop1)[,1]),
        palletes = seq_len(length(unique(colData(mixedpop1)[,1]))))
    plot(p2)

[Package scGPS version 1.8.0 Index]