diff --git a/_pkgdown.yml b/_pkgdown.yml index d4fdc4e..c96e3ec 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -78,5 +78,6 @@ reference: - cal_Activity - SparseExpressionSet-class - pbmc14k_rawCount + - pbmc14k_expression.eset diff --git a/docs/articles/quick_tutorial.html b/docs/articles/quick_tutorial.html index abb5d6b..6f7ffc4 100644 --- a/docs/articles/quick_tutorial.html +++ b/docs/articles/quick_tutorial.html @@ -72,7 +72,7 @@

Qingfei Pan

-

2024-08-06

+

2024-08-14

quick_tutorial.Rmd
@@ -1201,7 +1201,7 @@

Differential activity analysis#> collate en_US.UTF-8 #> ctype en_US.UTF-8 #> tz America/Chicago -#> date 2024-08-06 +#> date 2024-08-14 #> pandoc 3.1.11 @ /Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/aarch64/ (via rmarkdown) #> #> ─ Packages ─────────────────────────────────────────────────────────────────── @@ -1263,7 +1263,7 @@

Differential activity analysis#> rstudioapi 0.16.0 2024-03-24 [1] CRAN (R 4.3.1) #> sass 0.4.9 2024-03-15 [1] CRAN (R 4.3.1) #> scales 1.3.0 2023-11-28 [1] CRAN (R 4.3.1) -#> scMINER * 1.1.0 2024-08-05 [1] local +#> scMINER * 1.1.0 2024-08-12 [1] local #> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.3.0) #> statmod 1.5.0 2023-01-06 [1] CRAN (R 4.3.0) #> stringi 1.8.4 2024-05-06 [1] CRAN (R 4.3.1) diff --git a/docs/authors.html b/docs/authors.html index 6dac4a4..95b5281 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -54,7 +54,7 @@

