Last updated: 2020-02-05
Checks: 7 0
Knit directory: BUSpaRse_notebooks/
This reproducible R Markdown analysis was created with workflowr (version 1.6.0). 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(20181214)
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 version displayed above was the version of the Git repository at the time these results were generated.
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:
Ignored files:
Ignored: .Rhistory
Ignored: .Rproj.user/
Ignored: BUSpaRse_notebooks.Rproj
Ignored: data/fastqs/
Ignored: data/hgmm_100_fastqs.tar
Ignored: data/hgmm_1k_fastqs.tar
Ignored: data/hgmm_1k_v3_fastqs.tar
Ignored: data/hgmm_1k_v3_fastqs/
Ignored: data/hs_cdna.fa.gz
Ignored: data/mm_cdna.fa.gz
Ignored: data/mm_cdna97.fa.gz
Ignored: data/neuron_10k_v3_fastqs.tar
Ignored: data/neuron_10k_v3_fastqs/
Ignored: data/retina/
Ignored: data/whitelist_v2.txt
Ignored: data/whitelist_v3.txt
Ignored: output/hs_mm_tr_index.idx
Ignored: output/mm_cDNA_introns_97.idx
Ignored: output/mm_cDNA_introns_97_collapse.idx
Ignored: output/mm_tr_index.idx
Ignored: output/mm_tr_index97.idx
Ignored: output/out_hgmm1k/
Ignored: output/out_hgmm1k_v3/
Ignored: output/out_retina/
Untracked files:
Untracked: .ipynb_checkpoints/
Untracked: SRR7244429_1.fastq
Untracked: SRR7244429_2.fastq
Untracked: analysis/dropseq_retina.Rmd
Untracked: analysis/ee_ie_junctions.Rmd
Untracked: analysis/junction.Rmd
Untracked: analysis/junction2.Rmd
Untracked: human_mouse_transcript_to_gene.tsv
Untracked: output/ee_ie/
Untracked: output/neuron10k/
Untracked: output/neuron10k_collapse/
Untracked: output/neuron10k_junction/
Untracked: output/neuron10k_velocity/
Untracked: output/out_hgmm1k2/
Untracked: output/tr2g_hgmm.tsv
Untracked: output/tr2g_mm97.tsv
Untracked: problem5.ipynb
Untracked: test/
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.
These are the previous versions of the R Markdown and HTML files. If you’ve configured a remote Git repository (see ?wflow_git_remote
), click on the hyperlinks in the table below to view them.
| File | Version | Author | Date | Message |
|---|---|---|---|---|
| Rmd | 47f0c7c | Lambda Moses | 2020-02-05 | Added link to colab version |
| html | 6634135 | Lambda Moses | 2019-06-23 | Build site. |
| Rmd | 013799b | Lambda Moses | 2019-06-23 | Added explanation of kallisto outputs |
| html | f65450b | Lambda Moses | 2019-06-22 | Build site. |
| Rmd | cf90f32 | Lambda Moses | 2019-06-22 | Changed site name and slightly changed 10xv2 notebook |
| html | 68bd8fb | Lambda Moses | 2019-06-22 | Build site. |
| Rmd | ce7a44d | Lambda Moses | 2019-06-22 | Changed title |
| html | f5e971d | Lambda Moses | 2019-06-22 | Build site. |
| html | 9fa20ae | Lambda Moses | 2019-06-22 | Build site. |
| Rmd | dba27cc | Lambda Moses | 2019-06-22 | Adapted notebook to new version of bustools |
| Rmd | 06e9869 | Lambda Moses | 2019-03-01 | Adapted old notebooks to new version of BUSpaRse |
| html | 06e9869 | Lambda Moses | 2019-03-01 | Adapted old notebooks to new version of BUSpaRse |
| html | c465ce1 | Lambda Moses | 2019-02-14 | Build site |
| Rmd | f22beac | Lambda Moses | 2019-02-14 | Added CellRanger whiltelist clarification |
| Rmd | 000215e | Lambda Moses | 2019-02-14 | Clarified git cloning this repo and resolved swapped code chunks for output.sorted.bus |
| html | 71513e5 | Lambda Moses | 2019-02-14 | Good site with figures and reproducibility metrics |
| Rmd | 95f2951 | Lambda Moses | 2019-02-14 | Added head of bus file |
| html | 7184968 | Lambda Moses | 2019-02-14 | Build site. |
| Rmd | 8cd81e0 | Lambda Moses | 2019-02-14 | Finally saved the figures |
| html | 8cd81e0 | Lambda Moses | 2019-02-14 | Finally saved the figures |
| html | 45c5d4a | Lambda Moses | 2019-02-14 | Build site. |
| Rmd | 92aa915 | Lambda Moses | 2019-02-14 | Named chunks with images |
| html | 87d15f5 | Lambda Moses | 2019-02-14 | Build site. |
| Rmd | 8d9fe9a | Lambda Moses | 2019-02-14 | More detailed explanations for kallisto bus workshop |
| html | b7b21a0 | Lambda Moses | 2019-02-02 | Build site. |
| Rmd | c7ecb56 | Lambda Moses | 2019-02-02 | Added BUSpaRse installation link and note |
| html | a0becdf | Lambda Moses | 2018-12-19 | Build site. |
| html | 93c1053 | Lambda Moses | 2018-12-19 | Build site. |
| Rmd | 9731fd6 | Lambda Moses | 2018-12-19 | Corrected typo |
| html | 85a5770 | Lambda Moses | 2018-12-14 | Build site. |
| Rmd | ca1d6ce | Lambda Moses | 2018-12-14 | Clean up |
| html | 6276894 | Lambda Moses | 2018-12-14 | Build site. |
| html | db70187 | Lambda Moses | 2018-12-14 | Build site. |
| Rmd | b67fc92 | Lambda Moses | 2018-12-14 | Added 10xv3 notebook and further elaboration to 10xv2 notebook |
| html | fff442d | Lambda Moses | 2018-12-14 | Build site. |
| Rmd | 695e202 | Lambda Moses | 2018-12-14 | Changed name to BUSpaRse |
| html | 09a56c1 | Lambda Moses | 2018-12-14 | Build site. |
| Rmd | d288e19 | Lambda Moses | 2018-12-14 | Cache rather than skip evaluation |
| html | 30c9aa3 | Lambda Moses | 2018-12-14 | Build site. |
| Rmd | fd3d5ae | Lambda Moses | 2018-12-14 | Don’t collapse output |
| html | 2da3b35 | Lambda Moses | 2018-12-14 | Build site. |
| Rmd | 1fc3e91 | Lambda Moses | 2018-12-14 | Publish 10xv2 notebook |
| Rmd | 074d55f | Lambda Moses | 2018-12-14 | Initial commit, already with 10xv2 notebook |
In this vignette, we process fastq data from scRNA-seq (10x v2 chemistry) with to make a sparse matrix that can be used in downstream analysis with command line tools kallisto
and bustools
, as described in the kallisto bus
paper. Then we will start a standard downstream analysis with Seurat
.
If you would like to rerun this notebook, you can git clone this repository or use the Google Colab version.
This notebook demonstrates the use of command line tools kallisto
and bustools
. Please use kallisto
>= 0.46, whose binary can be downloaded here. The binary of bustools
can be found here.
After you download the binary, you should decompress the file (if it is tar.gz
) with tar -xzvf file.tar.gz
in the bash
terminal, and add the directory containing the binary to PATH
by export PATH=$PATH:/foo/bar
, where /foo/bar
is the directory of interest. Then you can directly invoke the binary on the command line as we will do in this notebook.
We will be using the R packages below. BUSpaRse
is on Bioconductor >= 3.10. For Mac users, see the installation note for BUSpaRse
. BUSpaRse
will be used to generate the transcript to gene file for bustools
and to read output of bustools
into R. We will also use Seurat
version 3 which is now on CRAN.
The package DropletUtils
will be used to estimate the number of real cells as opposed to empty droplets. It’s on Bioconductor, and here is how it should be installed:
if (!require(BiocManager)) {
install.packages("BiocManager")
}
BiocManager::install(c("DropletUtils", "BUSpaRse"))
The other R packages below are on CRAN, and can be installed with install.packages
.
library(BUSpaRse)
library(Seurat)
library(tidyverse)
library(DropletUtils)
library(Matrix)
theme_set(theme_bw())
The data set we are using here is 1k 1:1 Mixture of Fresh Frozen Human (HEK293T) and Mouse (NIH3T3) Cells from the 10x website. First, we download the fastq files (6.34 GB).
if (!file.exists("./data/hgmm_1k_fastqs.tar")) {
download.file("http://cf.10xgenomics.com/samples/cell-exp/2.1.0/hgmm_1k/hgmm_1k_fastqs.tar", destfile = "./data/hgmm_1k_fastqs.tar", quiet = TRUE)
}
Then untar this file
cd ./data
tar -xvf ./hgmm_1k_fastqs.tar
#> fastqs/
#> fastqs/hgmm_1k_S1_L001_I1_001.fastq.gz
#> fastqs/hgmm_1k_S1_L001_R1_001.fastq.gz
#> fastqs/hgmm_1k_S1_L001_R2_001.fastq.gz
#> fastqs/hgmm_1k_S1_L002_I1_001.fastq.gz
#> fastqs/hgmm_1k_S1_L002_R1_001.fastq.gz
#> fastqs/hgmm_1k_S1_L002_R2_001.fastq.gz
#> fastqs/hgmm_1k_S1_L003_I1_001.fastq.gz
#> fastqs/hgmm_1k_S1_L003_R1_001.fastq.gz
#> fastqs/hgmm_1k_S1_L003_R2_001.fastq.gz
#> fastqs/hgmm_1k_S1_L004_I1_001.fastq.gz
#> fastqs/hgmm_1k_S1_L004_R1_001.fastq.gz
#> fastqs/hgmm_1k_S1_L004_R2_001.fastq.gz
#> fastqs/hgmm_1k_S1_L005_I1_001.fastq.gz
#> fastqs/hgmm_1k_S1_L005_R1_001.fastq.gz
#> fastqs/hgmm_1k_S1_L005_R2_001.fastq.gz
#> fastqs/hgmm_1k_S1_L006_I1_001.fastq.gz
#> fastqs/hgmm_1k_S1_L006_R1_001.fastq.gz
#> fastqs/hgmm_1k_S1_L006_R2_001.fastq.gz
#> fastqs/hgmm_1k_S1_L007_I1_001.fastq.gz
#> fastqs/hgmm_1k_S1_L007_R1_001.fastq.gz
#> fastqs/hgmm_1k_S1_L007_R2_001.fastq.gz
#> fastqs/hgmm_1k_S1_L008_I1_001.fastq.gz
#> fastqs/hgmm_1k_S1_L008_R1_001.fastq.gz
#> fastqs/hgmm_1k_S1_L008_R2_001.fastq.gz
kallisto
indexHere we use kallisto to pseudoalign the reads to the transcriptome and then to create the bus
file to be converted to a sparse matrix. The first step is to build an index of the transcriptome. This data set has both human and mouse cells, so we need both human and mouse transcriptomes. The transcriptomes downloaded here are from Ensembl version 94, released in October 2018.
# Human transcriptome
if (!file.exists("./data/hs_cdna.fa.gz")) {
download.file("ftp://ftp.ensembl.org/pub/release-99/fasta/homo_sapiens/cdna/Homo_sapiens.GRCh38.cdna.all.fa.gz", "./data/hs_cdna.fa.gz", method = "wget", quiet = TRUE)
}
# Mouse transcriptome
if (!file.exists("./data/mm_cdna.fa.gz")) {
download.file("ftp://ftp.ensembl.org/pub/release-99/fasta/mus_musculus/cdna/Mus_musculus.GRCm38.cdna.all.fa.gz", "./data/mm_cdna.fa.gz", method = "wget", quiet = TRUE)
}
# This chunk is in bash
kallisto version
#> kallisto, version 0.46.0
Actually, we don’t need to unzip the fasta files
if (!file.exists("./output/hs_mm_tr_index.idx")) {
system("kallisto index -i ./output/hs_mm_tr_index.idx ./data/hs_cdna.fa.gz ./data/mm_cdna.fa.gz")
}
kallisto bus
Here we will generate the bus
file. Here bus
stands for Barbode, UMI, Set (i.e. equivalent class). In text form, it is a table whose first column is the barcode. The second column is the UMI that are associated with the barcode. The third column is the index of the equivalence class reads with the UMI maps to (equivalence class will be explained later). The fourth column is count of reads with this barcode, UMI, and equivalence class combination, which is ignored as one UMI should stand for one molecule. See this paper for more detail.
These are the technologies supported by kallisto bus
:
system("kallisto bus --list", intern = TRUE)
#> Warning in system("kallisto bus --list", intern = TRUE): running command
#> 'kallisto bus --list' had status 1
#> [1] "List of supported single-cell technologies"
#> [2] ""
#> [3] "short name description"
#> [4] "---------- -----------"
#> [5] "10xv1 10x version 1 chemistry"
#> [6] "10xv2 10x version 2 chemistry"
#> [7] "10xv3 10x version 3 chemistry"
#> [8] "CELSeq CEL-Seq"
#> [9] "CELSeq2 CEL-Seq version 2"
#> [10] "DropSeq DropSeq"
#> [11] "inDrops inDrops"
#> [12] "SCRBSeq SCRB-Seq"
#> [13] "SureCell SureCell for ddSEQ"
#> [14] ""
#> attr(,"status")
#> [1] 1
Here we have 8 samples. Each sample has 3 files: I1
means sample index, R1
means barcode and UMI, and R2
means the piece of cDNA. The -i
argument specifies the index file we just built. The -o
argument specifies the output directory. The -x
argument specifies the sequencing technology used to generate this data set. The -t
argument specifies the number of threads used. I ran this on a server and used 8 threads.
# This chunk is in bash
cd ./data
kallisto bus -i ../output/hs_mm_tr_index.idx -o ../output/out_hgmm1k -x 10xv2 -t8 \
./fastqs/hgmm_1k_S1_L001_R1_001.fastq.gz ./fastqs/hgmm_1k_S1_L001_R2_001.fastq.gz \
./fastqs/hgmm_1k_S1_L002_R1_001.fastq.gz ./fastqs/hgmm_1k_S1_L002_R2_001.fastq.gz \
./fastqs/hgmm_1k_S1_L003_R1_001.fastq.gz ./fastqs/hgmm_1k_S1_L003_R2_001.fastq.gz \
./fastqs/hgmm_1k_S1_L004_R1_001.fastq.gz ./fastqs/hgmm_1k_S1_L004_R2_001.fastq.gz \
./fastqs/hgmm_1k_S1_L005_R1_001.fastq.gz ./fastqs/hgmm_1k_S1_L005_R2_001.fastq.gz \
./fastqs/hgmm_1k_S1_L006_R1_001.fastq.gz ./fastqs/hgmm_1k_S1_L006_R2_001.fastq.gz \
./fastqs/hgmm_1k_S1_L007_R1_001.fastq.gz ./fastqs/hgmm_1k_S1_L007_R2_001.fastq.gz \
./fastqs/hgmm_1k_S1_L008_R1_001.fastq.gz ./fastqs/hgmm_1k_S1_L008_R2_001.fastq.gz
#>
#> [index] k-mer length: 31
#> [index] number of targets: 309,785
#> [index] number of k-mers: 209,728,067
#> [index] number of equivalence classes: 1,288,400
#> [quant] will process sample 1: ./fastqs/hgmm_1k_S1_L001_R1_001.fastq.gz
#> ./fastqs/hgmm_1k_S1_L001_R2_001.fastq.gz
#> [quant] will process sample 2: ./fastqs/hgmm_1k_S1_L002_R1_001.fastq.gz
#> ./fastqs/hgmm_1k_S1_L002_R2_001.fastq.gz
#> [quant] will process sample 3: ./fastqs/hgmm_1k_S1_L003_R1_001.fastq.gz
#> ./fastqs/hgmm_1k_S1_L003_R2_001.fastq.gz
#> [quant] will process sample 4: ./fastqs/hgmm_1k_S1_L004_R1_001.fastq.gz
#> ./fastqs/hgmm_1k_S1_L004_R2_001.fastq.gz
#> [quant] will process sample 5: ./fastqs/hgmm_1k_S1_L005_R1_001.fastq.gz
#> ./fastqs/hgmm_1k_S1_L005_R2_001.fastq.gz
#> [quant] will process sample 6: ./fastqs/hgmm_1k_S1_L006_R1_001.fastq.gz
#> ./fastqs/hgmm_1k_S1_L006_R2_001.fastq.gz
#> [quant] will process sample 7: ./fastqs/hgmm_1k_S1_L007_R1_001.fastq.gz
#> ./fastqs/hgmm_1k_S1_L007_R2_001.fastq.gz
#> [quant] will process sample 8: ./fastqs/hgmm_1k_S1_L008_R1_001.fastq.gz
#> ./fastqs/hgmm_1k_S1_L008_R2_001.fastq.gz
#> [quant] finding pseudoalignments for the reads ... done
#> [quant] processed 63,252,296 reads, 52,281,921 reads pseudoaligned
See what the outputs are
list.files("./output/out_hgmm1k/")
#> [1] "matrix.ec" "output.bus" "run_info.json" "transcripts.txt"
Explaining the output:
matrix.ec
: A text file with two columns. The first column is the 0 based index of equivalence classes. The second column is the set of transcripts (denoted by 0 based index based on order of appearance in the transcriptome fasta file) present in the corresponding equivalence class.output.bus
: The data represented in bus
format. This is a binary file, so don’t use something like read.table
to read it into R.run_info.json
: Information about the call to kallisto bus
, including the command used, number and percentage of reads pseudoaligned, version of kallisto
used, and etc.transcript.txt
: A text file with one column, which is the transcripts present in the data, in the same order as in the transcriptome fasta file.bustools
For the sparse matrix, most people are interested in how many UMIs per gene per cell, we here we will quantify this from the bus
output, and to do so, we need to find which gene corresponds to each transcript. Remember in the output of kallisto bus
, there’s the file transcripts.txt
. Those are the transcripts in the transcriptome index.
Remember that we downloaded transcriptome FASTA files from Ensembl just now. In FASTA files, each entry is a sequence with a name. In Ensembl FASTA files, the sequence name has genome annotation of the corresponding sequence, so we can extract transcript IDs and corresponding gene IDs and gene names from there.
tr2g <- transcript2gene(fasta_file = c("./data/hs_cdna.fa.gz", "./data/mm_cdna.fa.gz"),
kallisto_out_path = "./output/out_hgmm1k")
#> Reading FASTA file.
#> Reading FASTA file.
#> Sorting transcripts
head(tr2g)
#> transcript gene gene_name
#> 1: ENST00000434970.2 ENSG00000237235.2 TRDD2
#> 2: ENST00000415118.1 ENSG00000223997.1 TRDD1
#> 3: ENST00000448914.1 ENSG00000228985.1 TRDD3
#> 4: ENST00000631435.1 ENSG00000282253.1 TRBD1
#> 5: ENST00000632684.1 ENSG00000282431.1 TRBD1
#> 6: ENST00000390583.1 ENSG00000211923.1 IGHD3-10
bustools
requires tr2g
to be written into a tab delimited file of a specific format: No headers, first column is transcript ID, and second column is the corresponding gene ID. Transcript IDs must be in the same order as in the kallisto
index.
# Write tr2g to format required by bustools
save_tr2g_bustools(tr2g, "./output/tr2g_hgmm.tsv")
A whitelist that contains all the barcodes known to be present in the kit is provided by 10x and comes with CellRanger. A CellRanger installation is required, though we will not run CellRanger here.
# Copy v2 chemistry whitelist to working directory
cp ~/cellranger-3.1.0/cellranger-cs/3.1.0/lib/python/cellranger/barcodes/737K-august-2016.txt \
./data/whitelist_v2.txt
Then we’re ready to make the gene count matrix. First, bustools
runs barcode error correction on the bus
file. Then, the corrected bus
file is sorted by barcode, UMI, and equivalence classes. Then the UMIs are counted and the counts are collapsed into gene level. Here the |
is pipe in bash, just like the magrittr pipe %>%
in R, that pipes the output of one command to the next.
mkdir ./output/out_hgmm1k/genecount ./tmp
bustools correct -w ./data/whitelist_v2.txt -p ./output/out_hgmm1k/output.bus | \
bustools sort -T tmp/ -t 4 -p - | \
bustools count -o ./output/out_hgmm1k/genecount/genes -g ./output/tr2g_hgmm.tsv \
-e ./output/out_hgmm1k/matrix.ec -t ./output/out_hgmm1k/transcripts.txt --genecounts -
#> Found 737280 barcodes in the whitelist
#> Number of hamming dist 1 barcodes = 20550336
#> Processed 52281921 bus records
#> In whitelist = 50825261
#> Corrected = 348752
#> Uncorrected = 1107908
#> Read in 51174013 BUS records
See what the outputs are
list.files("./output/out_hgmm1k/genecount")
#> [1] "genes" "genes.barcodes.txt" "genes.genes.txt"
#> [4] "genes.mtx"
Here we have text files for barcodes and gene names, and an mtx
file for the sparse gene count matrix.
Now we can load the matrix into R for analysis.
res_mat <- read_count_output("./output/out_hgmm1k/genecount",
name = "genes", tcc = FALSE)
Cool, so now we have the sparse matrix. What does it look like?
dim(res_mat)
#> [1] 77202 362207
The number of genes is as expected for two species. There’re way more cells than we expect, which is about 1000. So what’s going on?
How many UMIs per barcode?
tot_counts <- Matrix::colSums(res_mat)
summary(tot_counts)
#> Min. 1st Qu. Median Mean 3rd Qu. Max.
#> 0.00 1.00 1.00 76.04 8.00 74292.00
The vast majority of “cells” have only a few UMI detected. Those are empty droplets. 10x claims to have cell capture rate of up to 65%, but in practice, depending on how many cells are in fact loaded, the rate can be much lower. A commonly used method to estimate the number of empty droplets is barcode ranking knee and inflection points, as those are often assumed to represent transition between two components of a distribution. While more sophisticated method exist (e.g. see emptyDrops
in DropletUtils
), for simplicity, we will use the barcode ranking method here. However, whichever way we go, we don’t have the ground truth.
# Compute barcode rank
bc_rank <- barcodeRanks(res_mat)
qplot(bc_rank$total, bc_rank$rank, geom = "line") +
geom_vline(xintercept = metadata(bc_rank)$knee, color = "blue", linetype = 2) +
geom_vline(xintercept = metadata(bc_rank)$inflection, color = "green", linetype = 2) +
annotate("text", y = 1000, x = 1.5 * c(metadata(bc_rank)$knee, metadata(bc_rank)$inflection),
label = c("knee", "inflection"), color = c("blue", "green")) +
scale_x_log10() +
scale_y_log10() +
labs(y = "Barcode rank", x = "Total UMI count")
#> Warning: Transformation introduced infinite values in continuous x-axis
The inflection point looks like a reasonable number of cells.
# Filter the matrix
res_mat <- res_mat[, tot_counts > metadata(bc_rank)$inflection]
dim(res_mat)
#> [1] 77202 1095
How many cells are from humans and how many from mice? The number of cells with mixed species indicates doublet rate.
gene_species <- ifelse(str_detect(rownames(res_mat), "^ENSMUSG"), "mouse", "human")
mouse_inds <- gene_species == "mouse"
human_inds <- gene_species == "human"
# mark cells as mouse or human
cell_species <- tibble(n_mouse_umi = Matrix::colSums(res_mat[mouse_inds,]),
n_human_umi = Matrix::colSums(res_mat[human_inds,]),
tot_umi = Matrix::colSums(res_mat),
prop_mouse = n_mouse_umi / tot_umi,
prop_human = n_human_umi / tot_umi)
# Classify species based on proportion of UMI, with cutoff of 90%
cell_species <- cell_species %>%
mutate(species = case_when(
prop_mouse > 0.9 ~ "mouse",
prop_human > 0.9 ~ "human",
TRUE ~ "mixed"
))
ggplot(cell_species, aes(n_human_umi, n_mouse_umi, color = species)) +
geom_point(size = 0.5)
Great, looks like the vast majority of cells are not mixed.
cell_species %>%
dplyr::count(species) %>%
mutate(proportion = n / ncol(res_mat))
#> # A tibble: 3 x 3
#> species n proportion
#> <chr> <int> <dbl>
#> 1 human 566 0.517
#> 2 mixed 3 0.00274
#> 3 mouse 526 0.480
Great, only about 0.3% of cells here are doublets, which is lower than the ~1% 10x lists. Doublet rate tends to be lower when cell concentration is lower. However, doublets can still be formed with cells from the same species, so the number of mixed species “cells” is only a lower bound of doublet rate.
seu <- CreateSeuratObject(res_mat, min.cells = 3) %>%
NormalizeData(verbose = FALSE) %>%
ScaleData(verbose = FALSE) %>%
FindVariableFeatures(verbose = FALSE)
# Add species to meta data
seu <- AddMetaData(seu, metadata = cell_species$species, col.name = "species")
See how number of total counts and number of genes expressed are distributed.
VlnPlot(seu, c("nCount_RNA", "nFeature_RNA"), group.by = "species",
pt.size = 0.1)
Another QC plot
<EMAIL_ADDRESS>aes(nCount_RNA, nFeature_RNA, color = species)) +
geom_point(alpha = 0.7, size = 0.5) +
labs(x = "Total UMI counts per cell", y = "Number of genes detected")
The mixed species doublets do look different from human and mouse cells.
seu <- RunPCA(seu, verbose = FALSE, npcs = 30)
ElbowPlot(seu, ndims = 30)
DimPlot(seu, reduction = "pca", pt.size = 0.5, group.by = "species")
The first PC separates species, as expected. Also as expected, the doublets are in between human and mouse cells in this plot.
seu <- RunTSNE(seu, dims = 1:20, check_duplicates = FALSE)
DimPlot(seu, reduction = "tsne", pt.size = 0.5, group.by = "species")
The species separate, and the few doublets form its own cluster, as expected.
sessionInfo()
#> R version 3.6.0 (2019-04-26)
#> Platform: x86_64-redhat-linux-gnu (64-bit)
#> Running under: CentOS Linux 7 (Core)
#>
#> Matrix products: default
#> BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so
#>
#> locale:
#> [1] en_US.UTF-8
#>
#> attached base packages:
#> [1] parallel stats4 stats graphics grDevices utils datasets
#> [8] methods base
#>
#> other attached packages:
#> [1] Matrix_1.2-18 DropletUtils_1.6.1
#> [3] SingleCellExperiment_1.8.0 SummarizedExperiment_1.16.1
#> [5] DelayedArray_0.12.2 BiocParallel_1.20.1
#> [7] matrixStats_0.55.0 Biobase_2.46.0
#> [9] GenomicRanges_1.38.0 GenomeInfoDb_1.22.0
#> [11] IRanges_2.20.2 S4Vectors_0.24.3
#> [13] BiocGenerics_0.32.0 forcats_0.4.0
#> [15] stringr_1.4.0 dplyr_0.8.3
#> [17] purrr_0.3.3 readr_1.3.1
#> [19] tidyr_1.0.2 tibble_2.1.3
#> [21] ggplot2_3.2.1 tidyverse_1.3.0
#> [23] Seurat_3.1.2 BUSpaRse_1.0.0
#> [25] workflowr_1.6.0
#>
#> loaded via a namespace (and not attached):
#> [1] utf8_1.1.4 reticulate_1.14 R.utils_2.9.2
#> [4] tidyselect_1.0.0 RSQLite_2.2.0 AnnotationDbi_1.48.0
#> [7] htmlwidgets_1.5.1 grid_3.6.0 Rtsne_0.15
#> [10] munsell_0.5.0 codetools_0.2-16 ica_1.0-2
#> [13] future_1.16.0 withr_2.1.2 colorspace_1.4-1
#> [16] knitr_1.27 rstudioapi_0.10 ROCR_1.0-7
#> [19] gbRd_0.4-11 listenv_0.8.0 labeling_0.3
#> [22] Rdpack_0.11-1 git2r_0.26.1 GenomeInfoDbData_1.2.2
#> [25] farver_2.0.3 bit64_0.9-7 rhdf5_2.30.1
#> [28] rprojroot_1.3-2 vctrs_0.2.2 generics_0.0.2
#> [31] xfun_0.12 BiocFileCache_1.10.2 R6_2.4.1
#> [34] rsvd_1.0.2 locfit_1.5-9.1 AnnotationFilter_1.10.0
#> [37] bitops_1.0-6 assertthat_0.2.1 promises_1.1.0
#> [40] SDMTools_1.1-221.2 scales_1.1.0 gtable_0.3.0
#> [43] npsurv_0.4-0 globals_0.12.5 ensembldb_2.10.2
#> [46] rlang_0.4.3 zeallot_0.1.0 splines_3.6.0
#> [49] rtracklayer_1.46.0 lazyeval_0.2.2 broom_0.5.4
#> [52] plyranges_1.6.6 yaml_2.2.0 reshape2_1.4.3
#> [55] modelr_0.1.5 GenomicFeatures_1.38.1 backports_1.1.5
#> [58] httpuv_1.5.2 tools_3.6.0 gplots_<IP_ADDRESS>
#> [61] RColorBrewer_1.1-2 ggridges_0.5.2 Rcpp_1.0.3
#> [64] plyr_1.8.5 progress_1.2.2 zlibbioc_1.32.0
#> [67] RCurl_1.98-1.1 prettyunits_1.1.1 openssl_1.4.1
#> [70] pbapply_1.4-2 cowplot_1.0.0 zoo_1.8-7
#> [73] haven_2.2.0 ggrepel_0.8.1 cluster_2.1.0
#> [76] fs_1.3.1 magrittr_1.5 data.table_1.12.8
#> [79] reprex_0.3.0 lmtest_0.9-37 RANN_2.6.1
#> [82] whisker_0.4 ProtGenerics_1.18.0 fitdistrplus_1.0-14
#> [85] hms_0.5.3 lsei_1.2-0 evaluate_0.14
#> [88] XML_3.99-0.3 readxl_1.3.1 gridExtra_2.3
#> [91] compiler_3.6.0 biomaRt_2.42.0 KernSmooth_2.23-16
#> [94] crayon_1.3.4 R.oo_1.23.0 htmltools_0.4.0
#> [97] later_1.0.0 RcppParallel_4.4.4 lubridate_1.7.4
#> [100] DBI_1.1.0 dbplyr_1.4.2 MASS_7.3-51.5
#> [103] rappdirs_0.3.1 cli_2.0.1 R.methodsS3_1.7.1
#> [106] gdata_2.18.0 metap_1.0 igraph_<IP_ADDRESS>
#> [109] pkgconfig_2.0.3 GenomicAlignments_1.22.1 plotly_4.9.1
#> [112] xml2_1.2.2 dqrng_0.2.1 XVector_0.26.0
#> [115] rvest_0.3.5 bibtex_<IP_ADDRESS> digest_0.6.23
#> [118] sctransform_0.2.1 RcppAnnoy_0.0.14 tsne_0.1-3
#> [121] Biostrings_2.54.0 rmarkdown_2.1 cellranger_1.1.0
#> [124] leiden_0.3.2 edgeR_3.28.0 uwot_0.1.5
#> [127] curl_4.3 Rsamtools_2.2.1 gtools_3.8.1
#> [130] lifecycle_0.1.0 nlme_3.1-143 jsonlite_1.6
#> [133] Rhdf5lib_1.8.0 limma_3.42.0 fansi_0.4.1
#> [136] viridisLite_0.3.0 askpass_1.1 BSgenome_1.54.0
#> [139] pillar_1.4.3 lattice_0.20-38 httr_1.4.1
#> [142] survival_3.1-8 glue_1.3.1 png_0.1-7
#> [145] bit_1.1-15.1 HDF5Array_1.14.1 stringi_1.4.5
#> [148] blob_1.2.1 caTools_1.18.0 memoise_1.1.0
#> [151] irlba_2.3.3 future.apply_1.4.0 ape_5.3


