Skip to content

Commit

Permalink
Minor fix to seurat subset and updates to cellranger import documenta…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
irzamsarfraz committed Sep 25, 2023
1 parent 62f05a6 commit b234d13
Show file tree
Hide file tree
Showing 8 changed files with 220 additions and 214 deletions.
3 changes: 2 additions & 1 deletion R/seuratFunctions.R
Original file line number Diff line number Diff line change
Expand Up @@ -1400,7 +1400,7 @@ convertSCEToSeurat <-
inSCE@metadata$seurat$obj@reductions$umap
}
if (!is.null(inSCE@metadata$seurat$obj@meta.data)) {
seuratObject@meta.data <- inSCE@metadata$seurat$obj@meta.data
seuratObject@meta.data <- inSCE@metadata$seurat$obj@meta.data[match(colnames(seuratObject), rownames(inSCE@metadata$seurat$obj@meta.data)),]
}
if (!is.null(inSCE@metadata$seurat$obj@commands)) {
seuratObject@commands <- inSCE@metadata$seurat$obj@commands
Expand Down Expand Up @@ -1461,6 +1461,7 @@ convertSCEToSeurat <-
}

# Ensuring that colnames from input SCE converted to Seurat object are same in the Seurat metadata slot
seuratObject@meta.data <- seuratObject@meta.data[colnames(seuratObject),]
rownames(seuratObject@meta.data) <- colnames(seuratObject)

return(seuratObject)
Expand Down
Binary file modified docs/articles/ui_screenshots/import/import_ui_cellRanger.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions man/getTopHVG.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/reportQCTool.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions man/subDiffEx.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 15 additions & 6 deletions vignettes/articles/01_import_and_qc_tutorial.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,23 @@ SCTK allows importing dataset from various type of sources, such as preprocessin

After starting the UI, the landing page will be for importing the scRNAseq data. To import the PBMC3K dataset previously mentioned, users should follow these steps:

![import](ui_screenshots/ui_tutorial/import.png)\
![import](ui_screenshots/ui_tutorial/import_1.png)\

1. In collapse box **"1. Add sample to import"**, check the radio button **"Import example datasets"**.
2. After step 1, a selection will shown for choosing example datasets. Here we select the default option "PBMC 3K (10X)".
3. Click on button **"Add To Sample List"**. At this point, the second collapse box **"2. Create dataset"** will automatically pop up.
4. In collapse box **"2. Create dataset"**, click on button **"Import"**, to start loading the dataset.
1. If you are not already at the starting import page, you start by going to the **Data** tab and selecting the **Import Single Cell Data** option (2).

![import](ui_screenshots/ui_tutorial/import2.png)\
![import](ui_screenshots/ui_tutorial/import_2.png)\

3. Select the relevant way to import data. For the purpose of this example, we use pbmc3k filtered raw data using the **CellRanger** option. This data can be downloaded from [here](https://cf.10xgenomics.com/samples/cell/pbmc3k/pbmc3k_filtered_gene_bc_matrices.tar.gz).

![import](ui_screenshots/ui_tutorial/import_3.png)\

4. In the appropriate input boxes, we select the matrix, feature and barcode files and upload each sample individually by giving a unique sample name (5).

![import](ui_screenshots/ui_tutorial/import_4.png)\

6. Now either **import** samples or **Add one more sample**. You can keep adding more samples until all samples have been added and then finally import all of them together.

![import](ui_screenshots/ui_tutorial/import_5.png)\

After successfully importing, the third collapse box will pop up and show users the basic summary stats of the imported dataset. Meanwhile, users can set feature display options here. Most of the time, the dataset has default feature ID (usually seen as row names of a matrix) together with other types of ID (e.g. symbol) in the feature metadata. The first option **"Set feature ID"** sets the type of default feature ID, which should be unique and has no `NA` value. The second option **"Set feature names to be displayed in downstream visualization"** does what it says. When we need to show features on a plot, such as a heatmap or a volcano plot, usually it is better to show gene symbols rather than ensembl IDs.

Expand Down
2 changes: 1 addition & 1 deletion vignettes/articles/import_data.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ The preprocessing tools that SCTK supports are circled in the screenshot above a
<summary><b>Cell Ranger</b></summary>
````

The import procedure for Cell Ranger versions 2 and 3 are the same. To import a Cell Ranger sample, the user must select how they would like to import the sample: select a base directory that holds multiple sample directories, select a single sample directory, or select a directory holding the data files for a sample. Depending on this selection, the user must then provide the apprpriate directory paths and sample names and then click "OK."
The import procedure for Cell Ranger versions 2 and 3 are the same. Users must select the appropriate files (matrix, barcode and feature files) and upload them for each sample separately. Once all samples are uploaded, click on **Import** button to import them for downstream use.

![cell ranger](ui_screenshots/import/import_ui_cellRanger.png)\

Expand Down
388 changes: 192 additions & 196 deletions vignettes/singleCellTK.html

Large diffs are not rendered by default.

0 comments on commit b234d13

Please sign in to comment.