SpotFiles



SpotFiles 3.0.13 Size: 1.05 MB. SpotFiles is an advanced tool for files searching. Does not use Spotlight engine. File Attributes Viewer. Directory Snapshot and Comparison. Version 3.0.13: Minor corrections. Improvement of filters. The recommended method to read the files into R is via the creation of a “infoTable”, which is a table with at least three columns “samples”, “spotfiles” and “imgs”. Test data is provided: infoTable.

Last updated: 2020-10-06

Checks: 7 0

Knit directory:STUtility_web_site/

This reproducible R Markdown analysis was created with workflowr (version 1.6.2). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.

Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20191031) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version 36493b2. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.

Spotiflex

These are the previous versions of the repository in which changes were made to the R Markdown (analysis/Quality_Control.Rmd) and HTML (docs/Quality_Control.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

FileVersionAuthorDateMessage
htmld13dabdLudvig Larsson2020-06-05Build site.
html60407bbLudvig Larsson2020-06-05Build site.
htmle339ebcLudvig Larsson2020-06-05Build site.
html6606127Ludvig Larsson2020-06-05Build site.
htmlf0ea9c1Ludvig Larsson2020-06-05Build site.
html651f315Ludvig Larsson2020-06-05Build site.
htmla6a0c51Ludvig Larsson2020-06-05Build site.
htmlf3c5cb4Ludvig Larsson2020-06-05Build site.
htmlf89df7eLudvig Larsson2020-06-05Build site.
html1e67a7cLudvig Larsson2020-06-04Build site.
htmlf71b0c0Ludvig Larsson2020-06-04Build site.
Rmd90a45ccLudvig Larsson2020-06-04Fixed dataset in Load data
html8a54a4dLudvig Larsson2020-06-04Build site.
html5e466ebLudvig Larsson2020-06-04Build site.
Rmd4819d2bLudvig Larsson2020-06-04update website
html377408dLudvig Larsson2020-06-04Build site.
htmled54ffbLudvig Larsson2020-06-04Build site.
htmlf14518cLudvig Larsson2020-06-04Build site.
htmlefd885bLudvig Larsson2020-06-04Build site.
html4f42429Ludvig Larsson2020-06-04Build site.
Rmd3660612Ludvig Larsson2020-06-04update website

Spot Files Mac

Quality Control

Here we’ll go through some basic steps to assess the quality of your data and how to apply filters to remove low abundant genes and poor quality spots.

Include all spots

If you expect that you have over-permeabilized your tissue it could be useful to look at the expression patterns outside the tissue region as well. This can be done by loading the

Here we have a new infotable data.frame where the file paths in the “samples” column have been set to the '*raw_feature_bc_matrix.h5' matrrices instead of the filtered ones. Now we can load all spots into our Seurat object by setting disable.subset = TRUE.

The tissue borders are quite easy to see in the plot but you can also see that there have been transcripts captured also outside of the tissue. During library preparation, transcripts can diffuse out into the solution and end up anywhere outside the tissue but we can know from the TO experiments that the transcripts captured under the tissue form a cDNA footprint that accurately reflects the tissue morphology and that the transcripts have diffused vertically from the cells in the tissue down onto the capture area surface.

It can be good to keep this in mind when you see that you have holes in your tissue with no cells. You might detect quite a lot of transcripts in such holes and it is therefore important to carefully remove spots that are not covered by cells. If the automatic tissue detection algorithm run by spaceranger fails to find such holes, it could be a good idea to manually remove them using Loupe Browser before running spaceranger.

VersionAuthorDate
f71b0c0Ludvig Larsson2020-06-04
4f42429Ludvig Larsson2020-06-04

Now let’s load the data with the subsetting enabled. Here we can use wither the raw matrices or the filtered matrices as long as we have spotfiles available in our infoTable data.frame which will be used to select the spots under tissue.

Sometimes it can be a good idea to filter the data to remove low quality spots or low abundant genes. When running InputFromTable, spots with 0 counts will automatically be removed but you also have the option to filter the data directly using one of the following arguments:

  • min.gene.count : sets a threshold for the minimum allowed UMI counts of a gene across the whole dataset
  • min.gene.spots : sets a threshold for the minimum allowed number of spots where a gene is detected cross the whole dataset
  • min.spot.feature.count : sets a threshold for the minimum allowed number of unique genes in a spot
  • min.spot.count : sets a threshold for the minimum allowed UMI counts in a spot
  • topN : subset the expression matrix to include only the topN most expressed genes

You can also apply filters when the Seurat obect has been created which gives you more freedom to explore what could be a good threshold. Below we have plotted some basic features that you can use to define your filtering thresholds when running InputFromTable.

VersionAuthorDate
f71b0c0Ludvig Larsson2020-06-04
4f42429Ludvig Larsson2020-06-04

Filter out spots

Let’s say that we want to remove all spots with fewer than 500 unique genes we can simply subset the using the SubsetSTData function and an expression.

NOTE: The Seurat package provides a subset method for Seurat objects but unfotunately this method will not work when using STUtility.

Mitochondrial content

It can also be useful to explore other features of the dataset to use for filtering, for example mitochondrial transcript content or ribosomal protein coding transcript content. Mitochondrial genes are prefixed with “mt-” in MGI nomenclature so we can collect these genes and then calculate the percentage of mitochondrial content per spot and add this information to our meta.data.

VersionAuthorDate
f71b0c0Ludvig Larsson2020-06-04
4f42429Ludvig Larsson2020-06-04
VersionAuthorDate
f71b0c0Ludvig Larsson2020-06-04
4f42429Ludvig Larsson2020-06-04

Spotiflex

We can also combine different thresholds to filter the data. Let’s say that we want to remove all spots with fewer than 500 unique genes and also spots with a high mitochondrial transcript content (>30%).

Removing genes

If you have good reson to remove a certain type of gene, this can also be done quite easily as well. For example, you might want to keep only protein coding genes in your dataset. Here we demonstrate how to subset a Seurat object to include only protein coding genes using our predefined covnersion table, but you could also get this information elsewhere, e.g. bioMart.

A work by Joseph Bergenstråhle and Ludvig Larsson

Spotfire Help

Fractal explorer spot files

Spotfiles