class: nord-dark, center, middle ## Building For automation ### Leveraging Data At Every Step Of The Process --- class: nord-dark, left, middle ### Background: Tracker 2.0 .fiftyfive[![tracker](images/landing_page.png)] --- class: nord-dark, center, middle .logo[![tracker logo](images/tracker.png)] ## Tracker is Boring ### In many ways, Tracker is the least interesting thing about Tracker --- class: nord-dark, middle, left ### The goal: Make security visible --- class: nord-dark, left, middle ### Can we build Tracker to support analysis? * Design to answer the kind of questions security asks * "Is that encrypted?" * "Can those talk?" * "What ports are open?" * "What version are you running?" * "Are you vulnerable?" * "Is it exploitable?" --- class: nord-dark, left, middle ### Analyzing any of this requires data * Platform: *data* (Kubernetes) * Infrastructure: *data* (Config Connector) * Languages: *data* (GitHub API) * Dependencies: *data* (GitHub API) * Workflow (who, and how): *data* (GitHub API) * Application code: *data* (GraphQL) * Inputs & validation: *data* (GraphQL) --- class: nord-dark, center, middle ## Platform as data: Kubernetes --- class: nord-dark, middle, left ### Kubernetes * describe your system with data * execute that description * *ensure system never deviates from the description* .sync.sixty[![](images/kubernetes-sync.svg)] --- class: nord-dark, left, middle ### When system descriptions are YAML * Data for analysis * Simplified operations --- class: nord-dark, left, middle ### Operations #### Deployment ```yaml - - image: gcr.io/track-compliance/frontend:master-320b5fd * + - image: gcr.io/track-compliance/frontend:master-d07b6e0 ``` #### Rollback ```yaml * + - image: gcr.io/track-compliance/frontend:master-320b5fd - - image: gcr.io/track-compliance/frontend:master-d07b6e0 ``` --- class: nord-dark, left, middle ### Analysis: Config on GitHub says... ```bash $ git clone --depth 1 git@github.com:canada-ca/tracker.git && cd tracker $ kustomize build platform/overlays/gke | \ > yq 'select(.kind == "Service" and .spec.type == "LoadBalancer").spec.ports[].port' 80 443 ``` --- class: nord-dark, left, middle ### Analysis: System on Google Cloud shows ```bash tyler@ghost:~$ sudo nmap -p- --reason tracker.alpha.canada.ca Starting Nmap 7.80 ( https://nmap.org ) at 2021-03-01 14:47 AST Nmap scan report for tracker.alpha.canada.ca (<IP_ADDRESS>) Host is up, received syn-ack ttl 56 (0.058s latency). rDNS record for <IP_ADDRESS>: <IP_ADDRESS>.bc.googleusercontent.com Not shown: 65533 filtered ports Reason: 65533 no-responses PORT STATE SERVICE REASON 80/tcp open http syn-ack ttl 56 443/tcp open https syn-ack ttl 56 Nmap done: 1 IP address (1 host up) scanned in 191.39 seconds ``` --- class: nord-dark, middle, left ### Why this works * Data is on GitHub * Changes flow through .gitops.sixty[![gitops](images/gitops2.svg)] --- class: nord-dark, middle, left ### Bringing these ideas to the infrastructure layer... --- class: nord-dark, middle, left ### Infrastructure as Data: Config Connector * Describe GCP infra/services in Kubernetes data format * Extends Kubernetes to act on these new types .sync.sixty[![](images/config-connector-sync.svg)] --- class: nord-dark, middle, left ### Hosted SQL database "as data" ```yaml apiVersion: sql.cnrm.cloud.google.com/v1beta1 * kind: SQLInstance metadata: name: sqluser-dep spec: region: northamerica-northeast1 databaseVersion: MYSQL_5_7 settings: backupConfiguration: enabled: true binaryLogEnabled: true startTime: "18:00" ipConfiguration: requireSsl: true tier: db-n1-standard-1 ``` --- class: nord-dark, middle, left ### When our description is YAML... --- class: nord-dark, middle, left ### Policy: Meets data residency requirements? ```yaml apiVersion: sql.cnrm.cloud.google.com/v1beta1 kind: SQLInstance metadata: name: sqluser-dep spec: * region: northamerica-northeast1 databaseVersion: MYSQL_5_7 settings: backupConfiguration: enabled: true binaryLogEnabled: true startTime: "18:00" ipConfiguration: requireSsl: true tier: db-n1-standard-1 ``` --- class: nord-dark, middle, left ### Operations: Are backups getting done? ```yaml apiVersion: sql.cnrm.cloud.google.com/v1beta1 kind: SQLInstance metadata: name: sqluser-dep spec: region: northamerica-northeast1 databaseVersion: MYSQL_5_7 settings: * backupConfiguration: * enabled: true binaryLogEnabled: true startTime: "18:00" ipConfiguration: requireSsl: true tier: db-n1-standard-1 ``` --- class: nord-dark, middle, left ### Security: Encryption in transit? ```yaml apiVersion: sql.cnrm.cloud.google.com/v1beta1 kind: SQLInstance metadata: name: sqluser-dep spec: region: northamerica-northeast1 databaseVersion: MYSQL_5_7 settings: backupConfiguration: enabled: true binaryLogEnabled: true startTime: "18:00" ipConfiguration: * requireSsl: true tier: db-n1-standard-1 ``` --- class: nord-dark, middle, left ### Unlike Word Docs, data is dual use * Always up to date because it's needed for operations * YAML is human readable, supporting manual analysis * YAML is machine readable supporting automated analysis --- class: nord-dark, middle, left ### Data as documentation * We can ensure this documentation reflects reality .configconnector.eighty[![gitops](images/gitops.svg)] --- class: nord-dark, middle, left ### Can we build Tracker to support analysis? * More than we thought! * Everything from service accounts to input validation is visible from the outside * Tracker is now data that can be input in to some other process --- class: nord-dark, left, middle ### The concept: limit access to actual cluster resources by representing everything you can as data and validate that instead --- class: nord-dark, middle, left ### Proof of concept: Generating ITSG controls ```bash $ cat sqlinstance.yaml apiVersion: sql.cnrm.cloud.google.com/v1beta1 kind: SQLInstance metadata: name: sqluser-dep spec: region: northamerica-northeast1 databaseVersion: MYSQL_5_7 settings: backupConfiguration: enabled: true binaryLogEnabled: true startTime: "18:00" ipConfiguration: requireSsl: true tier: db-n1-standard-1 ``` --- class: nord-dark, middle, left, smaller-text ### Proof of concept: Generating ITSG controls ```bash $ cat sqlinstance.yaml | ./itsg { "CP-9": { "name": "Information System Backup", "satisfiedBy": [ { "default:SQLInstance:sqluser-dep": "spec.settings.backupConfiguration.enabled: true" } ] }, "PE-18": { "name": "Location Of Information System Components", "satisfiedBy": [ { "default:SQLInstance:sqluser-dep": "spec.region: northamerica-northeast1" } ] }, "SC-8": { "name": "Transmission Confidentiality And Integrity", "satisfiedBy": [ { "default:SQLInstance:sqluser-dep": "spec.settings.ipConfiguration.requireSsl: true" } ] } }``` --- class: nord-dark, left, middle ### The ingredients for an automated ATO? * Kubernetes: 56 data types * Config Connector: 91 data types * 147 Lego blocks, that can build any system (Tracker uses 26) * Each has ~2-10 properties relevant to answering our questions: * Does it meet policy requirements? * Is it configured securely? * Does it follow best practice? --- class: nord-dark, left, middle ### We (Security) need experiments like this * Dev: 🐩🐩🐩🐩🐩🐩🐩🐩🐩🐩
🐩🐩🐩🐩🐩🐩🐩🐩🐩🐩
🐩🐩🐩🐩🐩🐩🐩🐩🐩🐩
🐩🐩🐩🐩🐩🐩🐩🐩🐩🐩
🐩🐩🐩🐩🐩🐩🐩🐩🐩🐩
🐩🐩🐩🐩🐩🐩🐩🐩🐩🐩
🐩🐩🐩🐩🐩🐩🐩🐩🐩🐩
🐩🐩🐩🐩🐩🐩🐩🐩🐩🐩
🐩🐩🐩🐩🐩🐩🐩🐩🐩🐩
🐩🐩🐩🐩🐩🐩🐩🐩🐩🐩
* Ops: 🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆 * Sec: 🐈 --- class: nord-dark, left, middle ### Making security visible empowers everyone to work on this problem * Dev: 🐈🐈🐈🐈🐈🐈🐈🐈🐈🐈
🐈🐈🐈🐈🐈🐈🐈🐈🐈🐈
🐈🐈🐈🐈🐈🐈🐈🐈🐈🐈
🐈🐈🐈🐈🐈🐈🐈🐈🐈🐈
🐈🐈🐈🐈🐈🐈🐈🐈🐈🐈
🐈🐈🐈🐈🐈🐈🐈🐈🐈🐈
🐈🐈🐈🐈🐈🐈🐈🐈🐈🐈
🐈🐈🐈🐈🐈🐈🐈🐈🐈🐈
🐈🐈🐈🐈🐈🐈🐈🐈🐈🐈
🐈🐈🐈🐈🐈🐈🐈🐈🐈🐈
* Ops: 🐈🐈🐈🐈🐈🐈🐈🐈🐈🐈 * Sec: 🐈 --- class: nord-dark, left, middle ## Other Fun Uses of "as data" ### What other problems can data solve? --- class: nord-dark, left, middle ### Domains: A single authoritative source for GoC Domains ```json "CSE-CST": { "acronym_en": "CSE", "acronym_fr": "CST", "organization_en": "Communications Security Establishment", "organization_fr": "Centre de la s\u00e9curit\u00e9 des t\u00e9l\u00e9communications", "domains": [ "ccirc-ccric.ca", "cse-cst-gc.ca", "ccirc-ccric.gc.ca", "cse-cst.gc.ca", "cyber.gc.ca", "getcybersafe.gc.ca", "pensezcybersecurite.gc.ca", "geekweek.ca", "getcybersafe.ca", "pensezcybersecurite.ca", "getcybersafe.com", "pensezcybersecurite.com" ] }, ``` --- class: nord-dark, left, middle ### ITSP.40.062 Guidance on Securely Configuring Network Protocols ```json { "ciphers": { "1.2": { "recommended": [ "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_ECDSA_WITH_AES_256_CCM", "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_ECDSA_WITH_AES_128_CCM", "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" ], ... ``` --- class: nord-dark, middle, center ## Questions?