Authors

  • -

    Jiayu Zhou. Author, maintainer. +

    Jiayu Zhou. Author.

  • diff --git a/docs/index.html b/docs/index.html index a99b6a6..2502dc4 100644 --- a/docs/index.html +++ b/docs/index.html @@ -139,7 +139,7 @@

    Citation

    Developers

    • Qingfei Pan
      Author, maintainer
    • -
    • Jiayu Zhou
      Author, maintainer
    • +
    • Jiayu Zhou
      Author
    • Liang Ding
      Author
    • Hao Shi
      Author
    • Xinran Dong
      Author
    • diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 3f350cd..c8f94bb 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -3,7 +3,7 @@ pkgdown: 2.0.9 pkgdown_sha: ~ articles: quick_tutorial: quick_tutorial.html -last_built: 2024-08-06T21:50Z +last_built: 2024-08-14T14:47Z urls: reference: https://jyyulab.github.io/scMINER/reference article: https://jyyulab.github.io/scMINER/articles diff --git a/docs/reference/MICAplot.html b/docs/reference/MICAplot.html index f563f10..0329443 100644 --- a/docs/reference/MICAplot.html +++ b/docs/reference/MICAplot.html @@ -1,5 +1,7 @@ -Draw a scatter plot showing the coordinates and cluster id of each cell — MICAplot • scMINERDraw a scatter plot showing the coordinates and cluster id of each cell — MICAplot • scMINER @@ -49,7 +51,8 @@
      -

      This function is used to visualize the clustering results generated by MICA.

      +

      This function is used to visualize the clustering results +generated by MICA.

      @@ -82,19 +85,25 @@

      ArgumentsclusterID".

      +

      Factor, character or numeric, name of the column of MICA +cluster labels. Default: "clusterID".

      colors
      -

      A character vector or NULL, colors of the MICA cluster labels. The length of this vector should be same as the number of groups in color_by column. If NULL, the ggplot default colors will be use. Default: NULL.

      +

      A character vector or NULL, colors of the MICA cluster +labels. The length of this vector should be same as the number of groups in +color_by column. If NULL, the ggplot default colors will be use. Default: +NULL.

      do.logTransform
      -

      Logical, whether to do the log2(value + 1) transformation. Only valid when color_by is numeric Default: TRUE.

      +

      Logical, whether to do the log2(value + 1) +transformation. Only valid when color_by is numeric Default: TRUE.

      X, Y
      -

      Character, name of the columns of x-axis and y-axis coordinates. Default: "UMAP_1", and "UMAP_2".

      +

      Character, name of the columns of x-axis and y-axis coordinates. +Default: "UMAP_1", and "UMAP_2".

      point.size
      @@ -102,7 +111,8 @@

      ArgumentsArgumentsright", "left", "top", "bottom" or "none". Default: "right".

      +

      Character, position of legend: "right", "left", +"top", "bottom" or "none". Default: "right".

      fontsize.legend_title
      -

      Integer, font size of the legend title. Default: 10.

      +

      Integer, font size of the legend title. Default: +10.

      fontsize.legend_text
      -

      Integer, font size of the legend text. Default: 8.

      +

      Integer, font size of the legend text. Default: +8.

      fontsize.axis_title
      @@ -150,13 +165,21 @@

      Value

      Examples

      -
      ## 1. color-coded by factor or character variable
      -p_umap <- MICAplot(input_eset = pbmc14k_log2cpm.eset, color_by = 'clusterID', point.size = 0.1)
      -#> Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'pbmc14k_log2cpm.eset' not found
      +    
      
      +data(pbmc14k_expression.eset)
      +## 1. color-coded by factor or character variable
      +p1 <- MICAplot(input_eset = pbmc14k_expression.eset,
      +               color_by = "clusterID",
      +               X = "UMAP_1", Y = "UMAP_2",
      +               point.size = 0.1,
      +               fontsize.cluster_label = 6)
       
       ## 2. color-coded by numeric variable
      -p_umap <- MICAplot(input_eset = pbmc14k_log2cpm.eset, color_by = 'nUMI', do.logTransform = TRUE)
      -#> Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'pbmc14k_log2cpm.eset' not found
      +p2 <- MICAplot(input_eset = pbmc14k_expression.eset,
      +               color_by = "nUMI",
      +               do.logTransform = TRUE,
      +               point.size = 0.1)
      +#> The values in "nUMI" have been transformed by log2(value + 1). To turn transformation off, set do.logTransform = FALSE.
       

      diff --git a/docs/reference/createProjectSpace.html b/docs/reference/createProjectSpace.html index beb6f2d..ce38434 100644 --- a/docs/reference/createProjectSpace.html +++ b/docs/reference/createProjectSpace.html @@ -1,7 +1,11 @@ -Create a project space for scMINER analysis — createProjectSpace • scMINERCreate a project space for scMINER analysis — createProjectSpace • scMINER @@ -51,8 +55,10 @@
      -

      This function is used to create a folder of the specified project names in the specified project directory as the project space to run scMINER analysis. -It also creastes 4 subfolers inside of it: "DATA", "MICA", "SJARACNe" and "PLOT".

      +

      This function is used to create a folder of the specified +project names in the specified project directory as the project space to run +scMINER analysis. It also creastes 4 subfolers inside of it: "DATA", +"MICA", "SJARACNe" and "PLOT".

      @@ -67,25 +73,30 @@

      Arguments

      Value

      -

      It creates a folder of project name and 4 subfolders in the project directory, and returns the path of project space.

      +

      It creates a folder of project name and 4 subfolders in the project +directory, and returns the path of project space.

      Examples

      -
      createProjectSpace(project_dir = "path-to-a-folder", project_name = "PBMC14k")
      -#> Error in createProjectSpace(project_dir = "path-to-a-folder", project_name = "PBMC14k"): A folder of the specified project name was found in the specified project directory and it is not empty: path-to-a-folder/PBMC14k.
      -#> Please set do.unlink to TRUE to remove the files and subfolder in it, or use another project name.
      +    
      if (FALSE) {
      +scminer_dir <- createProjectSpace(project_dir = "path-to-a-folder",
      +                                  project_name = "PBMC14k")
      +}
      +
       
      diff --git a/docs/reference/draw_bubbleplot.html b/docs/reference/draw_bubbleplot.html index 884d93d..f6d1107 100644 --- a/docs/reference/draw_bubbleplot.html +++ b/docs/reference/draw_bubbleplot.html @@ -125,11 +125,16 @@

      Exampleshead(signature_table) #> Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'head': object 'signature_table' not found ## 1. the most commonly used command -p_bubbleplot <- draw_bubbleplot(input_eset = clustered.eset, signature_table = signature_table, group_by = "clusterID") +draw_bubbleplot(input_eset = clustered.eset, + signature_table = signature_table, + group_by = "clusterID") #> Error in eval(expr, envir, enclos): object 'signature_table' not found ## 2. customize the colors -p_bubbleplot <- draw_bubbleplot(input_eset = clustered.eset, signature_table = signature_table, group_by = "clusterID", colors = c("lightgrey", "red")) +draw_bubbleplot(input_eset = clustered.eset, + signature_table = signature_table, + group_by = "clusterID", + colors = c("lightgrey", "red")) #> Error in eval(expr, envir, enclos): object 'signature_table' not found diff --git a/docs/reference/feature_boxplot.html b/docs/reference/feature_boxplot.html index 529a42b..f980e01 100644 --- a/docs/reference/feature_boxplot.html +++ b/docs/reference/feature_boxplot.html @@ -160,23 +160,36 @@

      Value

      Examples

      ## 1. violin plots grouped by clusters (say the column name is 'clusterID')
      -p_box <- feature_boxplot(input_eset = clustered.eset, features = c("CD14", "CD19", "CD8A"), group_by = "clusterID")
      +p_box <- feature_boxplot(input_eset = clustered.eset,
      +                         features = c("CD14", "CD19", "CD8A"),
      +                         group_by = "clusterID")
       #> Error in eval(expr, envir, enclos): object 'clustered.eset' not found
       
       ## 2. violin plots grouped by cell types (say the column name is 'cellType')
      -p_box <- feature_boxplot(input_eset = clustered.eset, features = c("CD14", "CD19", "CD8A"), group_by = "cellType")
      +p_box <- feature_boxplot(input_eset = clustered.eset,
      +                         features = c("CD14", "CD19", "CD8A"),
      +                         group_by = "cellType")
       #> Error in eval(expr, envir, enclos): object 'clustered.eset' not found
       
       ## 3. customize the colors to fill the violin plots
      -p_box <- feature_boxplot(input_eset = clustered.eset, features = c("CD14", "CD19", "CD8A"), group_by = "clusterID", colors = c("blue", "red", "green"))
      +p_box <- feature_boxplot(input_eset = clustered.eset,
      +                         features = c("CD14", "CD19", "CD8A"),
      +                         group_by = "clusterID",
      +                         colors = c("blue", "red", "green"))
       #> Error in eval(expr, envir, enclos): object 'clustered.eset' not found
       
       ## 4. add jittered points
      -p_box <- feature_boxplot(input_eset = clustered.eset, features = c("CD14", "CD19", "CD8A"), group_by = "clusterID", add_jitter = TRUE, jitter.width = 0.5, jitter.size = 0.5)
      +p_box <- feature_boxplot(input_eset = clustered.eset,
      +                         features = c("CD14", "CD19", "CD8A"),
      +                         group_by = "clusterID",
      +                         add_jitter = TRUE,
      +                         jitter.width = 0.5, jitter.size = 0.5)
       #> Error in eval(expr, envir, enclos): object 'clustered.eset' not found
       
       ## 5. using activity data
      -p_box <- feature_boxplot(input_eset = activity_clustered.eset, features = c("CD14_SIG", "CD19_SIG", "CD8A_SIG"), group_by = "clusterID", ylabel_text = "Activity")
      +p_box <- feature_boxplot(input_eset = activity_clustered.eset,
      +                         features = c("CD14_SIG", "CD19_SIG", "CD8A_SIG"),
      +                         group_by = "clusterID", ylabel_text = "Activity")
       #> Error in feature_boxplot(input_eset = activity_clustered.eset, features = c("CD14_SIG",     "CD19_SIG", "CD8A_SIG"), group_by = "clusterID", ylabel_text = "Activity"): unused argument (ylabel_text = "Activity")
       
      diff --git a/docs/reference/feature_bubbleplot.html b/docs/reference/feature_bubbleplot.html index 37257b0..ca40b3a 100644 --- a/docs/reference/feature_bubbleplot.html +++ b/docs/reference/feature_bubbleplot.html @@ -121,11 +121,16 @@

      Value

      Examples
  • features_of_interest <- c("CD3D","CD27","IL7R","SELL","CCR7","IL32","GZMA","GZMK","DUSP2","CD8A","GZMH","GZMB","CD79A","CD79B","CD86","CD14")
     ## 1. the most commonly used command
    -p_bubble <- feature_bubbleplot(input_eset = clustered.eset, features = features_of_interest, group_by = "clusterID")
    +feature_bubbleplot(input_eset = clustered.eset,
    +                   features = features_of_interest,
    +                   group_by = "clusterID")
     #> Error in eval(expr, envir, enclos): object 'clustered.eset' not found
     
     ## 2. customize the colors
    -p_bubble <- feature_bubbleplot(input_eset = clustered.eset, features = features_of_interest, group_by = "clusterID", colors = c("lightgrey", "red"))
    +feature_bubbleplot(input_eset = clustered.eset,
    +                   features = features_of_interest,
    +                   group_by = "clusterID",
    +                   colors = c("lightgrey", "red"))
     #> Error in eval(expr, envir, enclos): object 'clustered.eset' not found
     
    diff --git a/docs/reference/feature_heatmap.html b/docs/reference/feature_heatmap.html index 61b38f8..3440735 100644 --- a/docs/reference/feature_heatmap.html +++ b/docs/reference/feature_heatmap.html @@ -121,23 +121,38 @@

    Value

    Examples

    features_of_interest <- c("CD3D","CD27","IL7R","SELL","CCR7","IL32","GZMA","GZMK","DUSP2","CD8A","GZMH","GZMB","CD79A","CD79B","CD86","CD14")
     ## 1. the most commonly used command
    -feature_heatmap(input_eset = clustered.eset, features = features_of_interest, group_by = "clusterID")
    +feature_heatmap(input_eset = clustered.eset,
    +                features = features_of_interest,
    +                group_by = "clusterID")
     #> Error in eval(expr, envir, enclos): object 'clustered.eset' not found
     
     ## 2. add one more column ('true_label') for cell annotation
    -feature_heatmap(input_eset = clustered.eset, features = features_of_interest, group_by = "clusterID", annotation_columns = c("true_label"))
    +feature_heatmap(input_eset = clustered.eset,
    +                features = features_of_interest,
    +                group_by = "clusterID",
    +                annotation_columns = c("true_label"))
     #> Error in eval(expr, envir, enclos): object 'clustered.eset' not found
     
     ## 3. scale the data by row
    -feature_heatmap(input_eset = clustered.eset, features = features_of_interest, group_by = "clusterID", scale_method = "row")
    +feature_heatmap(input_eset = clustered.eset,
    +                features = features_of_interest,
    +                group_by = "clusterID",
    +                scale_method = "row")
     #> Error in eval(expr, envir, enclos): object 'clustered.eset' not found
     
     ## 4. cluster the rows
    -feature_heatmap(input_eset = clustered.eset, features = features_of_interest, group_by = "clusterID", cluster_rows = TRUE)
    +feature_heatmap(input_eset = clustered.eset,
    +                features = features_of_interest,
    +                group_by = "clusterID",
    +                cluster_rows = TRUE)
     #> Error in eval(expr, envir, enclos): object 'clustered.eset' not found
     
     ## 5. add gaps
    -feature_heatmap(input_eset = clustered.eset, features = features_of_interest, group_by = "clusterID", use_gaps.column = TRUE, use_gaps.row = TRUE)
    +feature_heatmap(input_eset = clustered.eset,
    +                features = features_of_interest,
    +                group_by = "clusterID",
    +                use_gaps.column = TRUE,
    +                use_gaps.row = TRUE)
     #> Error in eval(expr, envir, enclos): object 'clustered.eset' not found
     
    diff --git a/docs/reference/feature_scatterplot.html b/docs/reference/feature_scatterplot.html index da8997f..1aa1a55 100644 --- a/docs/reference/feature_scatterplot.html +++ b/docs/reference/feature_scatterplot.html @@ -145,15 +145,23 @@

    Value

    Examples

    ## 1. scatter plots with UMAP projections
    -p_scatter <- feature_scatterplot(input_eset = clustered.eset, features = c("CD14", "CD19", "CD8A"), location_x = "UMAP_1", location_y = "UMAP_2")
    +feature_scatterplot(input_eset = clustered.eset,
    +                    features = c("CD14", "CD19", "CD8A"),
    +                    location_x = "UMAP_1", location_y = "UMAP_2")
     #> Error in eval(expr, envir, enclos): object 'clustered.eset' not found
     
     ## 2. scatter plots with t-SNE projections
    -p_scatter <- feature_scatterplot(input_eset = clustered.eset, features = c("CD14", "CD19", "CD8A"), location_x = "tSNE_1", location_y = "tSNE_2")
    +feature_scatterplot(input_eset = clustered.eset,
    +                    features = c("CD14", "CD19", "CD8A"),
    +                    location_x = "tSNE_1", location_y = "tSNE_2")
     #> Error in eval(expr, envir, enclos): object 'clustered.eset' not found
     
     ## 3. change the point size and font size
    -p_scatter <- feature_scatterplot(input_eset = clustered.eset, features = c("CD14", "CD19", "CD8A"), location_x = "UMAP_1", location_y = "UMAP_2", point.size = 1, fontsize.strip = 12, fontsize.axis = 10)
    +feature_scatterplot(input_eset = clustered.eset,
    +                    features = c("CD14", "CD19", "CD8A"),
    +                    location_x = "UMAP_1", location_y = "UMAP_2",
    +                    point.size = 1,
    +                    fontsize.strip = 12, fontsize.axis = 10)
     #> Error in feature_scatterplot(input_eset = clustered.eset, features = c("CD14",     "CD19", "CD8A"), location_x = "UMAP_1", location_y = "UMAP_2",     point.size = 1, fontsize.strip = 12, fontsize.axis = 10): argument 7 matches multiple formal arguments
     
    diff --git a/docs/reference/feature_vlnplot.html b/docs/reference/feature_vlnplot.html index 6200ab7..0a030aa 100644 --- a/docs/reference/feature_vlnplot.html +++ b/docs/reference/feature_vlnplot.html @@ -179,24 +179,34 @@

    Value

    Examples

    -
    ## 1. violin plots grouped by clusters (say the column name is 'clusterID')
    -p_vln <- feature_vlnplot(input_eset = clustered.eset, features = c("CD14", "CD19", "CD8A"), group_by = "clusterID")
    -#> Error in eval(expr, envir, enclos): object 'clustered.eset' not found
    +    
    data(pbmc14k_expression.eset)
    +
    +## 1. violin plots grouped by clusters (say the column name is 'clusterID')
    +p_vln <- feature_vlnplot(input_eset = pbmc14k_expression.eset,
    +                         features = c("CD14", "CD19", "CD8A"),
    +                         group_by = "clusterID")
     
     ## 2. violin plots grouped by cell types (say the column name is 'cellType')
    -p_vln <- feature_vlnplot(input_eset = clustered.eset, features = c("CD14", "CD19", "CD8A"), group_by = "cellType")
    -#> Error in eval(expr, envir, enclos): object 'clustered.eset' not found
    +p_vln <- feature_vlnplot(input_eset = pbmc14k_expression.eset,
    +                         features = c("CD14", "CD19", "CD8A"),
    +                         group_by = "cellType")
     
     ## 3. customize the colors to fill the violin plots
    -p_vln <- feature_vlnplot(input_eset = clustered.eset, features = c("CD14", "CD19", "CD8A"), group_by = "clusterID", colors = c("blue", "red", "green"))
    -#> Error in eval(expr, envir, enclos): object 'clustered.eset' not found
    +p_vln <- feature_vlnplot(input_eset = pbmc14k_expression.eset,
    +                         features = c("CD14", "CD19", "CD8A"),
    +                         group_by = "clusterID",
    +                         colors = c("blue", "red", "green"))
     
     ## 4. add jittered points
    -p_vln <- feature_vlnplot(input_eset = clustered.eset, features = c("CD14", "CD19", "CD8A"), group_by = "clusterID", add_jitter = TRUE, jitter.width = 0.5, jitter.size = 0.5)
    -#> Error in eval(expr, envir, enclos): object 'clustered.eset' not found
    +p_vln <- feature_vlnplot(input_eset = pbmc14k_expression.eset,
    +                         features = c("CD14", "CD19", "CD8A"),
    +                         group_by = "clusterID",
    +                         add_jitter = TRUE, jitter.width = 0.5, jitter.size = 0.5)
     
     ## 5. using activity data
    -p_vln <- feature_vlnplot(input_eset = activity_clustered.eset, features = c("CD14_SIG", "CD19_SIG", "CD8A_SIG"), group_by = "clusterID", ylabel_text = "Activity")
    +p_vln <- feature_vlnplot(input_eset = activity_clustered.eset,
    +                         features = c("CD14_SIG", "CD19_SIG", "CD8A_SIG"),
    +                         group_by = "clusterID", ylabel_text = "Activity")
     #> Error in feature_vlnplot(input_eset = activity_clustered.eset, features = c("CD14_SIG",     "CD19_SIG", "CD8A_SIG"), group_by = "clusterID", ylabel_text = "Activity"): unused argument (ylabel_text = "Activity")
     
    diff --git a/docs/reference/filterSparseEset.html b/docs/reference/filterSparseEset.html index 838066d..359b03d 100644 --- a/docs/reference/filterSparseEset.html +++ b/docs/reference/filterSparseEset.html @@ -146,12 +146,21 @@

    Value

    Examples

    -
    filtered.eset <- filterSparseEset(raw.eset) ## filter the input eset using the cutoffs calculated by scMINER.
    +    
    ## 1. using the cutoffs automatically calculated by scMINER
    +pbmc14k_filtered.eset <- filterSparseEset(pbmc14k_raw.eset, filter_mode = "auto", filter_type = "both")
     #> Checking the availability of the 5 metrics ('nCell', 'nUMI', 'nFeature', 'pctMito', 'pctSpikeIn') used for filtration ...
    -#> Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'fData': object 'raw.eset' not found
    -filtered.eset <- filterSparseEset(raw.eset, gene.nCell_min = 10, cell.nUMI_min = 500, cell.nFeature_min = 100, cell.nFeature_max = 5000, cell.pctMito_max = 0.15)
    +#> Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'fData': object 'pbmc14k_raw.eset' not found
    +
    +## 2. using the cutoffs manually specified
    +pbmc14k_filtered_manual.eset <- filterSparseEset(pbmc14k_raw.eset, filter_mode = "manual", filter_type = "both",
    +                                                 gene.nCell_min = 10,
    +                                                 cell.nUMI_min = 500,
    +                                                 cell.nUMI_max = 6500,
    +                                                 cell.nFeature_min = 200,
    +                                                 cell.nFeature_max = 2500,
    +                                                 cell.pctMito_max = 0.1)
     #> Checking the availability of the 5 metrics ('nCell', 'nUMI', 'nFeature', 'pctMito', 'pctSpikeIn') used for filtration ...
    -#> Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'fData': object 'raw.eset' not found
    +#> Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'fData': object 'pbmc14k_raw.eset' not found