text:
# In HelenaLC/ddSingleCell: Multi-sample multi-group scRNA-seq data analysis tools

library(BiocStyle)
library(cowplot)

For details on the concept and technicalities of DS analysis, and the methods presented here, consider having a look at our publication:

Crowell HL, Soneson C*, Germain P-L*, Calini D,
Collin L, Raposo C, Malhotra D, and Robinson MD:
muscat detects subpopulation-specific state transitions from
multi-sample multi-condition single-cell transcriptomics data.
Nature Communications 11, 6077 (2020).
DOI: 10.1038/s41467-020-19894-4

library(dplyr)
library(ggplot2)
library(limma)
library(muscat)
library(purrr)

# Introduction

## What is DS analysis?

A fundamental task in the analysis of single-cell RNA-sequencing (scRNA-seq) data is the identification of systematic transcriptional changes [@Stegle2015]. Such analyses are a critical step in the understanding of molecular responses, and have applications in development, in perturbation studies or in disease.
Most of the current scRNA-seq differential expression (DE) analysis methods are designed to test one set of cells against another (or more generally, multiple sets together), and can be used to compare cell clusters (e.g., for identifying marker genes) or across conditions (cells from one condition versus another) [@Soneson2018]. In such statistical models, the cells are the experimental units and thus represent the population that inferences will extrapolate to.

Using established terminology, we refer to cell identity as the combination of cell type, a stable molecular signature, and cell state, a transient snapshot of a cell's molecular events [@Wagner2016; @Trapnell2015]. This classification is inherently arbitrary, but still provides a basis for biological interpretation and a framework for discovering interesting expression patterns from scRNA-seq datasets. For example, T cells could be defined as a single (albeit diverse) cell type or could be divided into discrete subtypes, if relevant information to categorize each cell at this level were available. In either case, the framework presented here would be able to focus on the cell type of interest and look for changes (in expression) across samples.
Given the emergence of multi-sample multi-group scRNA-seq datasets, the goal becomes making sample-level inferences (i.e., experimental units are samples). Thus, differential state (DS) analysis is defined as following a given cell type across a set of samples (e.g., individuals) and experimental conditions (e.g., treatments), in order to identify cell-type-specific responses, i.e., changes in cell state. DS analysis: i) should be able to detect diluted changes that only affect a single cell type, a subset of cell types or even a subset of a single subpopulation; and, ii) is intended to be orthogonal to clustering or cell type assignment.

## Starting point

The starting point for a DS analysis is a (sparse) matrix of gene expression, either as counts or some kind of normalized data, where rows = genes and columns = cells. Each cell additionally has a cluster (subpopulation) label as well as a sample label; metadata should accompany the list of samples, such that they can be organized into comparable groups with sample-level replicates (e.g., via a design matrix).

The approach presented here is modular and thus subpopulation labels could originate from an earlier step in the analysis, such as clustering [@Duo2018; @Freytag2018-clustering], perhaps after integration [@Butler2018-Seurat; @Stuart2019] or after labeling of clusters [@Diaz-Mejia2019] or after cell-level type assignment [@Zhang2019].

# Getting started

## Data description

For this vignette, we will use a r Biocpkg("SingleCellExperiment") (SCE) containing 10x droplet-based scRNA-seq PBCM data from 8 Lupus patients obtained befor and after 6h-treatment with IFN-$\beta$ [@Kang2018-demuxlet]. The complete raw data, as well as gene and cell metadata is available through the NCBI GEO, accession number GSE96583.

The @Kang2018-demuxlet dataset has been made available through Biocondcutor's ExperimentHub and can be loaded into R as follows: We first initialize a Hub instance to search for and load available data with the ExperimentHub function, and store the complete list of records in the variable eh. Using query, we then retrieve any records that match our keyword(s) of interest, as well as their corresponding accession ID (EH1234).

library(ExperimentHub)
eh <- ExperimentHub()
query(eh, "Kang")