--- layout: default overview: true --- REST Up! A Java Framework for building RESTful APIs REST RESTful APIs are redundant. Your code doesn't have to be. Get Started → TEST Concise and thorough API testing using sensible defaults. Start Testing →
REST Up!
 Your code doesn't have to be.
Concise and thorough API testing using sensible defaults.


| Name of the Individual | Industry Name | Date of Visit | Slot Booked | Number of People Acccompanied | Street Name | City Name | Pin/Zip Code | Edit Booking | Delete Record |
|---|---|---|---|---|---|---|---|---|---|
| {{ list.name_person }} | {{ list.industry_name }} | {{ list.date_visit }} | {{ list.slots_present }} | {{ list.visiting_members }} | {{ list.street_name }} | {{ list.city_name }} | {{ list.pin_code }} |


Weather Dashboard
City Here
(ICON)
Temperature:
Humidity:
Wind Speed:
UV Index:
5-Day Forecast:
Temp:
Humidity:
Temp:
Humidity:


Microfrontends using Web Components and Integration pattern
Text to send
Send
Enter you want to send to components.


01. Lesson Introduction
Lesson Introduction
Lesson Overview
In this lesson, we'll discuss the usage of private and public blockchains. We'll also go over how to interact between these 2 chains. To start the lesson, we'll go over some basic ideas, then later you'll go through the process of coding this interaction for yourself.
Public and Private Blockchains
Compare and contrast a public blockchain vs a private blockchain and discuss methods for cross-chain functionality.
Building a Simple Private Blockchain
Build from scratch a simple private blockchain that creates new blocks, store data in blocks, and secure blocks with a digital signature using a one-way hash.
To Build a Simple Private Blockchain, we'll work through 6 different parts that, once completed, will have you up and running with the core ideas behind building a simple private blockchain.
Part 1: Block Data Model
Part 2: Create New Blocks
Part 3: Store Blocks
Part 4: Linking Blocks
Part 5: Block Height and Timestamp
Part 6: LevelDB to Persist Data
Follow the code sessions local
If you want to follow the code from your own computer you can do it cloning or downloading the program Github Repository, and follow the path: nd1309-work-code/Course_Blockchain_Data/Practice_Private_Blockchain_Code_Session/
Complementary learning resources
I've really enjoyed making this lesson and hope you have a great experience building your own private blockchain!


Framework7 comes with powerful and most modern touch slider ever - Swiper Slider with super flexible configuration and lot, lot of features. Just check the following demos:
Swiper Examples
Framework7 comes with powerful and most modern touch slider ever - Swiper Slider with super flexible configuration and lot, lot of features. Just check the following demos:


interface CrosswordFormatter
The CrosswordFormatter interface provides a means to read and write crosswords to/from streams.
canRead |
Returns true if the formatter supports reading from a stream. abstract fun canRead(): Boolean |
canWrite |
Returns true if the formatter supports writing to a stream. abstract fun canWrite(): Boolean |
read |
Reads contents of an inputStream into a builder. Check canRead to ensure reading is supported. abstract fun read(builder: Builder, inputStream: InputStream): Unit |
setEncoding |
Sets the stream encoding for subsequent reads/writes. Almost all formatters are expected to have a default encoding, and not all will support all encodings, due to format restrictions or other reasons. abstract fun setEncoding(encoding: String): Unit |
write |
Writes contents of a crossword to an outputStream. Check canWrite to ensure reading is supported. abstract fun write(crossword: Crossword, outputStream: OutputStream): Unit |
CrosswordCompilerFormatter |
class CrosswordCompilerFormatter : SimpleXmlParser, CrosswordFormatter |
PuzFormatter |
PuzFormatter reads puzzles in Across Lite's .puz format, which is arguably the most popular format for exchanging crosswords. class PuzFormatter : CrosswordFormatter |
PzzlFormatter |
class PzzlFormatter : CrosswordFormatter |
UClickFormatter |
class UClickFormatter : SimpleXmlParser, CrosswordFormatter |
UClickJsonFormatter |
class UClickJsonFormatter : CrosswordFormatter |
WSJFormatter |
class WSJFormatter : CrosswordFormatter |