Finally, we load the data of interest into R via [[ and the corresponding accession ID. The dataset contains >35,000 genes and ~29,000 cells:

(sce <- eh[["EH2259"]])

## Preprocessing

The r Biocpkg("scater") package [@McCarthy2017-scater] provides a variety of tools for preprocessing and quality control of single-cell transcriptomic data. For completeness, we will apply some minimal filtering steps to

• remove undetected genes
• remove cells with very few or many detected genes
• remove very lowly expressed genes
• compute normalized expression values for visualization

For more thorough preprocessing, we refer to the Quality control with scater vignette.

# remove undetected genes
sce <- sce[rowSums(counts(sce) > 0) > 0, ]
dim(sce)

We use perCellQCMetrics to compute various per-cell quality control metrics, and proceed with filtering cells and genes as noted above:

# calculate per-cell quality control (QC) metrics
library(scater)
qc <- perCellQCMetrics(sce)

# remove cells with few or many detected genes
ol <- isOutlier(metric = qc$detected, nmads = 2, log = TRUE) sce <- sce[, !ol] dim(sce) # remove lowly expressed genes sce <- sce[rowSums(counts(sce) > 1) >= 10, ] dim(sce)  Finally, we use logNormCounts to calculate log$_2$-transformed normalized expression values by dividing each count by its size factor, adding a pseudo-count of 1, and log-transforming[^1]. [^1]: Note that, in this workflow, expression values are used for visualization only, and that differential analyses are performed on pseudobulks (section \@ref(sec-pbDS)) or the count data directly (section \@ref(sec-mmDS)). # compute sum-factors & normalize sce <- computeLibraryFactors(sce) sce <- logNormCounts(sce)  Alternatively, expression values could be obtained via vst (variance stabilizing transformation) from the r CRANpkg("sctransform") package [@Hafemeister2019-sctransform], which returns Pearson residuals from a regularized negative binomial regression model that can be interpreted as normalized expression values: library(sctransform) assays(sce)$vstresiduals <- vst(counts(sce), verbosity = FALSE)$y  By default, r BiocStyle::Biocpkg("scater")'s functions will try to access the assay data specified via argument exprs_values (default logcounts) for e.g. visualization and dimension reduction. When an alternative assay such as the vstresiduals above should be used, it is thus necessary to explicitly specify this, for example, via runUMAP(sce, exprs_values = "vstresiduals") to compute UMAP cell embedings on the assay data compute above. ## Data preparation muscat expects a certain format of the input SCE. Specifically, the following cell metadata (colData) columns have to be provided: • "sample_id": unique sample identifiers (e.g., PeterPan_ref1, Nautilus_trt3, ...) • "cluster_id": subpopulation (cluster) assignments (e.g., T cells, monocytes, ...) • "group_id": experimental group/condition (e.g., control/treatment, healthy/diseased, ...) sce$id <- paste0(sce$stim, sce$ind)
(sce <- prepSCE(sce,
kid = "cell", # subpopulation assignments
gid = "stim",  # group IDs (ctrl/stim)
sid = "id",   # sample IDs (ctrl/stim.1234)
drop = TRUE))  # drop all other colData columns

For consistency and easy accession throughout this vignette, we will store cluster and sample IDs, as well as the number of clusters and samples into the following simple variables:

nk <- length(kids <- levels(sce$cluster_id)) ns <- length(sids <- levels(sce$sample_id))
names(kids) <- kids; names(sids) <- sids

## Data overview

### Cluster-sample sizes

As we will be aggregating measurements at the cluster-sample level, it is of particular importance to check the number of cells captured for each such instance. While aggregateData (see Section \@ref(sec-agg)) allows excluding cluster-sample combinations with less than a threshold number of cells, clusters or samples with overall very low cell-counts may be excluded from further analysis at this point already.

For the @Kang2018-demuxlet dataset, for example, one might consider removing the Dendritic cells and Megakaryocytes clusters, as these containg less than 50 cells across all samples.

# nb. of cells per cluster-sample
t(table(sce$cluster_id, sce$sample_id))

### Dimension reduction {.tabset}

The dimension reductions (DR) available within the SCE can be accessed via reducedDims from the r Biocpkg("scater") package. The data provided by @Kang2018-demuxlet already contains t-SNE coordinates; however, we can of course compute additional dimension reductions using one of r Biocpkg("scater")'s runX functions:

# compute UMAP using 1st 20 PCs
sce <- runUMAP(sce, pca = 20)

Using r Biocpkg("scater")'s plotReducedDim function, we can plot t-SNE and UMAP representations colored by cluster and group IDs, respectively. We additionaly create a small wrapper function, .plot_dr(), to improve the readability of color legends and simplify the plotting theme:

# wrapper to prettify reduced dimension plots
.plot_dr <- function(sce, dr, col)
plotReducedDim(sce, dimred = dr, colour_by = col) +
guides(fill = guide_legend(override.aes = list(alpha = 1, size = 3))) +
theme_minimal() + theme(aspect.ratio = 1)

For our dataset, the t-SNE and UMAP colored by cluster_ids show that cell-populations are well-separated from one another. IFN-$\beta$ stimulation manifests as a severe shift in the low-dimensional projection of cells when coloring by group_ids, indicating widespread, genome-scale transcriptiontal changes.

# downsample to max. 100 cells per cluster
cs_by_k <- split(colnames(sce), sce$cluster_id) cs100 <- unlist(sapply(cs_by_k, function(u) sample(u, min(length(u), 100)))) # plot t-SNE & UMAP colored by cluster & group ID for (dr in c("TSNE", "UMAP")) for (col in c("cluster_id", "group_id")) .plot_dr(sce[, cs100], dr, col)  cs_by_k <- split(colnames(sce), sce$cluster_id)
cs100 <- unlist(sapply(cs_by_k, function(u)
sample(u, min(length(u), 100))))

for (dr in c("TSNE", "UMAP")) {
cat("#### ", dr, "{-}\n")
ps <- lapply(c("cluster_id", "group_id"),
function(col) .plot_dr(sce[, cs100], dr, col = col))
assign(paste0("ps_", tolower(dr)), ps)
print(plot_grid(plotlist = ps, align = "vh", labels = c("A", "B")))
cat("\n\n")
}

# Differential State (DS) analysis

To test for state changes across conditions, we will consider two types of approaches: i) mixed models that act directly on cell-level measurements; and ii) aggregation-based methods that act on pseudobulk data. For both approaches, each gene is tested for state changes in each cluster. Thus, a total of $#(genes) \times #(clusters)$ tests will be performed per comparison of interest. The following schematic summarizes the data representation considered by cell- and sample-level approaches, respectively:

knitr::include_graphics(system.file('extdata', '1d.png', package = 'muscat'))

## Aggregation of single-cell to pseudobulk data {#sec-agg}

In order to leverage existing robust bulk RNA-seq DE frameworks, such as r Biocpkg("edgeR") [@Robinson2010-edgeR], r Biocpkg("DESeq2") [@Love2014-DESeq2], and r Biocpkg("limma") [@Ritchie2015-limma], we first aggregate measurements for each sample (in each cluster) to obtain pseudobulk data.