Before the Appellate Tribunal for Electricity (Appellate Jurisdiction) Appeal No. 111 of 2008 Dated : 28th May, 2009 Coram : Hon'ble Mrs. Justice Manju Goel, Judicial Member Hon'ble Mr. H. L. Bajaj, Technical Member IN THE MATTERS OF: Reliance Infrastructure Ltd. (formerly Reliance Energy Limited) Reliance Energy Centre, Santacruz (East), Mumbai ... Appellant Versus 1. The Maharashtra Electricity Regulatory Commission World Trade Centre No.1, 13th Floor, Cuffe Parade, Colaba, Mumbai - 400 001 2. Mumbai Grahak Panchayat Sant Dnyaneshwar Marg, Behind Cooper Hospital, Vile Parle (W), Mumbai - 400 056 3. Prayas C/o Amrita Clinic, Athawale Corner, Karve Road, No. of Corrections: Page 1 of 22 Appeal No. 111 of 2008 SH Deccan Gymkhana Pune - 411 004 4. Thane Belapur Industries Post: Ghansoli, Navi Mumbai - 400 071 5. Vidarba Industries Association Civil Lines, Nagpur - 400 041 ... Respondents Counsel for the appellant : Ms. Anjali Chandurkar, Ms. Smieetaa Inna Mr. Shiv Kumar Suri Counsel for the respondents: Mr. Buddy A. Ranganadhan for Resp. No.1 JUDGMENT
Justice Manju Goel, Judicial Member The present appeal is directed against the order of the Maharashtra Electricity Regulatory Commission (the Commission for short) dated 21st April, 2008, in Case No. 65 of 2007 in the matter Reliance Infrastructure Limited's (formerly known as Reliance Energy Limited) generation business, (also known as REL- G) annual performance review for the FY 2007-08 and tariff petition for the FY 2008-09. The Commission vide the impugned order assessed the annual revenue requirement and fixed the tariff under No. of Corrections: Page 2 of 22 Appeal No. 111 of 2008 SH section 61 and 62 of the Electricity Act, 2003. The appellant is aggrieved on account of the following counts:
i) The Commission has held that any gain in net generation out of reduction in the auxiliary consumption is realized through extra sale by REL- G and any benefit of better auxiliary consumption would be treated in the truing up of revenue and not in the truing up of expenditure. Accordingly, the Commission has not allowed the efficiency gain on additional net generation available on account lower auxiliary consumption and has considered the revenue from sale of additional energy as efficiency gain. The appellant contends that lower auxiliary consumption is already factored in lower actual fuel cost and lower variable cost of generation is worked out for the entire net generation including the additional energy available on account of lower auxiliary consumption. The appellant contends that the Commission ought to have computed efficiency gains of entire net generation i.e. on entire energy sold by REL-G and should not have considered the entire revenue from such sale as efficiency gain.No. of Corrections: Page 3 of 22
Appeal No. 111 of 2008 SH
ii) The Commission has considered the entire interest on working capital as efficiency gain since working capital requirement of the appellant for the FY 2007 had been met through internal accrual and not through debt. The appellant contends that this would be contrary to clause 34.5(e) of MERC (Terms & Conditions of Tariff) Regulations 2005 which provides that the rate of interest on working capital shall be on normative basis and shall be equal to short term prime lending rate of State Bank of India. It is contended that irrespective of the source from which the working capital is obtained the Commission should have allowed interest and the same could not have been considered as efficiency gain.
iii) The Commission has held that allowing income tax on change in income arising out of better performance and PLF incentive would be additional burden on the consumers and has not allowed the income tax on PLF incentive to be part of revenue requirement although the incentive itself has been taken as part of revenue. It is contended by the appellant that the incentive would lead to higher income tax liability for REL-G and the income tax No. of Corrections: Page 4 of 22 Appeal No. 111 of 2008 SH thereon should naturally be passed on to the consumers. In this connection it is also submitted that the benefit of better performance is passed on to the consumers in terms of cheaper power due to higher availability.
iv) The Commission has disallowed expenses under sub-head of 'Contributions and Donations' under A&G expenses for the FY 2007. The appellant contends that the said amount was expended towards community development and social welfare (such as maintenance of schools and technical training of all local youth of Dahanu where REL-G generation plant is located), maintenance of parks, gardens, plantations and other horticultural activities (as part of green belt in marshy areas required as per MPCB guidelines) and other environmental management & monitoring activities which formed a very small portion of O&M expenses. The appellant disclosed that such expenses were allowed when claimed separately in previous years although for the year in question, since these expenditures have been clubbed with 'Contributions and Donations' they have been disallowed.
No. of Corrections: Page 5 of 22Appeal No. 111 of 2008 SH
v) While the Commission has accepted the wage revision provision for the FY 2007, the full impact of wage revision on employee expenses of FY 2008 and FY 2009has not been allowed. The Commission has approved employee expenses for the FY 2008 and for the FY 2009 based on normative and inflationary rise over FY 2007 amount and ignored the fact that balance liability due to wage revision of FY 2007 is actually paid in 2008. Similarly, the Commission has not considered increased expenditure on account of terminal benefits such as Provident Fund, Gratuity and Superannuation on account of wage revision while the increased terminal benefits under the same settlement have been allowed for the FY 2007.
vi) The Commission has considered only Rs.10 Crores per year towards R&M of Fuel Gas De-
sulphurization (FGD) plant under partial truing up of FY 2008 and for tariff determination for the FY 2009 whereas the Commission had approved Rs.16.96 Crores per year on previous occasions.
No. of Corrections: Page 6 of 22Appeal No. 111 of 2008 SH
2) The Commission has not filed any response. We have heard the learned counsel for the appellant and have perused the written submissions.
Decision with reasons:
3) Efficiency gain on account of lower auxiliary consumption: Regulation 19.1 deals with sharing of gains and loses due to controllable factors. The gain in the present case has been caused by lower auxiliary consumption. The gain has to be shared in the manner prescribed in Regulation 19.1. One-third of the gain has to be passed on as rebate in tariff while one-third can be utilized at the discretion of the generating company. The remaining one-third has to be retained in a special reserve to meet future exigencies. The appellant computed the total efficiency gain at Rs.78.13 Crores. This was based on approved operational norms of heat rate and auxiliary consumption. The Commission, however, had the following to say on the appellant's claim for one-third of the gain out of controllable factors of reduced auxiliary consumption and better lower heat rate:
"... However, the Commission observes that REL has computed the efficiency gain based on net heat rate. If efficiency gain is computed on the basis of net heat rate, then the benefit of the better auxiliary consumption will get passed on twice as any gain in the net generation out of No. of Corrections: Page 7 of 22 Appeal No. 111 of 2008 SH the reduction in the auxiliary consumption is realized through the extra sales by REL-G. Therefore, the Commission has considered the efficiency gain on account of fuel cost on the basis of gross heat rate and any benefit out of the better auxiliary consumption would be treated in the truing up of the revenue and not in truing up of the expenditure. Further, the Commission has considered the sharing of gains in line with Tariff Regulations and has considered the sharing of gains as one third to be shared with the distribution licensee, i.e., REL-D, and two thirds of the gain to be retained by REL as against the REL submission of retaining one third of the gains as a special reserve for absorbing future loses.
The summary of the efficiency gain/loss as computed by REL and as approved by the Commission, due to variation in fuel cost, is shown in the Table below:
Table: Gain and loss due to variation in fuel cost as approved by the Commission (Rs. Crore) Particulars REL Commission Efficiency Gains [RECn - Act. Var cost] x Based on Gross SHR Net Generation Efficiency Gains 78.13 72.35 To be passed on to 26.04 24.12 Distribution Licensee (Consumers) To be retained as reserve 26.04 -
To be retained by REL-G 26.04 48.23
No. of Corrections: Page 8 of 22
Appeal No. 111 of 2008
SH
4) As per the Commission's calculations the total efficiency gains
is only Rs.72.35 Crores and not Rs.78.13 Crores. According to the Commission, in case efficiency gain is calculated in the manner done by appellant, the appellant will get benefit of efficiency gain twice. The reason for so believing is the Commission's view that any gain in net generation out of reduced auxiliary consumption results in extra sales by REL-G. The Commission has considered the efficiency gain on account of fuel cost on the basis of gross heat rate and any benefit out of better auxiliary consumption to be treated in the truing up of revenue and not in the truing up of expenditure. The appellant, however, explains that the production is determined by demand and not by auxiliary consumption. The appellant claims that the better operational parameters have actually gone in reducing the cost of production rather than in increase in sales as the generation has been only to the extent needed to meet the demand plus the auxiliary consumption. It will not be correct to say that on account of reduced auxiliary consumption there has been increase in sale to the extent of reduced auxiliary consumption. In fact, auxiliary consumption is a part of cost. When auxiliary consumption is reduced the total amount to be produced is also reduced. A generating company is required to generate as much as is required to meet the demand of the purchaser. In case generating company has to sell more power it has to produce more power. The production does not increase on No. of Corrections: Page 9 of 22 Appeal No. 111 of 2008 SH account of lower auxiliary consumption. Only the need to produce is reduced to the extent the auxiliary consumption is reduced. Therefore, reduction in auxiliary consumption does not actually mean increase in the sale of electricity units produced. The benefits of the better operational parameters go to the consumer in the form of reduced cost of generation and as sharing of efficiency gain as per provisions of Regulation19. To this extent we find merit in the appeal.
Treatment to interest on internal sources:
5) The appellant has employed internal sources to meet the demand for working capital. The Commission has not denied the interest on the working capital employed from internal sources. The Commission has treated such interest as efficiency gain so that one-third of such gain could be shared with the distribution company/the consumers. The Commission gave the following observations on this point:
"3.10 Interest on working capital As regards the Working Capital, REL submitted that the interest rate has been considered at 10.25% as considered by the Commission, in its Order dated October 3, 2006. Accordingly, REL estimated the Interest on Working Capital (IWC) considering interest rate @ 10.25% as per the No. of Corrections: Page 10 of 22 Appeal No. 111 of 2008 SH components considered in the Tariff Regulations, with the revised Interest on Working Capital estimated at Rs.17.13 Crore as against Rs.10.98 Crore approved by the Commission. REL-G further submitted that the primary reason for deviation is due to some elements of working capital, namely receivables for sale of electricity and payables for fuel, which are provided for in the Tariff Regulations, but were not considered by the Commission in its Order while estimating interest on working capital.
Further, REL-G has submitted in its reply to additional queries raised by the Commission that it has not availed any loan for working capital and has funded such working capital through internal accruals. Hence, REL has not actually incurred any expenditure towards interest on working capital during FY 2006-07.
Regulation 34.5 (d), of the Tariff Regulations stipulates as follows:
"In case of own generating stations, no amount shall be allowed towards receivables, to the extent of supply of power by the Generation Business to the Retail Supply Business, in the No. of Corrections: Page 11 of 22 Appeal No. 111 of 2008 SH computation of working capital in accordance with these Regulations".
Accordingly, the Commission has not considered the receivables from sale of electricity, while estimating the interest on working capital.
The Commission has estimated the normative working capital interest for FY 2006-07 based on expenses approved in this Order after truing up and the Commission's Tariff Regulations. However, the Commission has computed the sharing of gains/losses on the basis of normative working capital interest and the actual working capital interest incurred, which in this case is zero, since this is a controllable parameter. Further, the Tariff Regulations stipulates that rate of interest on working capital shall be considered on normative basis and shall be equal to the short-term Prime Lending Rate of State Bank of India as on the date on which the application for determination of tariff is made. As the short-term Prime Lending Rate of State Bank of India at the time when REL filed the Petition for tariff determination for FY 2006-07 was 10.75%, the Commission has considered the interest rate of 10.75% for estimating the No. of Corrections: Page 12 of 22 Appeal No. 111 of 2008 SH normative interest on working capital, which works out to Rs.6.35 Crore.
"The Commission has estimated the normative working capital interest for FY 2006-07 based on expenses approved in this Order after truing up and the Commissions Regulations. However, the Commission has computed the sharing of gains/losses on the basis of normative working capital interest and the actual working capital interest incurred, which in this case is zero, since this is a controllable parameter. Further, the Tariff Regulations stipulates that rate of interest on working capital shall be considered on normative basis and shall be equal to the short-term Prime Lending Rate of State Bank of India as on the date on which the application for determination of tariff is made. As the short-term Prime Lending Rate of State Bank of India at the time when REL filed the Petition for tariff determination for FY 2006-07 was 10.75%, the Commission has considered the interest rate of 10.75% for estimating the normative interest on working capital, which works out to Rs.6.35 Crore." .....
3.15 Sharing of gains and losses in FY 2006-07 .........
No. of Corrections: Page 13 of 22Appeal No. 111 of 2008 SH Interest on Working Capital As discussed in the above paragraphs, the actual interest on working capital incurred by REL during FY 2006-07 is nil and the normative interest on working capital approved by the Commission considering other elements of expenses as approved after truing up, works out to Rs.6.37 Crore. As the actual expenditure under this head is zero, the Commission has considered the entire normative interest on working capital as efficiency gains and has considered sharing of the same with the distribution licensees in the appropriate ratio, as discussed while sharing efficiency gains due to fuel cost."
6) It is submitted on behalf of the appellant that when working capital is funded through internal sources of the appellant, the internal funds also carry cost. It is further submitted that such funds employed elsewhere would have carried interest income.
7) The Commission observed that in actual fact no amount has been paid towards interest. Therefore, the entire interest on working capital granted as pass through in tariff has been treated as efficiency gain. It is true that internal funds also deserve interest in as much as the internal fund when employed as working capital loses the interest it could have earned by investment elsewhere. Further the licensee can never have any funds which has no cost.
No. of Corrections: Page 14 of 22Appeal No. 111 of 2008 SH The internal accruals are not like some reserve which does not carry any cost. Internal accruals could have been inter corporate deposits, as suggested on behalf of the appellant. In that case the same would also carry the cost of interest. When the Commission observed that the REL had actually not incurred any expenditure towards interest on working capital it should have also considered if the internal accruals had to bear some costs themselves. The Commission could have looked into the source of such internal accruals and the cost of generating such accruals. The cost of such accruals or funds could be less or more than the normative interest. In arriving at whether there was a gain or loss the Commission was required to take the total picture into consideration which the Commission has not done. It cannot be said that simply because internal accruals were used and there was no outflow of funds by way of interest on working capital and hence the entire interest on working capital was gain which could be shared as per Regulation No. 19. Accordingly, the claim of the appellant that it has wrongly been made to share the interest on working capital as per Regulation 19 has merit.
Contributions and Donations:
8) Expenses mentioned as contributions and donations were incurred by the appellant towards community development, social No. of Corrections: Page 15 of 22 Appeal No. 111 of 2008 SH welfare and environmental activities. Environmental activities included brick making, maintaining green belt, maintaining parks, landscaping etc. the Commission on this aspect had the following to say:
"The Commission observed that the 'contribution/donations' sub-head under A&G expenses includes an expense of Rs.1.96 Crore as against the actual expenses of Rs. 0.02 Crore in FY 2005-06. The Commission asked REL to submit the basis and need for this expense, and also to provide the rationale for including this expense as recoverable from consumers. REL, in its reply, submitted that it incurred expenditure towards community development, social welfare and environmental activities such as maintenance of parks, plantation and maintenance of nursery and horticulture activities, environmental monitoring, etc."...
The Commission is of the view that if the company or the shareholders of the company wish to contribute/donate towards charitable causes and community development, the same should be contributed from the return earned out of the business, rather than passed on to the Utility's consumers. Hence, for truing up purposes for FY 2006-07, No. of Corrections: Page 16 of 22 Appeal No. 111 of 2008 SH the Commission has not considered the expense of Rs. 1.96 Crore".
9) It is submitted on behalf of the appellant that in earlier years such expenditures were allowed whereas for the year in question such expenses clubbed under Contributions and Donations have been disallowed. It is explained by the appellant that Contributions and Donations were towards community development, social welfare and environmental activities such as brick making activities, maintenance of schools and technical training of local youths, environmental management activities including green belt programme in marshy areas around power station which includes parks, plantations, nursery and landscaping as per guidelines of Maharashtra Pollution Control Board (MPCB) and small gifts in the forms of prizes and mementoes in recognition of good performance. It is contended by the appellant that almost all the expenses falling under the heading Contributions and Donations have been incurred for statutory compliance. The consent to operate issued by MPCB for appellant's Dahanu thermal power station stipulates that a green belt with tree plantations shall be maintained up to 100 meters periphery of the station towards Dahanu and not less than 50 meters periphery on three sides. It is also contended that the appellant is required to comply with the direction regarding utilisation of the ash of the power station as per instructions contained in notification issued by Ministry of Environment & No. of Corrections: Page 17 of 22 Appeal No. 111 of 2008 SH Forest. The appellant has filed a copy of the Maharashtra Pollution Control Board's order consent No. BO/WPAE/Thane-68/CC/131 dated 23.03.04 under section 26 of the Water (Prevention & Control of pollution) Act 1974 & under section 21 of the Air (Prevention & Control of Pollution) Act, 1981 and under Rule 5 of the Hazardous Wastes (Management & Handling) Rules 1989 in respect of thermal power station at Dahanu. The order mentions the conditions for the permission which, inter alia, include utilisation of the ash and maintenance of a green belt on all the four sides of the power plant. If the appellant is statutorily required to carry out certain activities in order to run the power plant it will only be appropriate that the expenses towards such activities is allowed to be recovered. However, the entire expenses disallowed namely Rs.1.96 Crores is not incurred on account of such activities. The Commission has to identify those expenses which are incurred to meet statutory obligations and those incurred to voluntarily under take social welfare measures. The Commission is, thereafter, to allow as pass through the expenses incurred to meet statutory obligations.
10) The appellant has cited a judgment of this Tribunal in appeal No. 251 of 2006 relating to the tariff order for FY 2005-06 and 2006-07. However, that judgment has no reference to activities carried out to meet the norms for protection of environment or in respect of the activities related to community development and social welfare.
No. of Corrections: Page 18 of 22Appeal No. 111 of 2008 SH Income tax liabilities on incentives:
11) The appellant claimed an amount of Rs.22.79 Crores as PLF incentive for the FY 2006-07. The Commission permitted an amount of Rs.21.83 Crores as PLF incentive and considered the said amount as part of the revenue for FY 2007. However, coming to the income tax liability on the amount of incentive allowed the Commission had the following to say :
"As regards tax on income arising out of sharing of gains due to better performance and PLF incentive, the Commission is of the view that the expenses incurred for achieving better performance (such as A&G, R&M, etc.) including higher PLF has already been allowed as pass through by the Commission and allowing tax on income arising out of better performance will put additional burden to consumers. Hence, the Commission has not considered the tax on income arising out of sharing of gains due to better performance and PLF incentive income.
Based on above principles, the Commission has estimated the income tax of REL-G on stand alone basis by considering the income and expenses as per approved No. of Corrections: Page 19 of 22 Appeal No. 111 of 2008 SH ARR after truing up for FY 2006-07, as Rs. 7.69 Crore." (pgs. 69-70)"
12) As can be seen from the portion of the impugned order, quoted above, the Commission has disallowed the tax arising out of the better performance on the ground that the same would be an additional burden on the consumers. The Commission itself has not quoted any Regulation under which income tax on the incentive allowed can be denied to a generating company. The Regulation 34.2.1, of the MERC Tariff Regulations, which deals with income tax does not make any exception for the income arising out of incentive. Therefore, as per the Regulation the appellant is entitled to recover the income tax payable on the change in income on account of PLF incentive. Therefore, we find merit in the appellant's prayer for income tax on incentive to be given to it as a pass through.
13) The other two prayers related to employees expense and R&M of fuel gas de-sulphurization plant have not been pressed.
14) In view of our above discussion, we allow the appeal in part. The Commission will have to allow the claim of the appellant towards efficiency gain on account of lower auxiliary consumption, treatment of interest on internal sources, contributions and donations as well as income tax liabilities and incentives. So far as No. of Corrections: Page 20 of 22 Appeal No. 111 of 2008 SH prayers related to employees expenses and R&M of fuel gas de- sulphurization plant are concerned, the same are not pressed and hence rejected.
15. We allow the appeal in part with the following directions:
a) The Commission will allow the claim of the appellant towards efficiency gain on account of better operational performance on the entire actual exbus energy sent out rather than on the basis of truing up of revenue
b) The interest on working capital, for the year in question, shall not be treated as efficiency gain
c) The income tax payable on the PLF incentive will be treated as pass through
d) The Commission shall identify expenses which are incurred to meet statutory obligations and treat such expenditure included in the head 'contributions and donations' as pass through in tariff.No. of Corrections: Page 21 of 22
Appeal No. 111 of 2008 SH
e) The claim of the appellant towards employees expenses and R&M on fuel de-sulphurization plant are rejected as not pressed.
16) The Commission shall give effect to this judgment in the ensuing truing up and tariff order.
17) Pronounced in open court on this 28th day of May, 2009.
( H. L. Bajaj ) ( Justice Manju Goel )
Technical Member Judicial Member
No. of Corrections: Page 22 of 22
Appeal No. 111 of 2008
SH


A Test Form for Uploading A CSV FIle
Read Data From Pegasus DB
Save Data On Pegasus for Testing
Send SMS Via Voto API
Read Data From Aggregate


Poloidal and toroidal potentials in spectral and radial space¶
The [V|B|T]_lmr outputs controls the output of potential files
(V_lmr_#.TAG, B_lmr_#.TAG and
T_lmr_#.TAG). These are files contain
the poloidal and toroidal flow and magnetic field potentials (and entropy/temperature)
written in spectral and radial spaces (for instance w(lm_max, n_r_max)
).
These files can be quite handy since they can be possibly used to reconstruct any
quantity in the spectral space or in the physical space you may be interested in.
Standard inputs¶
n_pot_step (default
n_pot_step=0
) is an integer. This is the number of timesteps between two[V|B|T|Xi]_lmr
outputs.
n_pots (default
n_pots=1
) is an integer. This is the number of[V|B|T|Xi]_lmr
outputs to be written.
t_pot (default
t_pot=-1.0 -1.0 ...
) is real array, which contains the times when[V|B|T|Xi]_lmr
outputs are requested.dt_pot (default
dt_pot=0.0
) is a real, which defines the time interval between two[V|B|T|Xi]_lmr
outputs.t_pot_start (default
t_pot_start=0.0
) is a real, which defines the time to start writing[V|B|T|Xi]_lmr
outputs.t_pot_stop (default
t_pot_stop=0.0
) is a real, which defines the time to stop writing[V|B|T|Xi]_lmr
outputs.


Neural style transfer is an optimization method, where the neural network is not trained to do anything. Rather we used a pretrained convolutional neural network to minimize two new loss functions, using three images: a content image which represents the image you are trying to stylize, a style image which represents the style you are trying to achieve, and the input image which is a tensor the shape of the content image that is initialized to be random noise.
The three images go through layers of the pretrained network where we use the outputs of intermediate layers to calculate the aforementioned loss functions, one which computes how close the input image's style is compared to that of the style image and an other which computes how close the input image's content is to the conent image. The loses are then used to modify the input image, this process is repeated for a few iterations, and hopefully by the end the input image is stylized version of the content image.
The use of a pretrained network is so the network understands what is in the content image. A network trained on image classifications knows how to create internal representations of the content image, by taking the outputs of layers near the end of the network, the values will be very close the the actual content image. Then we use Euclidean distance between the representation and the input image tensor, to get the content loss.
The process is very similar for the style loss, expect we use a Gram matrix instead. To create a Gram matrix, we multiply a matrix with it's transpose, the reason this is done is because a Gram matrix contain non-localized information of the multipled matrix, in the case of images this information is the texture, shapes and weights. Having the Gram matrix of intermediate representations of the style image and the Gram matrix of the input image, we find the Euclidean distance between them, the result is the style loss.
To complete this small project, I followed a tutorial on tensorflow website on neural style transfer and read the paper A Neural Algorithm of Artistic Style[Leon A. Gatys, Alexander S. Ecker, Matthias Bethge]. The goal with this was to get to know more about tensorflow and keras, as well as, the VGG19 convolutional neural net, which is pretrained on ImageNet. After having written the code, I tested various content images and style images, applying different weight to see the result, some of which are quite satisfying. The weights are a way of telling the network how much of the content or style you want in the input image.


Center.js is jQuery library to make element center as compared to his outside element. It's also work in responsive. Download from github
Add script like this

( Horizontally and vertically center with single element )
This for first we need to assign outside element to data-box. Then need to assign inside element to data-center. So here inside element set center as compared to his outside element.

data-center

data-center
( Vertically center with multipal element )
This for first we need to assign outside element to data-box. Then need to assign inside element to data-mvcenter. So here all inside element set vertically center as compared to his outside element.

data-mvcenter

data-mvcenter

data-mvcenter

data-mvcenter
data-mvcenter
data-mvcenter
( Horizontally center with multipal element )
This for first we need to assign outside element to data-box. Then need to assign inside element to data-mhcenter. So here all inside element set horizontally center as compared to his outside element.

data-mhcenter

data-mhcenter

data-mhcenter

data-mhcenter
data-mhcenter
data-mhcenter
( Vertically center with single element )
This for first we need to assign outside element to data-box. Then need to assign inside element to data-vcenter. So here inside element set vertically center as compared to his outside element.

data-vcenter

data-vcenter
( Horizontally center with single element )
This for first we need to assign outside element to data-box. Then need to assign inside element to data-hcenter. So here inside element set horizontally center as compared to his outside element.

data-hcenter

data-hcenter
Here below example in show that one data-box inside onther data-box. So we can use multipal center.js element (data-center, data-vcenter, data-hcenter, data-mvcenter, data-mhcenter). But we can't use one data-box in child in multipal center.js element.

data-mvcenter

data-mvcenter

data-hcenter
data-vcenter


Excalidraw Libraries
A directory of public libraries that you can easily add to Excalidraw.
Follow the instructions if you want to add your own library into this list.
All the following libraries are under MIT License.
A directory of public libraries that you can easily add to Excalidraw.
Follow the instructions if you want to add your own library into this list.
All the following libraries are under MIT License.


Opening Remarks: Jeffrey S. Monroe MS ATC, BSATSMC Executive Director, Michigan State University, Emeritus
"More than just Wheezing: Best Practices Care of the Athlete with Asthma" Robert Baker MD, Homer Stryker M.D. School of Medicine, Western Michigan University
"The New NATA C-Spine Consensus Statement" Ron Courson PT AT, Head Athletic Trainer, University of Georgia
“Integrating Our Sports Medicine Knowledge into Performing Arts” Randy Dick MS, Consultant with Athletes and the Arts
Super Bowl/Welcome Party Extraordinaire... Reception for attendees, sponsored by DJO Global
"Healthy Shoulders in the Air Raid Offense” Andrew Mutnan, MS AT, Head Football Athletic Trainer, Washington State University
"The Value of Active Recovery with Aquatic Therapy" Rob Miller and Mike Ryan of HydroWorx
"Critical Incident Stress Management-Peer Support" Perry Denehy, Cincinnati, OH
"Biologic Applications" Kirk Hanson, Burst Biologics and Nu-Technology Sports
Exhibits Open
"The Use of Pressure Wave Technology in Professional, Collegiate and Amateur Sports" Carmine DellaSala, Vice President, Medical Wave
"Unweighted Running and Stress Fractures" Jimmy Bean, Alter-G
"Percutaneous Neurostimulation for the Treatment of Chronic, Acute and Postoperative Pain" Brad Siff, BioWave, Scientific Presentation
“What Eye Movements Can Tell Us About Health.” Barbara Barclay, CEO RightEye
"Sideline Screening for Concussion at Standford-Visual Orientation Focus" Jam Ghajar MD, Stanford University
"Accelerated Recovery Using Focused Nutrition: Biology, Delivery Model and Case Reports" Dr. Kimball, Forte Elements
“Team Physician Issues in Professional Sports" George Paletta MD, The Orthopedic Center of Saint Louis
“Training Opportunities: The Next Generation of Instrumented Helmet Technologies.” Devin Hamrick
“Prevention of Sudden Cardiac Death in Athletes" Kim Harmon MD, University of Washington
"Evidence Supporting Photbiomodulation" John Bruno ATC, MultiRadiance
Exhibit Break
"Vorteq - Finally: Automated Thermal Contrast Therapy!" Dave Schaefer and Rich Smith of Cascade Wellness Technologies
“Orthobiologics Injections and the Usage of Ultrasound” Jason Uhlenhake AT, Harbor View Sports Medicine, Des Moines, IA
“Modeling Heat Stroke in a Football Player: A Case Study of Korey Stringer" Bud Cooper PhD AT, University of Georgia
"Drug Use in Sport: What you need to know as “The Team Behind the Team”. Kathy J. Turpin PhD, Drug Free Sport
Drug Free Sport Sponsor's Reception in Exhibit Hall, Complimentary Beer, Wine and Soft Drinks with light hors d'oeuvres
“Pathophysiology of Concussion” Chris Giza, MD, UCLA Neurology
“The Sports Neurology Clinic: Autonomic Dysfunction in Concussion and Post-Concussion Syndrome” Anthony Savino, MD, The Sports Neurology Clinic, Core Institute, Brighton, MI
“Applying Targeted, Active Treatment Approaches to Sport Concussion: Case Examples” Mickey Collins PhD, University of Pittsburgh Medical Center, Sports Medicine Concussion Program
Exhibitor Break
“The Utility of Oculomotor Measures in the Evaluation of Sport-Related Concussion.” RJ Elbin PhD, Office for Sport Concussion, University of Arkansas
“Using Evidence to Better Understand Concussion Clinical Profiles.” Anthony Kontos PhD, University of Pittsburgh Medical Center Sports Medicine Concussion Program
“Do Changes in Neurovascular Coupling Provide Earliest Evidence of Accumulation of Subconcussive Injury?" Tom Talavage PhD, Purdue University
"Alternative Medicine in Concussion Treatment" Nicole Reams MD, North Shore Hospital, Chicago, Il.
“Concussion Management: Trends, Changes & Concerns” Rod Walters PhD, University of South Carolina, Emeritus
“Professional Action Sport Athletes' Experiences with and Attitudes Toward Concussion" Caroline Faure EdD, Idaho State University
“Gender Considerations in Concussion Management” Meeryo Choe MD, UCLA Department of Neurology
“Concussion Care in Youth Contact Sport Athletes” Sean Rose MD, The Sports Neurology Clinic
“Beyond Concussion: Managing Athlete Brain Health” Jeffrey Kutcher MD, The Sports Neurology Clinic
Exhibitor Break
“Endocrine Dysfunction Syndromes in mTBI and Chronic Brain Truama” Tad Seifert MD, Norton Health Care, Louisville, KY
“Lack of Awareness of the Spectrum of Tau Deposits in Normal Aging.” Rudy Castellani MD, Department of Neurology, Homer Stryker M.D. Medical School, Western Michigan University
“Sports Neurology Rounds: Challenging Cases in Return to Sports Participation” Erik Beltran, MD and Matthew McCarthy, MD - The Sports Neurology Clinic
INTERACTIVE POSTER REVIEW SESSION QUESTIONS & PANEL DISCUSSION – ALL PRESENTERS
“Proximal Hamstring Injuries – Surgical and Non-Surgical Management” Geoff Baer PhD, MD, Team Physician, University of Wisconsin
“Hip Arthroscopy – Treatment of the Athlete” Brian Walczak DO, University of Wisconsin
“Patellofemoral instability and treatment Options” David Diduch MD, University of Virginia
“Labral Tears in the Overhead Athlete” Keith Kenter MD, Homer Stryker M.D. School of Medicine, University of Western Michigan
“Rehabilitation and Bracing Options for Shoulder Injuries in Contact Sports” Michael Moll AT, Head Football Athletic Trainer, University of Wisconsin
"Conservative Rehabilitation of the ACL Deficient Athlete" and "Neuro-cognitive Concepts for Shoulder Rehabilitation" Gary Diny, Physical Therapist, University of Wisconsin
Special Hands on Workshop:
“MSK Ultrasound Diagnostics within the Athletic Training Room” Shawn Felton PhD, Florida Gulf Coast University
"Ethical Dilemmas within Sports Medicine" Doug McKeag MD, University of Indiana Medical School, Emeritus
“Pain Control Options in the Injured and Surgical Athlete" Leslie Goodavish PA, University of Wisconsin
“Update of Female ACL Injuries: Gender Based Findings” Kristyn Darmafall MD, University of Wisconsin
“Hand Injuries in the In-season Athlete” Jon Tueting MD, University of Wisconsin
“Sports Specialization in the Young Athlete”David Bernhardt MD, University of Wisconsin
“Using Big Data to Enhance Performance and Reduce Risk in Athletes” Drew Watson MD, University of Wisconsin
"Framework for an Inter-Professional Behavioral Medicine Model" Jennifer Chadburn MS AT, Boston University
“Risk Reduction of ACL Injury with Hormone-Containing Contraceptives” Erin Hammer MD, University of Wisconsin
“Platelet-Rich Plasma (PRP) and Stem Cells Injections” John Wilson MD, Team Physician, University of Wisconsin
“Doping and How to Get Around Anti-Doping" Lucianne Olewinski MD, University of Wisconsin
“Cardiac Issues in Athletes” Chris Goodavish PA, University of Wisconsin
“Ankle Instability, Ankle Arthroscopy” Mihir Patel MD, OrthoIndy, Indianapolis, IN
"Ethical Issues in Sports Medicine: Preventing Moral Decline" Kimberly S. Peer, EdD, ATC, FNATA, Kent State University


Three.js Demo
Geometries
Geometry
Box
Sphere
Cone
Cylinder
Icosahedron
Dodecahedron
Torus
Torus Knot
Size
Materials
Material
Basic
Standard
Depth
Lambert
Phong
Toon
Normal
Size
Textures
Texture
Ionic Logo (Black)
Ionic Logo (Transparent)
Size
Lighting
Light
Ambient
Directional
Point
Spot
Size
Cameras
Camera
Perspective
Orthographic
Size


apache_beam.testing.test_pipeline module¶
Test Pipeline, a wrapper of Pipeline for test purpose
-
class
apache_beam.testing.test_pipeline.
TestPipeline
(runner=None, options=None, argv=None, is_integration_test=False, blocking=True)[source]¶ Bases:
apache_beam.pipeline.Pipeline
TestPipeline
class is used inside of Beam tests that can be configured to run against pipeline runner.It has a functionality to parse arguments from command line and build pipeline options for tests who runs against a pipeline runner and utilizes resources of the pipeline runner. Those test functions are recommended to be tagged by
@attr("ValidatesRunner")
annotation.In order to configure the test with customized pipeline options from command line, system argument
--test-pipeline-options
can be used to obtains a list of pipeline options. If no options specified, default value will be used.For example, use following command line to execute all ValidatesRunner tests:
python setup.py nosetests -a ValidatesRunner \ --test-pipeline-options="--runner=DirectRunner \ --job_name=myJobName \ --num_workers=1"
For example, use assert_that for test validation:
pipeline = TestPipeline() pcoll = ... assert_that(pcoll, equal_to(...)) pipeline.run()
Initialize a pipeline object for test.
Parameters: - runner (PipelineRunner) – An object of type
PipelineRunner
that will be used to execute the pipeline. For registered runners, the runner name can be specified, otherwise a runner object must be supplied. - options (PipelineOptions) – A configured
PipelineOptions
object containing arguments that should be used for running the pipeline job. - argv (List[str]) – A list of arguments (such as
sys.argv
) to be used for building aPipelineOptions
object. This will only be used if argument options isNone
. - is_integration_test (bool) –
True
if the test is an integration test,False
otherwise. - blocking (bool) – Run method will wait until pipeline execution is completed.
Raises: ValueError
– if either the runner or options argument is not of the expected type.- runner (PipelineRunner) – An object of type


Recent tweets for 's search query
Data taken from the twitter API to get the last 500 tweets for the search query. Hover over a node to see details.
Top nodes are users and bottom nodes are tweets.
By default the data stored in local storage under key sctg_data
, is used for plotting.
To plot using new data go to the Query data section.
This visualization is developed using Social Communication Temporal Graph library.


{% for resolution in resolutions %}
{% with overview=resolution.overview but=resolution.but.count however=resolution.however.count because=resolution.because.count %}
{% if show_stats %}
{{ because }} {% trans "because" %}{{ but }} {% trans "but" %}{{ however }} {% trans "however" %}


Presentation by Jason Pierce / @DistractionBoy_
A tool that puts together a number of upcoming web standards to quickly produce web apps
How does it do this? Polyfills - downloadable code which provides facilities that are not built into a web browser. It implements technology that a developer expects the browser to provide natively, providing a more uniform API landscape. For example, many features of HTML5 are not supported by versions of Internet Explorer older than version 8 or 9, but can be used by web pages if those pages install a polyfill.
Keep this in the back of your head.How do we currently load other files into the current markup we're looking at?
...
...
Using "link" statements always allow for concurrent downloading and then parsing, whereas "@import" can cause funny things to happen.
You might say, "But we use '@import' in our SCSS files all the time with no performance issues or 'funny things' happening".
We use Compass or another compiler which loads the @import'ed stylesheets, and parses all of them at once and spits them out into one minified css file, and
YAAAAAAY! No performance or compile issues!!!!!!
In a similar fashion, we add javascript/jquery to an HTML page with either...
...
The web's most basic content, HTML, requires the greatest amount of effort to work with. - Eric Bidelman
In the < head > section ...
The URL of an import is called an import location. To load content from another domain, the import location needs to be CORS-enabled:
The import statement allows us to make and use Web Components, which are custom elements, or encapsulated bits of HTML, CSS and Javascript. They make use of:
Note: The browser's network stack automatically de-dupes all requests from the same URL. This means that imports that reference the same URL are only retrieved once. No matter how many times an import at the same location is loaded, it only executes once. - Eric Bidelman
To get the import statement to work, you need:
Cross-Origin Resource Sharing (CORS) is a W3C spec that allows cross-domain communication from the browser. By building on top of the XMLHttpRequest object, CORS allows developers to work with the same idioms as same-domain requests.
Polymer's website says that if you are working within a local project, and do not import resources from another domain (www.resourcehere.com) you do not need a local server running.
However, this was not the case for me. Using Gulp, even with a liveReload local server running, I was not able to successfully use import'ed html resources, even though they were within my own project files.
When it was tried to import Polymer into an existing project with typical Gulp settings using the instructions on Polymer's website, none of the Polymer styles or behaviors would work.
Upon further investigation, the Polymer website said that it was working on a build tool/setup for Gulp, and that it had one for grunt already.
After switching back to Grunt, and carefully reading the documentation for using core-elements, I was able to scaffold my app and tweak the given web components to my needs.
main axis : main-start | main-end : main size : cross axis : cross-start | cross-end : cross size
Containing element has either "horizontal" or "vertical" attribute, plus the word "layout". If it's the < body > element, you can also add "fullbleed".
Child elements typically have more attributes, because they can be both child and parent elements to another child element. Using "flex" will make a child element stretch to fill space across the main axis. Using number amounts will define the ratio to the length of the other child elements (e.g. "flex two" will be twice as big as "flex" and "flex six" will be three times as big as "flex two")
Align across the main-axis with "start-justified", "center-justified", and "end-justified". Align across the cross-axis with "self-start", "self-center", "self-end", and self-stretch.
Auto-vertical, an attribute that is supposed to adjust horizontal layouts into vertical ones when narrow media queries are triggered, DOES NOT WORK.
Some fit within each other and play nicely together, and some do not. Trial and error is the only way to find out which is which. Quick Guide
For a more comprehensive look into customizing these elements, you need to look up each element individually.
Through much trial and error, and looking at the code of examples, I finally got it to do what I wanted to do by adding "main condenses keepcondensedheader headerHeight="263" condensedHeaderHeight="64" flex" as attributes, and adding a style to the core-toolbar's shadow element #mainheader negating the default background color.
Javascript was added to add/remove elements on different screen widths
All contained within core-drawer-panel, including the content.
:host {
display: block;
position: relative;
}
core-scroll-header-panel::shadow #headerBg {
background-image: url('header-bg.jpg');
}
core-scroll-header-panel::shadow #condensedHeaderBg {
background-color: $emerald-green;
}
CSS styles defined in Shadow DOM are confined to Shadow Root, meaning any ID tags inside the Shadow Root will not conflict with those on the outside.
:host([mode=scroll]) #mainContainer {
overflow: visible;
}
:host([mode=scroll]) #outerContainer {
overflow-y: auto;
overflow-x: hidden;
-webkit-overflow-scrolling: touch;
}
More info about shadowDom styling: By Eric Bidelman