In general, aggregateData() will aggregate the data by the colData variables specified with argument by, and return a SingleCellExperiment containing pseudobulk data.
For DS analysis, measurements must be aggregated at the cluster-sample level (default by = c("cluster_id", "sample_id"). In this case, the returned SingleCellExperiment will contain one assay per cluster, where rows = genes and columns = samples. Arguments assay and fun specify the input data and summary statistic, respectively, to use for aggregation.
While, in principle, various combinations of input data (raw/(log-)normalized counts, CPM ect.) and summary statistics (sum, mean, median) could be applied, we here default to the sum of raw counts:

pb <- aggregateData(sce,
assay = "counts", fun = "sum",
by = c("cluster_id", "sample_id"))
# one sheet per subpopulation
assayNames(pb)
# pseudobulks for 1st subpopulation

## Pseudobulk-level MDS plot

Prior to conducting any formal testing, we can compute a multi-dimensional scaling (MDS) plot of aggregated signal to explore overall sample similarities.

pbMDS takes as input any SCE containg PB data as returned by aggregateData, and computes MDS dimensions using r Biocpkg("edgeR"). Ideally, such a representation of the data should separate both clusters and groups from one another. Vice versa, samples from the same cluster or group should cluster together.

In our MDS plot on pseudo-bulk counts (Fig. \@ref(fig:pb-mds)), we can observe that the first dimension (MDS1) clearly separates cell populations (clusters), while the second (MDS2) separates control and stimulated samples (groups). Furthermore, the two T-cell clusters fall close to each other.

(pb_mds <- pbMDS(pb))

If you're not satisfied with how the plot looks, here's an example of how to modify the ggplot-object from above in various ways:

# use very distinctive shaping of groups & change cluster colors
pb_mds <- pb_mds +
scale_shape_manual(values = c(17, 4)) +
scale_color_manual(values = RColorBrewer::brewer.pal(8, "Set2"))
# change point size & alpha
pb_mds$layers[[1]]$aes_params$size <- 5 pb_mds$layers[[1]]$aes_params$alpha <- 0.6
pb_mds

## Sample-level analysis: Pseudobulk methods {#sec-pbDS}

Once we have assembled the pseudobulk data, we can test for DS using pbDS. By default, a $\sim group_id$ model is fit, and the last coefficient of the linear model is tested to be equal to zero.

# run DS analysis
res <- pbDS(pb, verbose = FALSE)
# access results table for 1st comparison
tbl <- res$table[[1]] # one data.frame per cluster names(tbl) # view results for 1st cluster k1 <- tbl[[1]] head(format(k1[, -ncol(k1)], digits = 2))  Depening on the complexity of the experimental design (e.g., when there are more than two groups present), comparison(s) of interest may need to be specified explicitly. We can provide pbDS with a design matrix capturing the experimental design using model.matrix (package r Rpackage("stats")), and a contrast matrix that specifies our comparison of interesting using makeContrasts from the r Biocpkg("limma") package. Alternatively, the comparison(s) of interest (or a list thereof) can be specified with via coefs (see ?glmQLFTest for details). For the @Kang2018-demuxlet dataset, we want to carry out a single comparison of stimulated against control samples, thus placing "ctrl" on the right-hand side as the reference condition: # construct design & contrast matrix ei <- metadata(sce)$experiment_info
mm <- model.matrix(~ 0 + ei$group_id) dimnames(mm) <- list(ei$sample_id, levels(ei$group_id)) contrast <- makeContrasts("stim-ctrl", levels = mm) # run DS analysis pbDS(pb, design = mm, contrast = contrast)  ## Cell-level analysis: Mixed models {#sec-mmDS} Alternative to the above sample-level approach, we fit (for each gene) a mixed model (MM) to the cell-level measurement data. muscat provides implementations of MM that use 3 main approaches: 1. fitting linear mixed models (LMMs) on log-normalized data with observational weights, 2. fitting LMMs on variance-stabilized data; and, 3. fitting generalized linear mixed models (GLMMs) directly on counts In each case, a$\sim 1 + \text{group_id} + (1\,|\,\text{sample_id})$model is fit for each gene, optimizing the log-likelihood (i.e., REML = FALSE). P-values are calculated using the estimates of degrees of freedom specifying by argument df (default "Satterthwaite"). Fitting, testing and moderation are applied subpopulation-wise. For differential testing, mmDS will only consider: • subpopulations with at least n_cells cells (default 10) in at least n_samples samples (default 2) • genes with a count >= min_count (default 1) in at least min_cells (default 20) Mixed model based approaches can be run directly on cell-level measurements, and do not require prior aggregation: # 1st approach mm <- mmDS(sce, method = "dream", n_cells = 10, n_samples = 2, min_counts = 1, min_cells = 20) # 2nd & 3rd approach mm <- mmDS(sce, method = "vst", vst = "sctransform") mm <- mmDS(sce, method = "nbinom")  # Handling results ## Results filtering & overview To get a general overview of the differential testing results, we first filter them to retain hits FDR < 5\% and abs(logFC) > 1, and count the number and frequency of differential findings by cluster. Finally, we can view the top hits (lowest adj. p-value) in each cluster. # filter FDR < 5%, abs(logFC) > 1 & sort by adj. p-value tbl_fil <- lapply(tbl, function(u) { u <- dplyr::filter(u, p_adj.loc < 0.05, abs(logFC) > 1) dplyr::arrange(u, p_adj.loc) }) # nb. of DS genes & % of total by cluster n_de <- vapply(tbl_fil, nrow, numeric(1)) p_de <- format(n_de / nrow(sce) * 100, digits = 3) data.frame("#DS" = n_de, "%DS" = p_de, check.names = FALSE) # view top 2 hits in each cluster top2 <- bind_rows(lapply(tbl_fil, top_n, 2, p_adj.loc)) format(top2[, -ncol(top2)], digits = 2)  ## Calculating expression frequencies Besides filter DS results based on magnitude (logFCs) and significance (FDR), it is often worthwhile to also consider the expression frequencies of each gene, i.e., the fraction of cells that express a given gene in each sample and/or group. muscat provides wrapper, calcExprFreqs to compute cluster-sample/-group wise expression frequencies. Here, a gene is considered to be expressed when the specified measurement value (argument assay) falls above a certain threshold (argument th). Note that, assay = "counts" and th = 0 (default) amounts to the fraction of cells for which a respective gene has been detected. calcExprFreqs will return a r Biocpkg("SingleCellExperiment") object, where sheets (assays) = clusters, rows = genes, and columns = samples (and groups, if group_ids are present in the colData of the input SCE). frq <- calcExprFreqs(sce, assay = "counts", th = 0) # one sheet per cluster assayNames(frq) # expression frequencies in each # sample & group; 1st cluster t(head(assay(frq), 5))  We can use the obtained frequencies to, for instance, only retain genes that are expressed in an average of 10\% of cells in at least 1 group: gids <- levels(sce$group_id)
frq10 <- vapply(as.list(assays(frq)),
function(u) apply(u[, gids] > 0.1, 1, any),
logical(nrow(sce)))

tbl_fil2 <- lapply(kids, function(k)
dplyr::filter(tbl_fil[[k]],
gene %in% names(which(frq10[, k]))))

# nb. of DS genes & % of total by cluster
n_de <- vapply(tbl_fil2, nrow, numeric(1))
p_de <- format(n_de / nrow(sce) * 100, digits = 3)
data.frame("#DS" = n_de, "%DS" = p_de, check.names = FALSE)

## Formatting results

Especially when testing multiple contrasts or coefficients, the results returned by runDS may become very complex and unhandy for exploration or exporting. Results can be formatted using resDS, which provides two alternative modes for formatting: bind = "row"/"col".

When bind = "row", results from all comparisons will be merged vertically (analogous to do.call("rbind", ...)) into a tidy format table, with column contrast/coef specifying the comparison.

Otherwise, bind = "col", results will be merged horizontally into a single wide table where all results for a given gene and cluster are kept in one row. An identifier of the respective contrast of coefficient is then appended to the column names. This format is useful when wanting to view a specific gene's behavior across, for example, multiple treatments, but will become messy when many comparisons are included.

Expression frequencies computed with calcExprFreqs, as well as cluster-sample level avg. CPM, can be included in the results by setting frq/cpm = TRUE. Alternatively, if the former have been pre-computed, they can be supplied directly as an input to resDS (see example below).

# tidy format; attach pre-computed expression frequencies
resDS(sce, res, bind = "row", frq = frq)

# big-table (wide) format; attach CPMs
resDS(sce, res, bind = "col", cpm = TRUE)

Alternatively, if expression frequencies have not been pre-computed with calcExprFreqs, they may be added to the results table directly by specifying frq = TRUE:

# compute expression frequencies on the fly
resDS(sce, res, frq = TRUE)

# Visualizing results

## Between-cluster concordance

DS analysis aims at identifying population-specific changes in state (or expression) across conditions. In this setting, key questions of interest arise, e.g., which genes are DE in only a single (or very few) clusters? How many DE genes are shared between clusters? In summary, what is the general concordance in differential findings between clusters?

To gain an impression of the between-cluster (dis-)agreement on DE genes, we generate an UpSet-plot that visualizes the number of DE genes that are shared across or unique to certain clusters:

library(UpSetR)
de_gs_by_k <- map(tbl_fil, "gene")
upset(fromList(de_gs_by_k))

An UpSet plot as the one above tells us, for instance, that 185 genes are differential for all subpopulations; 387 across both Monocytes clusters; and 159 only in the B cells cluster.

## DR colored by expression

The code chunk generates a set of t-SNEs colored by gene expression for the top-8 DS genes. To match the affected cells to their cluster and experimental group, see the t-SNEs colored by cluster and group ID from above.

# pull top-8 DS genes across all clusters
top8 <- bind_rows(tbl_fil) %>%
pull("gene")

# for ea. gene in 'top8', plot t-SNE colored by its expression
ps <- lapply(top8, function(g)
.plot_dr(sce[, cs100], "TSNE", g) +
ggtitle(g) + theme(legend.position = "none"))

# arrange plots
plot_grid(plotlist = ps, ncol = 4, align = "vh")

## Cell-level viz.: Violin plots

For changes of high interest, we can view the cell-level expression profiles of a specific gene across samples or groups using plotExpression (r Biocpkg("scater") package). Here, we generate violin plots for the top-6 DS genes (lowest adj. p-value) in the B cells cluster[^2].

[^2]: Note that, as DS testing is done at the cluster-level, we need to subset the cells that have been assigned to the corresponding cluster for plotting.

plotExpression(sce[, sce$cluster_id == "B cells"], features = tbl_fil$B cells\$gene[seq_len(6)],
x = "sample_id", colour_by = "group_id", ncol = 3) +
guides(fill = guide_legend(override.aes = list(size = 5, alpha = 1))) +
theme(axis.text.x = element_text(angle = 45, hjust = 1))

## Sample-level viz.: Pseudobulk heatmaps

Especially when wanting to gain an overview of numerous DE testing results for many clusters, both dimension reduction and cell-level visualisations require a lot of space can become cumbersome to interpret. In this setting, it is thus recommended to visualise aggregated measures, e.g., mean expressions by cluster sample.

# top-5 DS genes per cluster
pbHeatmap(sce, res, top_n = 5)

Alternatively, pbHeatmap provides a set of options regarding which cluster(s), gene(s), and comparison to include (arguments k, g and c, respectively). For example, the following options render a heatmap visualizing the top 20 DS genes for the B cells cluster:

# top-20 DS genes for single cluster
pbHeatmap(sce, res, k = "B cells")

Similarly, we can visualize the cluster-sample means of a single gene of interest across all clusters in order to identify cell-types that are affected similarly by different experimental conditions:

# single gene across all clusters
pbHeatmap(sce, res, g = "ISG20")

# Session info {- .smaller}

sessionInfo()

# References

HelenaLC/ddSingleCell documentation built on June 23, 2022, 3:33 a.m.


text:
GMAT Math : Solving equations

Example Questions

← Previous 1 3 4 5 6 7 8

Example Question #1 : Solving Equations

If , what is the value of ?

Explanation:

First, we need to solve for  from the first equation in order to calculate the second quadratic function. To solve for , we need to subtract four on each side of the equation, then we will get

The answer for  would be , which is .

So now we can calculate the function by plugging in .

, and .

Example Question #1 : Equations

A tractor spends 5 days plowing  number of fields. How many days will it take to plow  number of fields at the same rate?

Explanation:

The equation that will be used is (rate * number of days = number of fields plowed). From the first part of the question, number of fields plowed  is calculated as:

To solve for rate both sides are divided by 5.

This rate is used for the second part of the problem. . To solve for days, both sides are divided by , which is the same as multiplying by, cancelling out the  and giving the answer of .

Example Question #1 : Equations

A 70 ft long board is sawed into two planks. One plank is 30 ft longer than the other, how long (in feet) is the shorter plank?

Explanation:

Let  = length of the short plank and  = length of the long plank.

is the length of the pre-cut board, or combined length of both planks.

Example Question #1 : Solving Equations

Solve

Explanation:

Divide both sides by 2: . We need to find two numbers that multiply to  and sum to . The numbers  and  work.

Example Question #1 : Solving Equations

If  then

Explanation:

Multiply both sides of the equation by a:

Then, solve for .

Example Question #1 : Equations

Solve for x.

not enough information

Explanation:

We need to solve for x in terms of y by isolating x.

Example Question #1401 : Problem Solving Questions

Which of the following is a solution to the equation ?

two of the answer choices are correct

two of the answer choices are correct

Explanation:

We need to plug in the answer choices and see which produce the value 4.

1. , correct

2. , incorrect

3. , correct

4. , incorrect

Therefore two of the answer choices are correct.

Example Question #1 : Solving Equations

Which is NOT a solution to the equation

Explanation:

To solve this, we need to plug the answer choices into the equation and see which choice does NOT work.  Let's go through the answer choices.

This is the correct answer.  If this had been a solution to the equation, the equation would have produced 8.

Let's let  and .  Then this ordered pair becomes

.  Any other answer choices of this form will also work.

Example Question #1 : Solving Equations

Given the equation  , if  can be any integer, how many different sets of integer solutions are there for ?

Infinitely many

Explanation:

is the same as .

For solutions sets of integers, we are able to divide it as:

When we multiply this, we notice that the constants must return 7.  Since 7 is a prime number, we now know that these constants are 1 and 7.  The signs of these can still switch however.  If both of the numbers are negative, it will also return a product of positive 7.  These are the only ways to make the constant term work.  If they are both positive numbers, then we get . If they're both negative numbers then .

For the values of , we simply notice the only way for the overall product to be 0 is for one (or both) of the pieces to be zero.  This is done by having equal the additive inverse of the constant piece.

Thus we have 2 integer solution sets: and

Example Question #1 : Equations

The volume of a fixed mass of gas varies inversely as the atmospheric pressure, as measured in millibars, acting on it, and directly as the temperature, as measured in kelvins, acting on it.

A balloon is filled to capacity at a point in time at which the atmospheric pressure is 104 millibars and the temperature is 295 kelvins. Six hours later, the temperature has increased to 305 kelvins, but the volume of the gas has not changed at all. What is the current atmospheric pressure?

The information provided is insufficient to answer this question.

Explanation:

The following variation equation can be set up:

But since the initial volume and the current volume are equal, or, equivalently,   ,

so

We substitute , and solve for :

← Previous 1 3 4 5 6 7 8

format: plain


text:
# Low Dimensional Topology

## September 23, 2008

### Degree one maps

Filed under: 3-manifolds — Jesse Johnson @ 2:15 pm

Two arXiv posts caught my attention the other day, both by Siddhartha Gadgil.  The first paper [1] shows that an embedded surface in a 3-manifold is incompressible if and only if it is isotopic to an (embedded) minimal area surface, i.e. minimal over its homotopy class, for every Riemannian metric for the 3-manifold.  This seems like a very natural result, and the paper is just six pages.

The second paper [2] is on degree one maps between 3-manifolds.  A degree one map between closed, orientable n-manifolds is a map from one into the other that induces an isomorphism of their nth homology groups (each of which are isomorphic to Z).   In dimension two, its not too hard to construct a degree one map from a given surface to any lower genus surface.  There are no degree one maps from a surface to a higher genus surface, though I don’t recall a proof that’s nice enough to explain in one sentence.  But one can think of a degree one map as indicating that the image manifold is somehow smaller or simpler than the domain manifold.

In dimension three, things are much more complicated.  One can always construct a degree one map from a closed 3-manifold into the 3-sphere.  Also, a homotopy equivalence map is degree one, so all those lens spaces with the same fundamental groups have degree one maps between them.   Determining in general when there is a degree one map from M to N (both 3-manifolds) was (as far as I know) a very difficult open problem. However, Gadgil gives is surprisingly simple solution:  He shows that there is a degree one map from M to N if and only if M can be produced from N by Dehn surgery on a link in which each component is an unknot.  The paper is, again, quite short at 11 pages, and is based on interpretting Dehn surgery in terms of 4-manifolds.  (In fact, he states a version of the main theorem in terms of 4-manifolds, but I won’t try to repeat it here.)

1. A degree one map is surjective on fundamental groups (otherwise the map would factor through a covering space), and so the rank of $\pi_1$ forbids a degree one map from a surface of genus $g$ to one of genus $h \geq g$.

Comment by Richard Kent — September 24, 2008 @ 8:44 am

2. >A degree one map is surjective on fundamental groups

Alternatively, if you have a map from lower genus to higher, there is an element A in the kernel of the induced map on first cohomology (say over Q) and so the fundamental class=A cup B (for some B, by Poincare duality) goes to zero (by naturality of cup product).

Comment by Max — September 24, 2008 @ 11:39 pm

3. A much more sophisticated property is the homotopy theoretic result of Hopf, which is th following propetry; if f and are homotopic, then d(f)=d(g)(where d is the degree map), the Hopf result is the converse of this property, i.e, if d(f)=d(g) then f and g are homotopic. Thus, the degree is a complete algebraic invariant for studying homotopy classes of maps from S^n to S^n. Moreover, for a given map f:S^n–>S^n, n>=0, there is associated a map
g:S^n+1–>S^n+1 called the suspension of f (denoted Sigma(f)). Intuitively, the idea is that the restriction to the equator S^n ic S^n+1 should be f and each slice in S^n+1 parallel to the aquator chould be mapped into the corresponding slice in the manner prescribed by f. So, we can prove that if
f:S^n–>S^n, n>=1 is a map, then d(Sigma(f))=d(f).

Comment by Hicham YAMOUL — April 21, 2010 @ 8:47 am

4. The homotopy interpretation of degree one normal maps
Let (X,Y) be a pair of finite complexes which satisfy Poincaré duality in dimension n, and (M^n,dM) an n-dimensional with boundary. a degree one normal map f:(M^n,dM)—>(X,Y) is a continuous map f so that f_*([M,dM])=[X,Y] together with a stable vector bundle $psi$ on X and a bundle isomorphism g:$eta_M$
—>f^!(psi). Now let X be an oriented Poincaré duality complex of dimension n with oriented class [X]. Suppose that f:M^n—->X^n, g:eta_M—>f^!(psi) is a degree one normal map then, since eta_M is only stably well defined, we may as well assume that we are free to modify psi by adding arbitrary copies of the trivial bundle epsilon, and that the dimension of the fibers of psi, d, is greater than n. Since the Thom space of epsilon (+)psi=SigmaT(psi) it follows that the degree one normal data gives a map S^n+p–PT–>T(eta_M)–T(g)–>t(psi) which is well defined up to suspension, and consequently gives a well defined element in the stable homotopy group lim_s–infinity pi_n+s+d(SigmaT(psi))=pi^s_n(T(psi))

Comment by Hicham YAMOUL — May 5, 2010 @ 9:26 pm

Blog at WordPress.com.


text:
Corrupt data in Sex column of .csv file
1
0
Entering edit mode
twtoal • 0
@twtoal-15473
Last seen 1 day ago
United States

The PureCN .csv output file of one of my samples has something odd in its "Sex" column. Here is the contents of the file:

"Sampleid","Purity","Ploidy","Sex","Contamination","Flagged","Failed","Curated","Comment"
"I_26837_N1_T1",0.27,2.00260700313316,"Coverage: ? VCF: M",0,TRUE,FALSE,FALSE,"LOW PURITY;EXCESSIVE LOH"

This is for PureCN version 1.16.0.

PureCN • 49 views
0
Entering edit mode

I see that the user guide says:

Sex mismatch of coverage and VCF: If the panel contains baits for chromosome Y, then the interval file was probably generated without mappability file (Section 2.2). Cross- sample contamination (Section 10.5) can also cause sex mismatches.

That doesn't say the Sex column will contain what I observe, yet the appearance of Coverage and VCF in that make me think this might be the cause.

0
Entering edit mode
@markusriester-9875
Last seen 2 days ago
United States

PureCN does two independent checks for sample sex. If they agree, you see either "F" or "M". If not, you see a string like that. "?" means the test was inconclusive. For coverage, that means some chrY coverage, but less than expected. Most common reason is cross-sample contamination for a conflict here. But not necessarily. Loss of sex chromosomes is not too uncommon in older patients, I see it in every couple of datasets.

Sub-optimal setups can also cause issues, like non-uniquely mapped reads included in this test. Or assays that have little to no chrY baits. But if all other samples are fine, you should be ok in this regard.

0
Entering edit mode

Thanks.Thanks.Thanks.


text:
Resources tagged with: Factors and multiples

Filter by: Content type:
Age range:
Challenge level:

There are 153 results

Broad Topics > Properties of Numbers > Factors and multiples

Factors and Multiples - Secondary Resources

Age 11 to 16 Challenge Level:

A collection of resources to support work on Factors and Multiples at Secondary level.

Factors and Multiples Game

Age 7 to 16 Challenge Level:

A game in which players take it in turns to choose a number. Can you block your opponent?

Diagonal Product Sudoku

Age 11 to 16 Challenge Level:

Given the products of diagonally opposite cells - can you complete this Sudoku?

Times Tables Shifts

Age 7 to 11 Challenge Level:

In this activity, the computer chooses a times table and shifts it. Can you work out the table and the shift each time?

Multiplication Square Jigsaw

Age 7 to 11 Challenge Level:

Can you complete this jigsaw of the multiplication square?

Factor Lines

Age 7 to 14 Challenge Level:

Arrange the four number cards on the grid, according to the rules, to make a diagonal, vertical or horizontal line.

Got it for Two

Age 7 to 14 Challenge Level:

Got It game for an adult and child. How can you play so that you know you will always win?

Cogs

Age 11 to 14 Challenge Level:

A and B are two interlocking cogwheels having p teeth and q teeth respectively. One tooth on B is painted red. Find the values of p and q for which the red tooth on B contacts every gap on the. . . .

Stars

Age 11 to 14 Challenge Level:

Can you find a relationship between the number of dots on the circle and the number of steps that will ensure that all points are hit?

Have You Got It?

Age 11 to 14 Challenge Level:

Can you explain the strategy for winning this game with any target?

Got It

Age 7 to 14 Challenge Level:

A game for two people, or play online. Given a target number, say 23, and a range of numbers to choose from, say 1-4, players take it in turns to add to the running total to hit their target.

Down to Nothing

Age 7 to 11 Challenge Level:

A game for 2 or more people. Starting with 100, subratct a number from 1 to 9 from the total. You score for making an odd number, a number ending in 0 or a multiple of 6.

Cuboids

Age 11 to 14 Challenge Level:

Can you find a cuboid that has a surface area of exactly 100 square units. Is there more than one? Can you find them all?

Charlie's Delightful Machine

Age 11 to 16 Challenge Level:

Here is a machine with four coloured lights. Can you develop a strategy to work out the rules controlling each light?

Light the Lights Again

Age 7 to 11 Challenge Level:

Each light in this interactivity turns on according to a rule. What happens when you enter different numbers? Can you find the smallest number that lights up all four lights?

Three Dice

Age 7 to 11 Challenge Level:

Investigate the sum of the numbers on the top and bottom faces of a line of three dice. What do you notice?

Rearranged Rectangle

Age 7 to 11 Challenge Level:

How many different rectangles can you make using this set of rods?

Seven Flipped

Age 7 to 11 Challenge Level:

Investigate the smallest number of moves it takes to turn these mats upside-down if you can only turn exactly three at a time.

Multiples Grid

Age 7 to 11 Challenge Level:

What do the numbers shaded in blue on this hundred square have in common? What do you notice about the pink numbers? How about the shaded numbers in the other squares?

Power Crazy

Age 11 to 14 Challenge Level:

What can you say about the values of n that make $7^n + 3^n$ a multiple of 10? Are there other pairs of integers between 1 and 10 which have similar properties?

Factors and Multiples Game for Two

Age 7 to 14 Challenge Level:

Factors and Multiples game for an adult and child. How can you make sure you win this game?

Star Product Sudoku

Age 11 to 16 Challenge Level:

The puzzle can be solved by finding the values of the unknown digits (all indicated by asterisks) in the squares of the $9\times9$ grid.

How Old Are the Children?

Age 11 to 14 Challenge Level:

A student in a maths class was trying to get some information from her teacher. She was given some clues and then the teacher ended by saying, "Well, how old are they?"

Which Numbers? (1)

Age 7 to 11 Challenge Level:

I am thinking of three sets of numbers less than 101. They are the red set, the green set and the blue set. Can you find all the numbers in the sets from these clues?

Product Sudoku

Age 11 to 16 Challenge Level:

The clues for this Sudoku are the product of the numbers in adjacent squares.

Colour Wheels

Age 7 to 11 Challenge Level:

Imagine a wheel with different markings painted on it at regular intervals. Can you predict the colour of the 18th mark? The 100th mark?

Spelling Circle

Age 7 to 11 Challenge Level:

Find the words hidden inside each of the circles by counting around a certain number of spaces to find each letter in turn.

The Moons of Vuvv

Age 7 to 11 Challenge Level:

The planet of Vuvv has seven moons. Can you work out how long it is between each super-eclipse?

Which Is Quicker?

Age 7 to 11 Challenge Level:

Which is quicker, counting up to 30 in ones or counting up to 300 in tens? Why?

Mystery Matrix

Age 7 to 11 Challenge Level:

Can you fill in this table square? The numbers 2 -12 were used to generate it with just one number used twice.

Being Resilient - Primary Number

Age 5 to 11 Challenge Level:

Number problems at primary level that may require resilience.

Which Numbers? (2)

Age 7 to 11 Challenge Level:

I am thinking of three sets of numbers less than 101. Can you find all the numbers in each set from these clues?

Being Collaborative - Primary Number

Age 5 to 11 Challenge Level:

Number problems at primary level to work on with others.

Tiling

Age 7 to 11 Challenge Level:

An investigation that gives you the opportunity to make and justify predictions.

Surprising Split

Age 7 to 11 Challenge Level:

Does this 'trick' for calculating multiples of 11 always work? Why or why not?

It Figures

Age 7 to 11 Challenge Level:

Suppose we allow ourselves to use three numbers less than 10 and multiply them together. How many different products can you find? How do you know you've got them all?

Neighbours

Age 7 to 11 Challenge Level:

In a square in which the houses are evenly spaced, numbers 3 and 10 are opposite each other. What is the smallest and what is the largest possible number of houses in the square?

The Remainders Game

Age 7 to 14 Challenge Level:

Play this game and see if you can figure out the computer's chosen number.

American Billions

Age 11 to 14 Challenge Level:

Play the divisibility game to create numbers in which the first two digits make a number divisible by 2, the first three digits make a number divisible by 3...

Age 11 to 16 Challenge Level:

The items in the shopping basket add and multiply to give the same amount. What could their prices be?

Odds and Threes

Age 7 to 11 Challenge Level:

A game for 2 people using a pack of cards Turn over 2 cards and try to make an odd number or a multiple of 3.

Scoring with Dice

Age 7 to 11 Challenge Level:

I throw three dice and get 5, 3 and 2. Add the scores on the three dice. What do you get? Now multiply the scores. What do you notice?

Crossings

Age 7 to 11 Challenge Level:

In this problem we are looking at sets of parallel sticks that cross each other. What is the least number of crossings you can make? And the greatest?

A First Product Sudoku

Age 11 to 14 Challenge Level:

Given the products of adjacent cells, can you complete this Sudoku?

Round and Round the Circle

Age 7 to 11 Challenge Level:

What happens if you join every second point on this circle? How about every third point? Try with different steps and see if you can predict what will happen.

Fitted

Age 7 to 11 Challenge Level:

Nine squares with side lengths 1, 4, 7, 8, 9, 10, 14, 15, and 18 cm can be fitted together to form a rectangle. What are the dimensions of the rectangle?

Red Balloons, Blue Balloons

Age 7 to 11 Challenge Level:

Katie and Will have some balloons. Will's balloon burst at exactly the same size as Katie's at the beginning of a puff. How many puffs had Will done before his balloon burst?

What Do You Need?

Age 7 to 11 Challenge Level:

Four of these clues are needed to find the chosen number on this grid and four are true but do nothing to help in finding the number. Can you sort out the clues and find the number?

Tom's Number

Age 7 to 11 Challenge Level:

Work out Tom's number from the answers he gives his friend. He will only answer 'yes' or 'no'.

Multiply Multiples 2

Age 7 to 11 Challenge Level:

Can you work out some different ways to balance this equation?


text:
Vertex (graph theory)

Vertex (graph theory)
A graph with 6 vertices and 7 edges where the vertex number 6 on the far-left is a leaf vertex or a pendant vertex

In graph theory, a vertex (plural vertices) or node is the fundamental unit out of which graphs are formed: an undirected graph consists of a set of vertices and a set of edges (unordered pairs of vertices), while a directed graph consists of a set of vertices and a set of arcs (ordered pairs of vertices). From the point of view of graph theory, vertices are treated as featureless and indivisible objects, although they may have additional structure depending on the application from which the graph arises; for instance, a semantic network is a graph in which the vertices represent concepts or classes of objects.

The two vertices forming an edge are said to be the endpoints of this, and the edge is said to be incident to the vertices. A vertex w is said to be adjacent to another vertex v if the graph contains an edge (v,w). The neighborhood of a vertex v is an induced subgraph of the graph, formed by all vertices adjacent to v.

The degree of a vertex in a graph is the number of edges incident to it. An isolated vertex is a vertex with degree zero; that is, a vertex that is not an endpoint of any edge. A leaf vertex (also pendant vertex) is a vertex with degree one. In a directed graph, one can distinguish the outdegree (number of outgoing edges) from the indegree (number of incoming edges); a source vertex is a vertex with indegree zero, while a sink vertex is a vertex with outdegree zero.

A cut vertex is a vertex the removal of which would disconnect the remaining graph; a vertex separator is a collection of vertices the removal of which would disconnect the remaining graph into small pieces. A k-vertex-connected graph is a graph in which removing fewer than k vertices always leaves the remaining graph connected. An independent set is a set of vertices no two of which are adjacent, and a vertex cover is a set of vertices that includes the endpoint of each edge in the graph. The vertex space of a graph is a vector space having a set of basis vectors corresponding with the graph's vertices.

A graph is vertex-transitive if it has symmetries that map any vertex to any other vertex. In the context of graph enumeration and graph isomorphism it is important to distinguish between labeled vertices and unlabeled vertices. A labeled vertex is a vertex that is associated with extra information that enables it to be distinguished from other labeled vertices; two graphs can be considered isomorphic only if the correspondence between their vertices pairs up vertices with equal labels. An unlabeled vertex is one that can be substituted for any other vertex based only on its adjacencies in the graph and not based on any additional information.

Vertices in graphs are analogous to, but not the same as, vertices of polyhedra: the skeleton of a polyhedron forms a graph, the vertices of which are the vertices of the polyhedron, but polyhedron vertices have additional structure (their geometric location) that is not assumed to be present in graph theory. The vertex figure of a vertex in a polyhedron is analogous to the neighborhood of a vertex in a graph.

In a directed graph, the forward star of a vertex u is defined as its outgoing edges. In a Graph G with the set of vertices V and the set of edges E, the forward star of u can be described as

$\{(u, v) \in E\}.\$[1]

References

• Gallo, Giorgio; Pallotino, Stefano (1988). "Shortest Path Algorithms". Annals of Operations Research 13 (1): 1–79. doi:10.1007/BF02288320.
• Berge, Claude, Théorie des graphes et ses applications. Collection Universitaire de Mathématiques, II Dunod, Paris 1958, viii+277 pp. (English edition, Wiley 1961; Methuen & Co, New York 1962; Russian, Moscow 1961; Spanish, Mexico 1962; Roumanian, Bucharest 1969; Chinese, Shanghai 1963; Second printing of the 1962 first English edition. Dover, New York 2001)
• Chartrand, Gary (1985). Introductory graph theory. New York: Dover. ISBN 0-486-24775-9.
• Biggs, Norman; Lloyd, E. H.; Wilson, Robin J. (1986). Graph theory, 1736-1936. Oxford [Oxfordshire]: Clarendon Press. ISBN 0-19-853916-9.
• Harary, Frank (1969). Graph theory. Reading, Mass.: Addison-Wesley Publishing. ISBN 0-201-41033-8.
• Harary, Frank; Palmer, Edgar M. (1973). Graphical enumeration. New York, Academic Press. ISBN 0-12-324245-2.

Wikimedia Foundation. 2010.

Look at other dictionaries:

• Graph theory — In mathematics and computer science, graph theory is the study of graphs : mathematical structures used to model pairwise relations between objects from a certain collection. A graph in this context refers to a collection of vertices or nodes and …   Wikipedia

• graph theory — Math. the branch of mathematics dealing with linear graphs. [1965 70] * * * Mathematical theory of networks. A graph consists of nodes (also called points or vertices) and edges (lines) connecting certain pairs of nodes. An edge that connects a… …   Universalium

• Connectivity (graph theory) — In mathematics and computer science, connectivity is one of the basic concepts of graph theory: it asks for the minimum number of elements (nodes or edges) which need to be removed to disconnect the remaining nodes from each other[1]. It is… …   Wikipedia

• Degeneracy (graph theory) — In graph theory, a k degenerate graph is an undirected graph in which every subgraph has a vertex of degree at most k: that is, some vertex in the subgraph touches k or fewer of the subgraph s edges. The degeneracy of a graph is the smallest… …   Wikipedia

• Clique (graph theory) — A graph with 23 1 vertex cliques (its vertices), 42 2 vertex cliques (its edges), 19 3 vertex cliques (the light blue triangles), and 2 4 vertex cliques (dark blue). Six of the edges and 11 of the triangles form maximal cliques. The two dark blue …   Wikipedia

• Tree (graph theory) — Trees A labeled tree with 6 vertices and 5 edges Vertices v Edges v 1 Chromatic number …   Wikipedia

• Path (graph theory) — In graph theory, a path in a graph is a sequence of vertices such that from each of its vertices there is an edge to the next vertex in the sequence. The first vertex is called the start vertex and the last vertex is called the end vertex . Both… …   Wikipedia

• Degree (graph theory) — A graph with vertices labeled by degree In graph theory, the degree (or valency) of a vertex of a graph is the number of edges incident to the vertex, with loops counted twice.[1] The degree of a vertex …   Wikipedia

• Neighbourhood (graph theory) — A graph consisting of 6 vertices and 7 edges For other meanings of neighbourhoods in mathematics, see Neighbourhood (mathematics). For non mathematical neighbourhoods, see Neighbourhood (disambiguation). In graph theory, an adjacent vertex of a… …   Wikipedia

• Matching (graph theory) — In the mathematical discipline of graph theory, a matching or independent edge set in a graph is a set of edges without common vertices. It may also be an entire graph consisting of edges without common vertices. Covering packing dualities… …   Wikipedia