In addition to singing in choir, I play the guitar, piano, and I am learning to play the violin!
Nothing is quite as refreshing to the mind as a good long walk up and down a mountain. In addition to being a great form of exercise, a nice hike is satisfying and leaves you with a feeling of accomplishment.
I believe preparing a delicious meal is good for the soul. If you can cook you're in a great position to always have cheap, fresh food available.
It may sound like a weird hobby, but cleaning and decluttering for as little as 15 minutes per day is a great stress reliever and it leaves you with a personal space you can be proud of.
Back to Homepage


--- layout: archive title: Zulip Chat Archive permalink: /stream/113489-new-members/topic/cache-olean.20user.20confusion.3F.html ---
Does cache-olean --fetch
perform something equivalent to git checkout .
as part of its work?
The problem here could well be a simple case of PEBKAC but I think I just lost a bunch of work by running cache-olean --fetch
at the wrong time.
I don't think so. You can see the source here: https://github.com/leanprover-community/mathlib-tools/blob/master/scripts/cache-olean.py
It does do a little more with Git than I realized, but nothing that looks dangerous at a quick glance.
OK thanks, I did scan over that source and saw nothing suspicious. I'll see if I can reproduce the behaviour that I think occurred.
What the above is supposed to show is that cache-olean --fetch
blew away the changes I had to the file lie_algebra.lean
.
I'll scan over the script again to see if I can understand how this might be happening. (Still entirely possible, it's something weird I'm doing.)
I can't see it, and I'm in more of a mood to spend my few minutes trying to write some Lean than debugging some Python. I'll pick this up again at the weekend if it is still not resolved; I feel a bit bad for casting aspersions.
My only idea, are you using an old version of cache-olean that's maybe doing something different?
Hmm, I don't think that's it as I only started tinkering with Mathlib around about September, and indeed I see:
➜ mathlib git:(lean-3.4.2) ls -l /Users/olivernash/.mathlib/bin/cache-olean -rwxr-xr-x 1 olivernash staff 4961 17 Sep 22:22 /Users/olivernash/.mathlib/bin/cache-olean
and the history on GitHub says the file last changed in May.
I just tried and couldn't reproduce this.
Weird, but also thank you!
Huh. I'm out of ideas then. Let us know if you figure out what's going on, having work erased by a rogue script is a nightmare.
Given that you cannot reproduce, and others are not complaining about this, I think this is my issue to debug.
I will report back here if/when I figure it out, hopefully at the weekend. In the meantime, I will rename this thread as I think it could mislead people.
I managed to find a few minutes to look into this again this evening, and I believe I now understand. Here is where cache-olean --fetch
clobbers my local changes:
with DelayedInterrupt([signal.SIGTERM, signal.SIGINT]): ar = tarfile.open(os.path.join(mathlib_dir, asset.name)) ar.extractall('.') # Specifically this line! print("... successfully extracted olean archive.")
The reason is that the tar file which it is unpacking contains not just all the .olean
files but also all the .lean
source files. So that means that if you have any unstaged changes to .lean
files then they'll be blown away by this step, as happened to me.
This is of course completely my fault but I wonder if it might be worth adding a warning to cache-olean
to warn about this before proceeding? Maybe something along the lines of:
if repo.is_dirty(): x = input('You have a dirty repo, and might lose data if you proceed. Do you wish to continue? [N]')
This approach helps keep the relative time stamp of .lean / .olean files consistent. We could check the git status before expand the archive.
I would say that running cache-olean
with unstaged (and unstashed) changes is asking for trouble.
Yes, you can PR this
I'm all in favour of this approach, it makes total sense.
Well I certainly found trouble @Patrick Massot :)
But of course a warning would be nicer.
Thanks @Simon, I will PR that though ludicrously I have just used up my last scrap of free time for days so it will have to wait till the weekend!
If you want, you can add a command line option to disable that check (or to turn an error into a warning)
Thanks, I'll make sure to do that.
Thanks a lot! That's a great improvement
@Simon Hudon I just created this PR for mathlib-tools
in an attempt to address this issue.
Thanks! I'll have a look
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


CSS concepts - The Box Model
A very important part of understanding CSS is to know what the "Box Model" is and how it works. The box model defines how content and it's attributes relate to each other on your website. In essence it tells your browser how big your content must be displayed and where to put it. The box model is made up of three attributes that can be assigned to any object on your site (object being any kind of element/content). The most obvious one is the actual height and width of your content container. It's the only place where you can put your content (eg. text or a picture). Around the content container we have something called padding. The padding will expand the percepted size of a content container but the actual content doesn't have more space to be displayed. You can basically think of it like the margins in a word document.The same background color and a "padding" around your content.
Around the padding we have the border of the content. It's the the border around the padding and you can think about it like the borders of the sheet of paper you printed your content on.
Last and equally important is the margin. The margin is an invisible padding that goes around the border. Essentially it puts a transparant shell around our content which can be very helpful to position things in CSS and be sure that nothing uses a possible gap to screw up the entire layout. Think of it as part of the content we use for positioning content but can never see. It's a space holder basically. And here something for the visual learners :)


Track your Instagram follower data
< src="/static/sm-icons/dark_logo"> helps you easily visualize the most important data related to your follower trends.
delivers data and insights to help you succeed in the social economy.
Analyze and Discover follower trends to help improve your brands reach.
Our Services
Simple to get started. Instagram insights that you need.
Valuable Insights
Gain valuable insights from your instagram content. gives you the metrics that can change the way you use instagram.
Options for any user
Choose the plan that suits your needs the most. From the casual user to the power influencer, has everything you're looking for.
Trend Analysis
Find out where your community intersects with others. Tap into the network of other influencers and see where your community overlaps.
Fast & Powerfull
Never wait to see the data or reports you need. provides you with important insights daily that will help expand your influence.
Beautiful Analytics
Gain valuable insights, from trends in your content, to historical follower data. Premium accounts can even see competitors data.
Made With Love
is made by people who love instagram, and meant for those who are looking for more out of instagram analytics tools.
Our Tools
< src="/static/sm-icons/dark_logo"> empowers you to effectively manage your brand on instagram.
Follower Trends
Easily visualize the changes in your follower trends. We want to provide you with the data you need, to successfully grow your brand.
Beautiful Data
makes understanding your data easy. No complications, no hassle, just simple, elegant tools to get the job done.
Content Trends
Gain valuable insights from your posts. Easily determine how well received your content is and how it affects your influence.
Unlimited data analytics
< src="/static/sm-icons/dark_logo"> is free to use with basic services and insights. Truly understand how your followers interact with your content with a paid plan.