## Shield Weight Stern Hb TandT Adult
## Shield 1.0000000 0.2394694 0.3818278 0.171113116 0.144948682 0.782786730
## Weight 0.2394694 1.0000000 0.6350777 0.826493514 0.793679060 0.100761751
## Stern 0.3818278 0.6350777 1.0000000 0.644056172 0.461534419 0.176030285
## Hb 0.1711131 0.8264935 0.6440562 1.000000000 0.782295402 -0.008168973
## TandT 0.1449487 0.7936791 0.4615344 0.782295402 1.000000000 0.004246455
## Adult 0.7827867 0.1007618 0.1760303 -0.008168973 0.004246455 1.000000000
Generally speaking, only the following pairs of predictors seem to have linear relations:
Note: The variable \(\texttt{Adult}\) is an indicator variable, thus we only care about if different predictor inputs lead to different responses. But it looks like only the variable \(\texttt{Shield}\) differs dramatically. For \(\texttt{Stern}\) also looks like adult moorhens have seemingly higher \(\texttt{Stern}\) values, but just not as obvious as \(\texttt{Shield}\), i.e. generally adult moorhens have larger shield area than juvenile moorhens.
And the correlation matrix confirms our statement above, since only the mentioned 6 pairs of variables have correlations greater than \(0.5\) in the matrix.
The residuals vs. fitted values plot for our first multiple liner regression model seems to not satisfying the assumption of homoscedasticity, i.e. the variance of residuals is not constant. That’s we can detect the existence of ‘funnel’-shape in the residual plot. However, the assumption of zero-mean residual seems ok as no intense curvature observed.
Also, the sample data points are clustered basically on two different sides of the plot, thus leaving the centre of the plot quite blank. As we know, an ideal normally distributed residual plot should have a rectangular or ecliptical shape, while ours does not look anything like that. Hence we also check the normal qq-plot, and find out it is not fitting a straight line.
This time the assumption of homoscedasticity is fixed, since the scale of the ‘funnel’-shape is smaller, i.e. not spreading far away as before. But still, the centre lacks of data points, leaving the overall shape like a ‘dumbbell’. We will look into this issue later.
Examine the log-transformed model in part (c): The ANOVA table shows that only insignificant additional variable is \(\texttt{TandT}\) with p-value greater than \(0.05\), others are fine. But the summary table (t-test) infers that every predictor variable is not significant, except the last one \(\texttt{Adult}\) which has the same p-value as it in ANOVA (F-test).
Nested hypotheses testing (with ANOVA tables):
## Analysis of Variance Table
##
## Response: log(Shield)
## Df Sum Sq Mean Sq F value Pr(>F)
## Stern 1 1.4262 1.4262 24.8711 1.468e-05 ***
## Adult 1 6.3003 6.3003 109.8661 1.253e-12 ***
## Weight 1 0.0402 0.0402 0.7016 0.4076
## Hb 1 0.0001 0.0001 0.0014 0.9702
## TandT 1 0.0129 0.0129 0.2254 0.6377
## Residuals 37 2.1218 0.0573
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(0.0402 + 0.0001 + 0.0129)/3/0.0573
## [1] 0.3094823
(0.0001 + 0.0129)/2/0.0573
## [1] 0.113438
(0.0129)/0.0573
## [1] 0.2251309
qf(0.95, 3, 37)
## [1] 2.858796
We calculated the theoretical 95% F-statistics, which is \(F_{3,37}=2.858796\).
To conclude, we could possibly modify the model by removing predictors \(\texttt{\text{Weight,Hb,TandT}}\) in the following parts of this question.
log(Shield)
value than juvenile ones.In addtion, we also include main residual plot besides the three requires plots above Based on the main residual plot, we believe our model satisfies the assumption of independent errors.
But back to our question itself, since we have indicator variables labeling every one of moorhens (either adult or juvenile), we probably would like to display this feature and try to investigate further if the dumbbell-shape clustering is related with this. Thinking about this from common sense, adult bird usually is larger in size than juvenile bird.
The plot surely captured the general trend of adult and juvenile moorhens’ shield area, that is, adults usually have larger shield area. But note that, the two prediction intervals have overlaps.
\[ \begin{split} \text{Ratio} &= \frac{e^{\beta_0 + \beta_{\text{Adult}}\cdot 1 + \beta_{\text{Stern}}\cdot \text{Stern}}}{e^{\beta_0 + \beta_{\text{Adult}}\cdot 0 + \beta_{\text{Stern}}\cdot \text{Stern}}}\\ &=e^{\beta_{\text{Adult}}} \end{split} \]
Since the ratio seems to be a fixed value, then the \(95\%\) confidence interval of this estimated ratio is in fact, an exponential of \(95\%\) confidence interval of parameter \(\beta_{\text{Adult}}\). Therefore, we have
## (Intercept) Adult Stern
## 2.45029558 0.79531521 0.03791127
## 2.5 % 97.5 %
## Adult 0.6459868 0.9446436
## 2.5 % 97.5 %
## Adult 1.907869 2.571897
case
, body.fat.siri
or density
:
case
: This is just the index of each man, it has no real impact on the real body fat percentage.body.fat.siri
: This is just another expression of body fat. We have already included body.fat
as the response, there is no need to include it as a predictor. If we do so, it would be affect the power of other predictors. (In other words, we are using body fat to fit body fat.)density
: According to Bozek’s equation, \(\text{body.fat}=\frac{457}{\text{Density}}-414.2\), since we are trying to find a regression model for body.fat
, we should not include a variable which is a direct transformation of that response in the predictors.weight
, height
, BMI
at the same time: No need to include all of three variables, since BMI
can be expressed as weight/height^2
, so BMI
is highly correlated with those two variables. We can keep weight
and height
, excluding BMI
.ffweight
when weight
is included: No need to do this as well. ffweight
is both related with weight
and involved with body.fat
. Pretty dangerous to include it.Recall that ln(BMI)
was a pretty good simple linear regression predictor in Assignment 1, and this problem itself addresses that weight
is a considered as a key and should be included. By the formula
\[ \begin{split} \log(\text{BMI}) &= \log\left(\frac{\text{weight}}{\text{height}^2}\right)\\ &=\log(\text{weight})-2\log(\text{height})\end{split}\]
So we put variable ln(weight), ln(height)
into our draft model.
Next, we tend to add variables into this model. We add the variables left one by one, by checking the variance inflation factor (VIF), we only confirm the addition if no VIFs of current variables exceed \(10\) (conventionally we pick \(10\) as a cut-off value). In other words, we only add variables if we can avoid multicolinearity.
Repeat until we have a full model, in this case, which is body.fat ~ log(weight) + log(height) + wrist + neck + age + forearm + bicep + ankle + knee
.
Then we check the ANOVA and summary()
table, both suggests the last four variables are insignificant. And we think about it with common sense that, there is not much body fat in those parts of human body. So we would like to drop those variables.
Now the model is body.fat ~ log(weight) + log(height) + wrist + neck + age
. Again we check the ANOVA and summary()
table. Now every variable is significant.
## Analysis of Variance Table
##
## Response: body.fat
## Df Sum Sq Mean Sq F value Pr(>F)
## log(weight) 1 5977.5 5977.5 288.7938 < 2.2e-16 ***
## log(height) 1 2447.4 2447.4 118.2406 < 2.2e-16 ***
## wrist 1 381.3 381.3 18.4225 2.547e-05 ***
## neck 1 99.0 99.0 4.7823 0.0297 *
## age 1 1082.0 1082.0 52.2754 6.073e-12 ***
## Residuals 246 5091.8 20.7
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Call:
## lm(formula = body.fat ~ log(weight) + log(height) + wrist + neck +
## age)
##
## Residuals:
## Min 1Q Median 3Q Max
## -10.6935 -3.0179 -0.3545 3.3000 11.7562
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 115.74571 36.46230 3.174 0.00169 **
## log(weight) 60.05545 3.77094 15.926 < 2e-16 ***
## log(height) -80.91097 9.69494 -8.346 5.14e-15 ***
## wrist -2.74117 0.51820 -5.290 2.71e-07 ***
## neck -0.57301 0.22995 -2.492 0.01337 *
## age 0.18350 0.02538 7.230 6.07e-12 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.55 on 246 degrees of freedom
## Multiple R-squared: 0.6623, Adjusted R-squared: 0.6555
## F-statistic: 96.5 on 5 and 246 DF, p-value: < 2.2e-16
Afterwards, we plot and examine these three diagnostic plots:
For here, we also include a main residual plot with some curvature on the right hand side, but generally the model satisfies the independent errors assumption.
## Analysis of Variance Table
##
## Response: body.fat[-39]
## Df Sum Sq Mean Sq F value Pr(>F)
## log(weight)[-39] 1 5816.1 5816.1 286.4627 < 2.2e-16 ***
## log(height)[-39] 1 2579.9 2579.9 127.0670 < 2.2e-16 ***
## wrist[-39] 1 377.5 377.5 18.5950 2.344e-05 ***
## neck[-39] 1 56.7 56.7 2.7923 0.096 .
## age[-39] 1 1052.7 1052.7 51.8502 7.326e-12 ***
## Residuals 245 4974.3 20.3
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Call:
## lm(formula = body.fat[-39] ~ log(weight)[-39] + log(height)[-39] +
## wrist[-39] + neck[-39] + age[-39])
##
## Residuals:
## Min 1Q Median 3Q Max
## -10.7378 -3.0796 -0.4016 3.2972 11.3939
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 118.71664 36.13380 3.285 0.00117 **
## log(weight)[-39] 60.56758 3.74084 16.191 < 2e-16 ***
## log(height)[-39] -82.87330 9.63657 -8.600 9.64e-16 ***
## wrist[-39] -2.80081 0.51383 -5.451 1.22e-07 ***
## neck[-39] -0.46871 0.23184 -2.022 0.04429 *
## age[-39] 0.18113 0.02515 7.201 7.33e-12 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.506 on 245 degrees of freedom
## Multiple R-squared: 0.6652, Adjusted R-squared: 0.6584
## F-statistic: 97.35 on 5 and 245 DF, p-value: < 2.2e-16
According to the diagnostic plots, we tend to delete the case \(39\). After doing so, we refit the model and find out that in ANOVA table, the predictor neck
becomes insignificant with p-value \(0.096>0.05\). This might be because the removed data has rather high neck
value, so it increased the influence of neck
, but in fact, neck is not that important. So our modification is to switch the position of neck
and age
. Now our final model looks like: body.fat ~ log(weight) + log(height) + wrist + age + neck
.
The new diagnostic plots indicate that no outliers or influential points exist any more.
The ANOVA and summary()
table for our final model.
# ---------------(d)---------------
anova(fat.lm4)
## Analysis of Variance Table
##
## Response: body.fat[-39]
## Df Sum Sq Mean Sq F value Pr(>F)
## log(weight)[-39] 1 5816.1 5816.1 286.4627 < 2.2e-16 ***
## log(height)[-39] 1 2579.9 2579.9 127.0670 < 2.2e-16 ***
## wrist[-39] 1 377.5 377.5 18.5950 2.344e-05 ***
## age[-39] 1 1026.4 1026.4 50.5552 1.264e-11 ***
## neck[-39] 1 83.0 83.0 4.0873 0.04429 *
## Residuals 245 4974.3 20.3
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(fat.lm4)
##
## Call:
## lm(formula = body.fat[-39] ~ log(weight)[-39] + log(height)[-39] +
## wrist[-39] + age[-39] + neck[-39])
##
## Residuals:
## Min 1Q Median 3Q Max
## -10.7378 -3.0796 -0.4016 3.2972 11.3939
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 118.71664 36.13380 3.285 0.00117 **
## log(weight)[-39] 60.56758 3.74084 16.191 < 2e-16 ***
## log(height)[-39] -82.87330 9.63657 -8.600 9.64e-16 ***
## wrist[-39] -2.80081 0.51383 -5.451 1.22e-07 ***
## age[-39] 0.18113 0.02515 7.201 7.33e-12 ***
## neck[-39] -0.46871 0.23184 -2.022 0.04429 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.506 on 245 degrees of freedom
## Multiple R-squared: 0.6652, Adjusted R-squared: 0.6584
## F-statistic: 97.35 on 5 and 245 DF, p-value: < 2.2e-16
Observe the estimate coefficients of variables, we conclude that log(weight)
and age
are postively related with body.fat
, i.e. a person with larger weight and older age tends to have higher body fat percentage. On the other hand, log(height), wrist, neck
are negatively related with body.fat
. Among all, log(height)
contributes the most, which can be interpreted as “taller people tend to have less body fat percentage when other variable hold constant”.
The overall F-test has a p-value much less than \(0.05\), the model is significant.
Also note that the adjusted \(R^2\) is \(0.6584\) which is adequate, but definitely leaves some space for improvement.
For multiple one-sample t-tests, the cut-off value is:
qt(.975, 250)
## [1] 1.969498
All of those observed t-statistics have absolute values greater than the theoretical t-statistic \(1.969498\). Therefore, we reject all of those null hypotheses. The results of t-tests agree with that of F-test as we desired.
## The following objects are masked from fat:
##
## abdomen, age, ankle, bicep, BMI, body.fat, body.fat.siri,
## case, chest, density, ffweight, forearm, height, hip, knee,
## neck, thigh, weight, wrist
## case body.fat body.fat.siri density age weight height BMI ffweight neck
## 1 1 12.6 12.3 1.0708 23 154.25 67.75 23.7 134.9 36.2
## 2 2 6.9 6.1 1.0853 22 173.25 72.25 23.4 161.3 38.5
## 3 3 24.6 25.3 1.0414 22 154.00 66.25 24.7 116.0 34.0
## 4 4 10.9 10.4 1.0751 26 184.75 72.25 24.9 164.7 37.4
## 5 5 27.8 28.7 1.0340 24 184.25 71.25 25.6 133.1 34.4
## 6 6 20.6 20.9 1.0502 24 210.25 74.75 26.5 167.0 39.0
## chest abdomen hip thigh knee ankle bicep forearm wrist
## 1 93.1 85.2 94.5 59.0 37.3 21.9 32.0 27.4 17.1
## 2 93.6 83.0 98.7 58.7 37.3 23.4 30.5 28.9 18.2
## 3 95.8 87.9 99.2 59.6 38.9 24.0 28.8 25.2 16.6
## 4 101.8 86.4 101.2 60.1 37.3 22.8 32.4 29.4 18.2
## 5 97.3 100.0 101.9 63.2 42.2 24.0 32.2 27.7 17.7
## 6 104.5 94.4 107.8 66.0 42.0 25.6 35.7 30.6 18.8
## fit lwr upr
## 1 2.152769 -0.1418622 4.44740
## 2 14.626332 13.9233960 15.32927
## 3 22.076989 21.4265424 22.72744
## 4 30.670156 29.4412872 31.89902
To conclude, under such assumption, our model is good for predicting the later 3 categories but definitely not for underweight category.
# ---------------Q1---------------
# ---------------(a)---------------
moorhen <- read.csv('moorhen.csv', header = TRUE)
attach(moorhen)
pairs(moorhen)
cor(moorhen)
# ---------------(b)&(c)---------------
moorhen.lm <- lm(Shield ~ Weight + Stern + Hb + TandT + Adult)
moorhen.loglm <- lm(log(Shield) ~ Weight + Stern + Hb + TandT + Adult)
layout(matrix(c(1,2), 1, 2, byrow = TRUE))
plot(moorhen.lm, which=1, main='residual plot BEFORE log')
plot(moorhen.loglm, which=1, main='residual plot AFTER log')
# ---------------(d)---------------
anova(moorhen.loglm)
summary(moorhen.loglm)
anova(lm(log(Shield) ~ Stern + Adult + Weight + Hb + TandT))
(0.0402 + 0.0001 + 0.0129)/3/0.0573
(0.0001 + 0.0129)/2/0.0573
(0.0129)/0.0573
qf(0.95, 3, 37)
# ---------------(e)---------------
moorhen.loglm2 <- lm(log(Shield) ~ Adult + Stern)
par(mfrow=c(2,2))
plot(moorhen.loglm2, which=1)
plot(fitted(moorhen.loglm2), rstandard(moorhen.loglm2))
abline(0,0, lty=2)
title("IntStud Residuals vs. Fitted Values")
plot(moorhen.loglm2, which=c(2, 4))
# ---------------(f)---------------
par(mfrow=c(1,1))
plot(Shield ~ Stern,
xlab = "Stern (unit unknown)",
ylab = "Shield Area (mm^2)",
#ylim = c(0, 600),
pch = c(16, 17)[as.numeric(Adult)+1],
main = "Prediction Intervals of Adult and Juvenile Moorhens",
col = c("red", "blue")[as.numeric(Adult)+1],
data = moorhen,
cex = 1.5)
adults.sterns <- moorhen[moorhen$Adult==1,]$Stern
adults.sterns2 <- (min(adults.sterns) * 10):(round(max(adults.sterns)*10,0)+1)/10
adults.input <- data.frame(Shield=mean(Shield), Weight=mean(Weight),
Stern=adults.sterns2,
Hb=mean(Hb), TandT=mean(TandT), Adult=1)
juves.sterns <- moorhen[moorhen$Adult!=1,]$Stern
juves.sterns2 <- (round(min(juves.sterns) * 10, 0)-1):(round(max(juves.sterns) * 10, 0)+1)/10
juves.input <- data.frame(Shield=mean(Shield), Weight=mean(Weight),
Stern=juves.sterns2,
Hb=mean(Hb), TandT=mean(TandT), Adult=0)
adults.pred <- exp(predict(moorhen.loglm2, newdata = adults.input,
interval = "prediction"))
juves.pred <- exp(predict(moorhen.loglm2, newdata = juves.input,
interval = "prediction"))
lines(adults.sterns2, adults.pred[,"fit"], lty=6, lwd=2, col="blue")
lines(adults.sterns2, adults.pred[,"lwr"], lty=5, col="blue")
lines(adults.sterns2, adults.pred[,"upr"], lty=5, col="blue")
lines(juves.sterns2, juves.pred[,"fit"], lty=4, lwd=2, col="red")
lines(juves.sterns2, juves.pred[,"lwr"], lty=3, lwd=2, col="red")
lines(juves.sterns2, juves.pred[,"upr"], lty=3, lwd=2, col="red")
legend( x="topleft",
legend=c("Adult", "Adult model", "Adult 95% PI",
"Juvenile", "Juvenile model", "Juvenile 95% PI"),
col=c("blue", "blue", "blue", "red", "red", "red"),
lwd=c(1, 2, 1, 1, 2, 2), lty=c(NA, 6, 5, NA, 4, 3),
pch=c(17, NA, NA, 16, NA, NA), cex = 0.75)
# ---------------(g)---------------
coef(moorhen.loglm2)
shield.calc <- function(x1, x2){
exp(as.numeric(moorhen.loglm2$coefficients[1]
+ moorhen.loglm2$coefficients[2] * x1
+ moorhen.loglm2$coefficients[3] * x2))
}
ratio.calc <- function(st.input){
shield.calc(1, st.input)/shield.calc(0, st.input)
}
confint(moorhen.loglm2, "Adult", level = 0.95)
exp(confint(moorhen.loglm2, "Adult", level = 0.95))
# ---------------Q2---------------
# ---------------(a)---------------
library(faraway)
fat <- read.csv('fat.csv', header = TRUE)
fat[42,]$height <- 69.5
attach(fat)
# ---------------(b)---------------
# round(cor(fat[c(2,5:7,10:19)]),4)
# round(cor(fat[c(2,5:7,10:19)]),4)>0.7
vif(lm(body.fat~log(weight)+log(height)+abdomen))
vif(lm(body.fat~log(weight)+log(height)+neck))
vif(lm(body.fat~log(weight)+neck+wrist+log(height)))
vif(lm(body.fat~log(weight)+neck+wrist+hip+log(height)))
vif(lm(body.fat~log(weight)+neck+wrist+chest+log(height)))
vif(lm(body.fat~log(weight)+neck+wrist+log(height)+age))
vif(lm(body.fat~log(weight)+neck+wrist+log(height)+age+forearm))
vif(lm(body.fat~log(weight)+neck+wrist+log(height)+age+forearm+thigh))
vif(lm(body.fat~log(weight)+neck+wrist+log(height)+age+forearm+bicep))
vif(lm(body.fat~log(weight)+neck+wrist+log(height)+age+forearm+bicep+ankle))
vif(lm(body.fat~log(weight)+neck+wrist+log(height)+age+forearm+bicep+ankle+knee))
vif(lm(body.fat~log(weight)+wrist+log(height)+age+forearm+bicep+ankle+knee))
vif(lm(body.fat~log(weight)+wrist+log(height)+age+forearm+bicep+ankle))
vif(lm(body.fat~log(weight)+log(height)+age+forearm+bicep+ankle))
vif(lm(body.fat~log(weight)+log(height)+age+forearm+ankle))
# acutally the following model works well too!
vif(lm(body.fat~log(weight)+log(height)+age))
anova(lm(body.fat~log(weight)+log(height)+age))
summary(lm(body.fat~log(weight)+log(height)+age))
# draft model based on correlation matrix intuition and VIF analysis
fat.lm1 <- lm(body.fat ~ log(weight) + log(height) + wrist + neck + age
+ forearm + bicep + ankle + knee)
anova(fat.lm1)
summary(fat.lm1)
# draft model deleted insignificant variables
fat.lm2 <- lm(body.fat ~ log(weight) + log(height) + wrist + neck + age)
anova(fat.lm2)
summary(fat.lm2)
par(mfrow=c(2,2))
plot(fat.lm2, which=1)
plot(fitted(fat.lm2), rstandard(fat.lm2))
abline(0,0, lty=2)
title("IntStud Residuals vs. Fitted Values")
# identify(fitted(fat.lm), rstandard(fat.lm)) # 39, 216
plot(fat.lm2, which=c(2, 4))
par(mfrow=c(1,1))
# ---------------(c)---------------
# case 39 is the suspisious outlier
# also 182 has is 0 as body.fat (but we still need it as 'underweight' category later)
# draft model with case 39 removed (revisiting)
fat.lm3 <- lm(body.fat[-39] ~ log(weight)[-39] + log(height)[-39]
+ wrist[-39] + neck[-39] + age[-39])
anova(fat.lm3)
summary(fat.lm3)
# final model with some order tweaked (neck moved to the last)
fat.lm4 <- lm(body.fat[-39] ~ log(weight)[-39] + log(height)[-39]
+ wrist[-39] + age[-39] + neck[-39])
par(mfrow=c(2,2))
plot(fat.lm4, which=1)
plot(fitted(fat.lm4), rstandard(fat.lm4))
abline(0,0, lty=2)
title("IntStud Residuals vs. Fitted Values")
plot(fat.lm4, which=c(2, 4))
par(mfrow=c(1,1))
# ---------------(d)---------------
anova(fat.lm4)
summary(fat.lm4)
qt(.975, 250)
# ---------------(e)---------------
fat2 <- fat[-39,]
attach(fat2)
head(fat2)
underweight <- fat2[which(BMI<18.5),]
normal <- fat2[which(BMI>=18.5 & BMI<25), ]
overweight <- fat2[which(BMI>=25 & BMI<30),]
obese <- fat2[which(BMI>=30),]
UwM <- sapply(underweight[,c(2,5,6,7,10,19)], mean)
NM <- sapply(normal[,c(2,5,6,7,10,19)], mean)
OwM <- sapply(overweight[,c(2,5,6,7,10,19)], mean)
ObM <- sapply(obese[,c(2,5,6,7,10,19)], mean)
df <- data.frame(weight=c(UwM[3],NM[3],OwM[3],ObM[3]),
height=c(UwM[4],NM[4],OwM[4],ObM[4]),
wrist=c(UwM[6],NM[6],OwM[6],ObM[6]),
age=c(UwM[2],NM[2],OwM[2],ObM[2]),
neck=c(NM[5],NM[5],OwM[5],ObM[5]))
(ci <- predict(fat.lm4, newdata = df, interval = "confidence"))


Duration
10 minutes
Goals
This exercise will add a new header and footer definition to our ListView
.
Required Assets
There is a completed version of this exercise in the Part 02 Resources folder for you to compare your work against.
Challenge
This exercise continues on from the prior exercise and adds a new Header and Footer to the top and bottom of the ListView
.
Here are the steps you will go through:
-
Set the
Header
property to aContentView
containing aLabel
to display the static text "The Simpsons". -
Data bind the
Footer
property to the number of contacts in our collection. To do this, we will set theSimpsonFactory.Characters
collection as theBindingContext
in our code. -
Add a
FooterTemplate
to display the count of items at the end of theListView
.
Try to complete the exercise using the above screen shot and instructions, and then use the detailed information below if you get stuck or need some additional information to complete the step.
Steps
Add the Header
In this first step, we will add a static header to the top of the ListView
.
-
Open the AllContacts.xaml markup file and locate the
ListView
. -
Set the
Header
property to the value "The Simpsons".
- Run the application and notice the text is displayed in a regular-sized font at the top of the control.
- Stop the application and remove your property setter; let's replace it with something a little more fancy.
-
Set the
Header
property using the following code:
<ListView.Header> <ContentView Padding="0,5" BackgroundColor="#3498db"> <Label FontSize="Large" TextColor="White" Text="The Simpsons" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" /> </ContentView> </ListView.Header>
-
Run the application to see the difference. This makes the font larger, adds a filled background behind the text and puts some padding between the header and the first item in the
ListView
.
Add the Footer
Next, let's add a dynamic footer to the bottom of the ListView
. To make the # of items in the collection easier to get to, we will set the collection to be our BindingContext
.
-
Open the AllContacts.xaml.cs code file and locate the constructor where we are currently setting the
ItemSource
property on theListView
. -
Remove that line of code and replace it with a line that sets the
BindingContext
for the page to the collection instead.
-
Switch back to the XAML. Add a property setter on the
ListView
to set theItemsSource
to theBindingContext
({Binding .}
). -
Bind the
Footer
property to theCount
property of ourBindingContext
- this will be the # of elements in the collection since it's anIList
.
-
Set the
FooterTemplate
property to aDataTemplate
containing a:ContentView
with it'sPadding
property set to "0,5"-
Inside the
ContentView
, define aLabel
and data-bind theText
property to theBindingContext
(thePath
should be "."). -
Set the
VerticalTextAlignment
property to "Center" and theHorizontalTextAlignment
property to "End" to right-justify the text. -
Set the
FontSize
to "Micro" to make it small. -
Add a
StringFormat
to the text propertyBinding
to make the text read "xx contacts", where "XX" is the data bound count. See the code hint below for help on this.
- Run the application and scroll to the bottom to see the Footer template.
Summary
In this exercise, we added a header and footer to our ListView
using both a static value (on the header) and a dynamic value (on the footer).


Please select a winner
The Government team has won. Enter speaks and ranks
normally.
The Opposition team has won. Enter speaks and ranks
normally
The Government team has won via forfeit. Enter speaks of
zero and arbitrary ranks for all debaters. The winning team
will receive average speaks and ranks for this round.
The losing team will receive speaks of zero and ranks of 7,
although you can give them non zero speaks if you wish.
The Opposition team has won via forfeit. Enter speaks of
zero and arbitrary ranks for all debaters. The winning team
will receive average speaks and ranks for this round.
The losing team will receive speaks of zero and ranks of 7,
although you can give them non zero speaks if you wish.
Everyone lost this round (didn't show up?). Enter speaks of
zero and arbitrary ranks. Both teams will receive speaks of
zero and ranks of 7, although you can give them non zero
speaks if you wish. No averaging will occur, however.
Everyone won this round (judge didn't show up). Enter speaks
of zero and arbitrary ranks. Both teams will receive average
speaks and ranks for this round. Do not give speaks
greater than zero to either team.


Chef~Gaustau
Food is ready for you at your service!
WELCOME TO
Chef~GAUSTAU'
RESTAURANT
To continue, please get an Account or Sign in
SIGN IN
SIGN UP


Namaste (i.e. “NAMe AS TExt”) is a file naming convention to support primitive directory-level metadata tags exposed directly via filenames. As such, Namaste tags greet visitors who request a directory listing (e.g., Linux ‘ls’) with a glimpse of what the directory holds. This approach can be readily implemented as a library or as a command line tool. Prior implementations exist in Perl and Python. This implementation was written in Go. It includes support for namaste hosted on S3.
The command namaste
can be used to set, check or retrieve the “name as text” associated with
a directory’s type, who, what, when and where metadata. If you use the -verbose
option
the values set or retrieved with be display to standard out.


Matters Needing Attention
1. The platform uses double password login.
2. The user password can only be retrieved through the VI address.
3. The VI address is generated after successful registration.
4. Please save your VI address.
5. For the information security industry to contribute their own strength.


Mission statement
-
provide higher order concurrency structures if possible, to prevent using lower order structures
like mutexes and semaphores. It doesn't mean these structures are bad, but especially with
multi-threaded code, a higher abstraction can reduce concurrency control related complexity much better.
-
promote externalization of threading. Integration of threading in objects makes them hard to test,
hard to reuse, hard to modify and often the quality is something that can be improved. In most cases
it is better to externalize the threading completely and let a few specialized structures deal with it.


Credit events include (1) failure to make a required payment, (2) restructuring that makes any creditor worse off, (3) invocation of a cross-default clause, and (4) bankruptcy
Credit derivatives include puts, swap contracts, credit default swaps, total return swaps, and futures contracts


The syntax is the same in both Node and in the Browser. The differences lie in restrictions (what will work, and what will not).
Can not use Implicit based OAuth, otherwise there are no restrictions.
Implicit based OAuth is the only way to make authenticated calls when using browser JavaScript (unless writing an extension).
Most browsers allow the white listing of domains. The following domains will need to be whitelisted:
Implicit based OAuth will work in a browser extension, but it is possible to use explicit based OAuth as well (useful to take advantage of refresh tokens).


Ruby vs. JavaScript
Differences in Looping Methods
November 21, 2014
After spending several weeks getting accustomed to Ruby and its syntax, it was quite the challenge moving onto JavaScript. However, it is also because we spent the last couple of weeks, learning the foundation of Ruby (and programming concepts, such as Types, Booleans, and looping), that I felt a bit more comfortable understanding the less “user-friendly” syntax of JavaScript. One such concept that differs between the two languages, which would have been much more difficult to understand without basic Ruby knowledge, was looping.
With Ruby, we have the handy #each method which allows us to iterate over collections, such as arrays and hashes. The iteration over each element produces lots of handy methods utilizing the #each method, such as #map or #reduce. The #each function makes it a lot easier for us to cycle through each element of a collection, rather than using the “for" or “while" loops.
JavaScript, however, doesn’t necessarily have this same tool for iterating through collections. Rather, we do have to rely on primarily the “for” loop. The syntax, thus, requires that we input the logic with each iterative function, such as below.
Within the loop, you first create a variable i, which serves essentially as the index of the array. This is called the incrementer, which is typically set to 0, unless for some reason you don’t want to begin iterating at the start of the collection; remember that arrays are zero-origin indexed). Then, the following is where the "for" loop comes in. For when the i is under array.length, you will run the code. This is the same logic as the #each method; however, it is more manually spelled out for you. The array.length determines how many elements are within the array and you will only loop as many times as there are elements. The last bit, i++, increments the counter by one after each iteration.
With this basic “for” loop which iterates through our array, we can build on it and make more complicated functions - in the similar way that Ruby builds on the #each function for more complicated (and useful) methods.
Another difference to keep in mind is that with JavaScript doesn’t allow users to use the “unless.” Rather, you’d have to use “for !” expression which negates the expression and in effect, produces the same results as “unless."


In this section we will work with the binomial distribution in a variety of settings. The formula and code are straightforward enough. What you have to keep in mind are the conditions under which the binomial distribution is valid. It is the distribution of:
So don't use it for the number of aces in a hand of cards dealt without replacement.
A random number generator draws repeatedly at random with replacement from the 10 digits $\{0, 1, 2, 3, 4, 5, 6, 7, 8, 9\}$.
Question 1. The generator is run 20 times. Find the chance that 0 appears more than two times.
Answer 1.
The answer can be written in two equivalent ways: $$ \sum_{k=3}^{20} \binom{20}{k} 0.1^k 0.9^{20-k} = 1 - \sum_{k=0}^2 \binom{20}{k} 0.1^k 0.9^{20-k} $$
The second form would be quicker if you were going to complete the numerical calculations by hand. But you are not going to be doing that. Rather, you will do:
sum(stats.binom.pmf(np.arange(3, 21), 20, 0.1))
or, equivalently,
1 - sum(stats.binom.pmf(np.arange(3), 20, 0.1))
Question 2. Our class has seven GSIs and Tutors. Each of them runs the random number generator 20 times, independently of the others. What is the chance that at most three of them gets two 0's?
Answer 2. You can't think of this just as one set of $7 \times 20 = 140$ runs of the generator, because you have to keep track of each of the 7 sets of 20 runs separately.
So now what's a "trial"? It's a course staff member: GSI or tutor. There are 7 of them, and their results are independent of each other. "Success" means "gets two 0's in 20 runs". We want the chance of at most three successes.
We're all set to use the binomial: $n = 7$, $k = 0, 1, 2, 3$, and $p$ is the probability of getting two 0's in 20 runs. Hence
p = stats.binom.pmf(2, 20, 0.1)
sum(stats.binom.pmf(np.arange(4), 7, p))
As a math formula, this is $$ \sum{k=0}^3 \binom{7}{k}p^k(1-p)^{7-k} ~~ \text{where } p = \binom{20}{2} 0.1^2 0.9^{18} $$
Toss a coin 10 times.
Question. What is the chance that you get at least 3 heads and at least 3 tails?
Answer. Here is a great first step in working with any distribution: identify the set of possible values that make your event occur.
Those are 3, 4, 5, 6, and 7 heads, and now the answer is clear:
$$ \sum_{k=3}^7 \binom{10}{k} 0.5^k 0.5^{10-k} $$which is
sum(stats.binom.pmf(np.arange(3, 8), 10, 1/2))
Resist the impulse to start off by calculating $P(H \ge 3)$, the chance of at least three heads, with $H$ denoting the number of heads. It's not very helpful here. To see why, let $T$ be the number of tails in the 10 tosses. Then
$$ P(H \ge 3, T \ge 3) = P(H \ge 3)P(T \ge 3 \mid H \ge 3) $$The first factor is easily found, but the second isn't clear at all. It's not $P(T \ge 3)$ because $H$ and $T$ are far from independent: $T = 10 - H$.
I have rolled a die 24 times.
Question. Find the conditional distribution of the roll in which I saw "six", given that I saw 1 six in the 24 rolls.
Answer. Let $R$ be the roll in which the six appeared, and let $S$ be the total number of sixes in the 24 rolls. We want the conditional distribution of $R$ given $S = 1$.
When you are trying to find a distribution, always start with its possible values. I got 1 six, so its position $R$ can be any roll in the range 1 through 24.
For $k = 1, 2, \ldots 24$,
\begin{align*} P(R = k \mid S = 1) &= \frac{P(R = k, S = 1)}{P(S=1)} \\ \\ &= \frac{P(k-1 \text{ non-sixes, then six, then } 24-k \text{ non-sixes})}{P(S = 1)} \\ \\ &= \frac{(5/6)^{k-1} (1/6) (5/6)^{24-k}} {\binom{24}{1}(1/6)^1(5/6)^{23}} \\ \\ &= \frac{1}{24} \end{align*}Note the absence of $k$ in the probability. Given that I got 1 six, the position in which that six appeared is uniformly distributed across all the rolls.


Product
Supplier
Dimensions
Weight
Price
Notebook Basic 15
HT-1000
Very Best Screens
30 x 18 x 3cm
4.2
KG
956
EUR
Notebook Basic 17
HT-1001
Very Best Screens
29 x 17 x 3.1cm
4.5
KG
1249
EUR
Notebook Basic 18
HT-1002
Very Best Screens
28 x 19 x 2.5cm
4.2
KG
1570
EUR
Notebook Basic 19
HT-1003
Smartcards
32 x 21 x 4cm
4.2
KG
1650
EUR
ITelO Vault
HT-1007
Technocom
32 x 22 x 3cm
0.2
KG
299
EUR
Notebook Professional 15
HT-1010
Very Best Screens
33 x 20 x 3cm
4.3
KG
1999
EUR
Notebook Professional 17
HT-1011
Very Best Screens
33 x 23 x 2cm
4.1
KG
2299
EUR
ITelO Vault Net
HT-1020
Technocom
10 x 1.8 x 17cm
0.16
KG
459
EUR
ITelO Vault SAT
HT-1021
Technocom
11 x 1.7 x 18cm
0.18
KG
149
EUR
i am here
Comfort Easy
HT-1022
Technocom
84 x 1.5 x 14cm
0.2
KG
1679
EUR
Comfort Senior
HT-1023
Technocom
80 x 1.6 x 13cm
0.8
KG
512
EUR


Score:
0
Turn Total: 0
Score:
0
Oink-Oink is a stylized version of Pig, a simple dice game first described in print by John Scarne in 1945. As with many games of folk origin, Pig is played with a number of different rule variations.
In this version, the first player to score 100 or more points wins. Each player repeatedly rolls a die until either a 1 is rolled or the player decides to "hold":


--- title: Categories permalink: /categories/ info: list last three articles for each category by recency ---
Showing the three most recent posts in each category. click on the category to view all articles for that category.
{% for category in site.categories %}No posts or categories to show
{% endfor %}


1 Introduction to Bioconductor annotation resources
1.1 Instructors
- James W. MacDonald<EMAIL_ADDRESS>- Lori Shepherd<EMAIL_ADDRESS>1.2 Workshop Description
There are various annotation packages provided by the Bioconductor project that can be used to incorporate additional information to results from high-throughput experiments. This can be as simple as mapping Ensembl IDs to corresponding HUGO gene symbols, to much more complex queries involving multiple data sources. In this workshop we will cover the various classes of annotation packages, what they contain, and how to use them efficiently.
1.2.1 Prerequisites
- Basic knowledge of R syntax
- Basic understanding of the various annotation sources (NCBI, EBI/EMBL)
Useful background reading
- The AnnotationDbi vignette.
- The biomaRt vignette.
- The GenomicFeatures vignette.
1.2.2 Workshop Participation
After each type of annotation package is introduced, students will be given the opportunity to practice making their own queries.
1.2.3 R / Bioconductor packages used
- AnnotationDbi
- AnnotationHub
- BSgenome
- biomaRt
- ensembldb
- org.Hs.eg.db
- TxDb.Hsapiens.UCSC.hg19.knownGene
- EnsDb.Hsapiens.v79
- EnsDb.Mmusculus.v79
- Homo.sapiens
- BSgenome.Hsapiens.UCSC.hg19
- hugene20sttranscriptcluster.db
1.3 Workshop goals and objectives
Annotating data is a complex task. For any high-throughput experiment the analyst usually starts with a set of identifiers for each thing that was measured, and in order to make the results useful to collaborators these identifiers need to be mapped to other identifiers that are either more familiar to collaborators, or that can be used for further analyses. As an example, RNA-Seq data may only have Entrez Gene IDs for each gene measured, and as part of the output you may want to include the gene symbols, which are more likely to be familiar to a Biologist.
1.3.1 Learning goals
- Understand what sort of annotation data are available
- Understand the difference between annotation sources (NCBI and EBI/EMBL)
- Gain familiarity with the various ways to query annotation packages
- Get some practice making queries
1.3.2 Learning objectives
- Be able to use select and mapIds to map between identifiers
- Be able to extract data from TxDb and EnsDb packages
- Be able to make queries using biomaRt
- Extract and utilize various data from AnnotationHub
1.4 Annotation Workshop
1.4.1 Goals for this workshop
Learn about various annotation package types
Learn the basics of querying these resources
Discuss annotations in regard to Bioc data structures
Get in some practice
1.4.2 What do we mean by annotation?
Map a known ID to other functional or positional information
1.4.3 Specific goal
We have data and statistics, and we want to add other useful information
The end result might be as simple as a data.frame or HTML table, or as complex as a RangedSummarizedExperiment
1.4.4 Data containers
1.4.5 ExpressionSet
load(system.file("extdata/eset.Rdata", package = "Bioc2018Anno"))
eset
## ExpressionSet (storageMode: lockedEnvironment)
## assayData: 33552 features, 6 samples
## element names: exprs
## protocolData: none
## phenoData
## sampleNames: GSM2194079 GSM2194080 ... GSM2194084 (6 total)
## varLabels: title characteristics_ch1.1
## varMetadata: labelDescription
## featureData
## featureNames: 16657436 16657440 ... 17118478 (33552 total)
## fvarLabels: PROBEID ENTREZID SYMBOL GENENAME
## fvarMetadata: labelDescription
## experimentData: use 'experimentData(object)'
## Annotation: pd.hugene.2.0.st
1.4.6 ExpressionSet (continued)
head(exprs(eset))
## [[1]]
## eset
head(pData(phenoData(eset)))
## title characteristics_ch1.1
## GSM2194079 SW620-miR625-rep1 shRNA: miR-625-3p
## GSM2194080 SW620-miR625-rep2 shRNA: miR-625-3p
## GSM2194081 SW620-miR625-rep3 shRNA: miR-625-3p
## GSM2194082 SW620-scramble-rep1 shRNA: scramble
## GSM2194083 SW620-scramble-rep2 shRNA: scramble
## GSM2194084 SW620-scramble-rep3 shRNA: scramble
1.4.7 ExpressionSet (continued)
head(pData(featureData(eset)))
## PROBEID ENTREZID SYMBOL
## 16657436 16657436 84771 DDX11L2
## 16657440 16657440 100302278 MIR1302-2
## 16657450 16657450 402483 LINC01000
## 16657469 16657469 140849 LINC00266-1
## 16657473 16657473 729759 OR4F29
## 16657476 16657476 388574 RPL23AP87
## GENENAME
## 16657436 DEAD/H-box helicase 11 like 2
## 16657440 microRNA 1302-2
## 16657450 long intergenic non-protein coding RNA 1000
## 16657469 long intergenic non-protein coding RNA 266-1
## 16657473 olfactory receptor family 4 subfamily F member 29
## 16657476 ribosomal protein L23a pseudogene 87
1.4.8 BioC containers vs basic structures
<IP_ADDRESS> Pros
Validity checking
Subsetting
Function dispatch
Automatic behaviors
<IP_ADDRESS> Cons
Difficult to create
Cumbersome to extract data by hand
Useful only within R
1.4.9 Annotation sources
| Package type | Example |
|---|---|
| ChipDb | hugene20sttranscriptcluster.db |
| OrgDb | org.Hs.eg.db |
| TxDb/EnsDb | TxDb.Hsapiens.UCSC.hg19.knownGene; EnsDb.Hsapiens.v75 |
| OrganismDb | Homo.sapiens |
| BSgenome | BSgenome.Hsapiens.UCSC.hg19 |
| Others | GO.db; KEGG.db |
| AnnotationHub | Online resource |
| biomaRt | Online resource |
1.4.10 Interacting with AnnoDb packages
The main function is select
:
select(annopkg, keys, columns, keytype)
Where
annopkg is the annotation package
keys are the IDs that we know
columns are the values we want
- keytype is the type of key used
- if the keytype is the central key, it can remain unspecified
1.4.11 Simple example
Say we have analyzed data from an Affymetrix Human Gene ST 2.0 array and want to know what the genes are. For purposes of this lab, we just select some IDs at random.
library(hugene20sttranscriptcluster.db)
set.seed(12345)
ids <- featureNames(eset)[sample(1:25000, 5)]
ids
## [1] "16908472" "16962185" "16920686" "16965513" "16819952"
select(hugene20sttranscriptcluster.db, ids, "SYMBOL")
## 'select()' returned 1:1 mapping between keys and columns
## PROBEID SYMBOL
## 1 16908472 LINC01494
## 2 16962185 ALG3
## 3 16920686 <NA>
## 4 16965513 <NA>
## 5 16819952 CBFB
1.4.12 Questions!
How do you know what the central keys are?
If it’s a ChipDb, the central key are the manufacturer’s probe IDs
It’s sometimes in the name - org.Hs.eg.db, where ‘eg’ means Entrez Gene ID
You can see examples using e.g., head(keys(annopkg)), and infer from that
But note that it’s never necessary to know the central key, as long as you specify the keytype
1.4.13 More questions!
What keytypes or columns are available for a given annotation package?
keytypes(hugene20sttranscriptcluster.db)
## [1] "ACCNUM" "ALIAS" "ENSEMBL" "ENSEMBLPROT"
## [5] "ENSEMBLTRANS" "ENTREZID" "ENZYME" "EVIDENCE"
## [9] "EVIDENCEALL" "GENENAME" "GO" "GOALL"
## [13] "IPI" "MAP" "OMIM" "ONTOLOGY"
## [17] "ONTOLOGYALL" "PATH" "PFAM" "PMID"
## [21] "PROBEID" "PROSITE" "REFSEQ" "SYMBOL"
## [25] "UCSCKG" "UNIGENE" "UNIPROT"
columns(hugene20sttranscriptcluster.db)
## [1] "ACCNUM" "ALIAS" "ENSEMBL" "ENSEMBLPROT"
## [5] "ENSEMBLTRANS" "ENTREZID" "ENZYME" "EVIDENCE"
## [9] "EVIDENCEALL" "GENENAME" "GO" "GOALL"
## [13] "IPI" "MAP" "OMIM" "ONTOLOGY"
## [17] "ONTOLOGYALL" "PATH" "PFAM" "PMID"
## [21] "PROBEID" "PROSITE" "REFSEQ" "SYMBOL"
## [25] "UCSCKG" "UNIGENE" "UNIPROT"
1.4.14 Another example
There is one issue with select
however.
ids <- c('16737401','16657436' ,'16678303')
select(hugene20sttranscriptcluster.db, ids, c("SYMBOL","MAP"))
## 'select()' returned 1:many mapping between keys and columns
## PROBEID SYMBOL MAP
## 1 16737401 TRAF6 11p12
## 2 16657436 DDX11L1 1p36.33
## 3 16657436 LOC102725121 1p36.33
## 4 16657436 DDX11L2 2q14.1
## 5 16657436 DDX11L9 15q26.3
## 6 16657436 DDX11L10 16p13.3
## 7 16657436 DDX11L5 9p24.3
## 8 16657436 DDX11L16 Xq28
## 9 16657436 DDX11L16 Yq12
## 10 16678303 ARF1 1q42.13
1.4.15 The mapIds
function
An alternative to select
is mapIds
, which gives control of duplicates
Same arguments as
select
with slight differencesThe columns argument can only specify one column
The keytype argument must be specified
An additional argument, multiVals used to control duplicates
mapIds(hugene20sttranscriptcluster.db, ids, "SYMBOL", "PROBEID")
## 'select()' returned 1:many mapping between keys and columns
## 16737401 16657436 16678303
## "TRAF6" "DDX11L1" "ARF1"
1.4.16 Choices for multiVals
Default is first
, where we just choose the first of the duplicates. Other choices are list
, CharacterList
, filter
, asNA
or a user-specified function.
mapIds(hugene20sttranscriptcluster.db, ids, "SYMBOL", "PROBEID", multiVals = "list")
## 'select()' returned 1:many mapping between keys and columns
## $`16737401`
## [1] "TRAF6"
##
## $`16657436`
## [1] "DDX11L1" "LOC102725121" "DDX11L2" "DDX11L9"
## [5] "DDX11L10" "DDX11L5" "DDX11L16"
##
## $`16678303`
## [1] "ARF1"
1.4.17 Choices for multiVals (continued)
mapIds(hugene20sttranscriptcluster.db, ids, "SYMBOL", "PROBEID", multiVals = "CharacterList")
## 'select()' returned 1:many mapping between keys and columns
## CharacterList of length 3
## [["16737401"]] TRAF6
## [["16657436"]] DDX11L1 LOC102725121 DDX11L2 DDX11L9 DDX11L10 DDX11L5 DDX11L16
## [["16678303"]] ARF1
mapIds(hugene20sttranscriptcluster.db, ids, "SYMBOL", "PROBEID", multiVals = "filter")
## 'select()' returned 1:many mapping between keys and columns
## 16737401 16678303
## "TRAF6" "ARF1"
mapIds(hugene20sttranscriptcluster.db, ids, "SYMBOL", "PROBEID", multiVals = "asNA")
## 'select()' returned 1:many mapping between keys and columns
## 16737401 16657436 16678303
## "TRAF6" NA "ARF1"
1.4.18 ChipDb/OrgDb questions
Using either the hugene20sttranscriptcluster.db or org.Hs.eg.db package,
What gene symbol corresponds to Entrez Gene ID 1000?
What is the Ensembl Gene ID for PPARG?
What is the UniProt ID for GAPDH?
How many of the probesets from the ExpressionSet (eset) we loaded map to a single gene? How many don’t map to a gene at all?
1.4.19 TxDb packages
TxDb packages contain positional information; the contents can be inferred by the package name
TxDb.Species.Source.Build.Table
TxDb.Hsapiens.UCSC.hg19.knownGene
Homo sapiens
UCSC genome browser
hg19 (their version of GRCh37)
knownGene table
TxDb.Dmelanogaster.UCSC.dm3.ensGene TxDb.Athaliana.BioMart.plantsmart22
1.4.20 EnsDb packages
EnsDb packages are similar to TxDb packages, but based on Ensembl mappings
EnsDb.Hsapiens.v79 EnsDb.Mmusculus.v79 EnsDb.Rnorvegicus.v79
1.4.21 Transcript packages
As with ChipDb and OrgDb packages, select
and mapIds
can be used to make queries
select(TxDb.Hsapiens.UCSC.hg19.knownGene, c("1","10"),
c("TXNAME","TXCHROM","TXSTART","TXEND"), "GENEID")
## 'select()' returned 1:many mapping between keys and columns
## GENEID TXNAME TXCHROM TXSTART TXEND
## 1 1 uc002qsd.4 chr19 58858172 58864865
## 2 1 uc002qsf.2 chr19 58859832 58874214
## 3 10 uc003wyw.1 chr8 18248755 18258723
select(EnsDb.Hsapiens.v79, c("1", "10"),
c("GENEID","GENENAME","SEQNAME","GENESEQSTART","GENESEQEND"), "ENTREZID")
## ENTREZID GENEID GENENAME SEQNAME GENESEQSTART GENESEQEND
## 1 1 ENSG00000121410 A1BG 19 58345178 58353499
## 2 10 ENSG00000156006 NAT2 8 18391245 18401218
But this is not how one normally uses them…
1.4.22 GRanges
The normal use case for transcript packages is to extract positional information into a GRanges
or GRangesList
object. An example is the genomic position of all genes:
gns <- genes(TxDb.Hsapiens.UCSC.hg19.knownGene)
gns
## GRanges object with 23056 ranges and 1 metadata column:
## seqnames ranges strand | gene_id
## <Rle> <IRanges> <Rle> | <character>
## 1 chr19 58858172-58874214 - | 1
## 10 chr8 18248755-18258723 + | 10
## 100 chr20 43248163-43280376 - | 100
## 1000 chr18 25530930-25757445 - | 1000
## 10000 chr1 243651535-244006886 - | 10000
## ... ... ... ... . ...
## 9991 chr9 114979995-115095944 - | 9991
## 9992 chr21 35736323-35743440 + | 9992
## 9993 chr22 19023795-19109967 - | 9993
## 9994 chr6 90539619-90584155 + | 9994
## 9997 chr22 50961997-50964905 - | 9997
## -------
## seqinfo: 93 sequences (1 circular) from hg19 genome
1.4.23 GRangesList
Or the genomic position of all transcripts by gene:
txs <- transcriptsBy(TxDb.Hsapiens.UCSC.hg19.knownGene)
txs
## GRangesList object of length 23459:
## $1
## GRanges object with 2 ranges and 2 metadata columns:
## seqnames ranges strand | tx_id tx_name
## <Rle> <IRanges> <Rle> | <integer> <character>
## [1] chr19 58858172-58864865 - | 70455 uc002qsd.4
## [2] chr19 58859832-58874214 - | 70456 uc002qsf.2
##
## $10
## GRanges object with 1 range and 2 metadata columns:
## seqnames ranges strand | tx_id tx_name
## [1] chr8 18248755-18258723 + | 31944 uc003wyw.1
##
## $100
## GRanges object with 1 range and 2 metadata columns:
## seqnames ranges strand | tx_id tx_name
## [1] chr20 43248163-43280376 - | 72132 uc002xmj.3
##
## ...
## <23456 more elements>
## -------
## seqinfo: 93 sequences (1 circular) from hg19 genome
1.4.24 Other accessors
Positional information can be extracted for
transcripts
,genes
, coding sequences (cds
),promoters
andexons
.Positional information can be extracted for most of the above, grouped by a second element. For example, our
transcriptsBy
call was all transcripts, grouped by gene.More detail on these *Ranges objects is beyond the scope of this workshop, but why we want them is not.
1.4.25 Why *Ranges objects
The main rationale for *Ranges objects is to allow us to easily select and subset data based on genomic position information. This is really powerful!
GRanges
and GRangesLists
act like data.frames and lists, and can be subsetted using the [
function. As a really artificial example:
txs[txs %over% gns[1:2,]]
## GRangesList object of length 3:
## $1
## GRanges object with 2 ranges and 2 metadata columns:
## seqnames ranges strand | tx_id tx_name
## <Rle> <IRanges> <Rle> | <integer> <character>
## [1] chr19 58858172-58864865 - | 70455 uc002qsd.4
## [2] chr19 58859832-58874214 - | 70456 uc002qsf.2
##
## $10
## GRanges object with 1 range and 2 metadata columns:
## seqnames ranges strand | tx_id tx_name
## [1] chr8 18248755-18258723 + | 31944 uc003wyw.1
##
## $162968
## GRanges object with 2 ranges and 2 metadata columns:
## seqnames ranges strand | tx_id tx_name
## [1] chr19 58865723-58874214 - | 70457 uc002qsh.2
## [2] chr19 58865723-58874214 - | 70458 uc002qsi.2
##
## -------
## seqinfo: 93 sequences (1 circular) from hg19 genome
1.4.26 *Ranges use cases
Gene expression changes near differentially methylated CpG islands
Closest genes to a set of interesting SNPs
Genes near DNAseI hypersensitivity clusters
Number of CpGs measured over Gene X by Chip Y
1.4.27 SummarizedExperiment objects
SummarizedExperiment objects are like ExpressionSets, but the row-wise annotations are GRanges, so you can subset by genomic locations:
SummarizedExperiment objects are popular objects for representing expression data and other rectangular data (feature x sample data). Incoming packages are now strongly recommended to use this class representation instead of ExpressionSet.
1.4.28 TxDb exercises
How many transcripts does PPARG have, according to UCSC?
Does Ensembl agree?
- How many genes are between 2858473 and 3271812 on chr2 in the hg19 genome?
- Hint: you make a
GRanges
like this -GRanges("chr2", IRanges(2858473,3271812))
- Hint: you make a
1.4.29 OrganismDb packages
OrganismDb packages are meta-packages that contain an OrgDb, a TxDb, and a GO.db package and allow cross-queries between those packages.
All previous accessors work; select
, mapIds
, transcripts
, etc.
library(Homo.sapiens)
Homo.sapiens
## OrganismDb Object:
## # Includes GODb Object: GO.db
## # With data about: Gene Ontology
## # Includes OrgDb Object: org.Hs.eg.db
## # Gene data about: Homo sapiens
## # Taxonomy Id: 9606
## # Includes TxDb Object: TxDb.Hsapiens.UCSC.hg19.knownGene
## # Transcriptome data about: Homo sapiens
## # Based on genome: hg19
## # The OrgDb gene id ENTREZID is mapped to the TxDb gene id GENEID .
1.4.30 OrganismDb packages
Updateable - can change TxDb object
columns and keytypes span all underlying objects
Calls to TxDb accessors include a ‘columns’ argument
head(genes(Homo.sapiens, columns = c("ENTREZID","ALIAS","UNIPROT")),4)
## 'select()' returned 1:many mapping between keys and columns
## GRanges object with 4 ranges and 3 metadata columns:
## seqnames ranges strand | ALIAS
## <Rle> <IRanges> <Rle> | <CharacterList>
## 1 chr19 58858172-58874214 - | A1B,ABG,GAB,...
## 10 chr8 18248755-18258723 + | AAC2,NAT-2,PNAT,...
## 100 chr20 43248163-43280376 - | ADA
## 1000 chr18 25530930-25757445 - | CD325,CDHN,CDw325,...
## UNIPROT ENTREZID
## <CharacterList> <FactorList>
## 1 P04217,V9HWD8 1
## 10 A4Z6T7,P11245 10
## 100 A0A0S2Z381,P00813,F5GWI4 100
## 1000 P19022,A0A024RC42 1000
## -------
## seqinfo: 93 sequences (1 circular) from hg19 genome
1.4.31 OrganismDb exercises
Get all the GO terms for BRCA1
What gene does the UCSC transcript ID uc002fai.3 map to?
How many other transcripts does that gene have?
Get all the transcripts from the hg19 genome build, along with their Ensembl gene ID, UCSC transcript ID and gene symbol
1.4.32 Organism.dplyr package
Combines the data from TxDb and Org.Db associated packages into local database.
- Allows functions from both org.* and TxDb.*
keytypes()
,select()
, …exons()
,promoters()
, …
Allows for filtering and display of combined TxDb and Org.Db information through
dplyr
functions.
library(Organism.dplyr)
# src = src_organism("TxDb.Hsapiens.UCSC.hg19.knownGene")
src <- src_organism(dbpath = hg38light())
src
## src: sqlite 3.22.0 [/home/lori/R/x86_64-pc-linux-gnu-library/3.5-BioC-3.8/Organism.dplyr/extdata/light.hg38.knownGene.sqlite]
## tbls: id, id_accession, id_go, id_go_all, id_omim_pm, id_protein,
## id_transcript, ranges_cds, ranges_exon, ranges_gene, ranges_tx
1.4.33 Organism.dply example
# TxTb function
promoters(src)
## <SQL>
## SELECT *
## FROM `ranges_tx`
## GRanges object with 88 ranges and 2 metadata columns:
## seqnames ranges strand | tx_id
## <Rle> <IRanges> <Rle> | <integer>
## uc001hzz.2 chr1 243843037-243845236 - | 15880
## uc021plu.1 chr1 243843385-243845584 - | 15881
## uc001iab.3 chr1 243843083-243845282 - | 15882
## uc057qvr.1 chr1 243849929-243852128 - | 15883
## uc057qvt.1 chr1 243614947-243617146 - | 15884
## ... ... ... ... . ...
## uc064xqh.1 chrUn_GL000220v1<PHONE_NUMBER>24 + | 197741
## uc064xqi.1 chrUn_GL000220v1<PHONE_NUMBER>50 + | 197742
## uc064xqj.1 chrUn_GL000220v1<PHONE_NUMBER>27 + | 197743
## uc064xqk.1 chrUn_GL000220v1<PHONE_NUMBER>96 + | 197744
## uc033dnj.2 chrUn_GL000220v1<PHONE_NUMBER>96 + | 197750
## tx_name
## <character>
## uc001hzz.2 uc001hzz.2
## uc021plu.1 uc021plu.1
## uc001iab.3 uc001iab.3
## uc057qvr.1 uc057qvr.1
## uc057qvt.1 uc057qvt.1
## ... ...
## uc064xqh.1 uc064xqh.1
## uc064xqi.1 uc064xqi.1
## uc064xqj.1 uc064xqj.1
## uc064xqk.1 uc064xqk.1
## uc033dnj.2 uc033dnj.2
## -------
## seqinfo: 455 sequences (1 circular) from hg38 genome
# see a table in database
tbl(src, "id")
## # Source: table<id> [?? x 6]
## # Database: sqlite 3.22.0 []
## entrez map ensembl symbol genename alias
## <chr> <chr> <chr> <chr> <chr> <chr>
## 1 1 19q13.4 ENSG00000121410 A1BG alpha-1-B glycoprotein A1B
## 2 1 19q13.4 ENSG00000121410 A1BG alpha-1-B glycoprotein ABG
## 3 1 19q13.4 ENSG00000121410 A1BG alpha-1-B glycoprotein GAB
## 4 1 19q13.4 ENSG00000121410 A1BG alpha-1-B glycoprotein HYST2477
## 5 1 19q13.4 ENSG00000121410 A1BG alpha-1-B glycoprotein A1BG
## 6 10 8p22 ENSG00000156006 NAT2 N-acetyltransferase 2 AAC2
## 7 10 8p22 ENSG00000156006 NAT2 N-acetyltransferase 2 NAT-2
## 8 10 8p22 ENSG00000156006 NAT2 N-acetyltransferase 2 PNAT
## 9 10 8p22 ENSG00000156006 NAT2 N-acetyltransferase 2 NAT2
## 10 100 20q13.12 ENSG00000196839 ADA adenosine deaminase ADA
## # ... with more rows
# information from two tables
inner_join(tbl(src, "id"), tbl(src, "ranges_gene")) %>%
filter(symbol %in% c("ADA", "NAT2")) %>%
dplyr::select(gene_chrom, gene_start, gene_end,
gene_strand, symbol, alias, map)
## Joining, by = "entrez"
## # Source: lazy query [?? x 7]
## # Database: sqlite 3.22.0 []
## gene_chrom gene_start gene_end gene_strand symbol alias map
## <chr> <int> <int> <chr> <chr> <chr> <chr>
## 1 chr8 18391245 18401218 + NAT2 AAC2 8p22
## 2 chr8 18391245 18401218 + NAT2 NAT-2 8p22
## 3 chr8 18391245 18401218 + NAT2 PNAT 8p22
## 4 chr8 18391245 18401218 + NAT2 NAT2 8p22
## 5 chr20 44619522 44651742 - ADA ADA 20q13.12
1.4.34 Organism.dplyr exercises
How many supported organisms are implemented in Organism.dplyr?
Display the ensembl Id and genename description for symbol “NAT2”.
Show all the alias for “NAT2” in the database.
Display Gene ontology (GO) information for gene symbol “NAT2”.
1.4.35 BSgenome packages
BSgenome packages contain sequence information for a given species/build. There are many such packages - you can get a listing using available.genomes
library(BSgenome)
head(available.genomes())
## [1] "BSgenome.Alyrata.JGI.v1"
## [2] "BSgenome.Amellifera.BeeBase.assembly4"
## [3] "BSgenome.Amellifera.UCSC.apiMel2"
## [4] "BSgenome.Amellifera.UCSC.apiMel2.masked"
## [5] "BSgenome.Athaliana.TAIR.04232008"
## [6] "BSgenome.Athaliana.TAIR.TAIR9"
1.4.36 BSgenome packages
We can load and inspect a BSgenome package
library(BSgenome.Hsapiens.UCSC.hg19)
Hsapiens
## Human genome:
## # organism: Homo sapiens (Human)
## # provider: UCSC
## # provider version: hg19
## # release date: Feb. 2009
## # release name: Genome Reference Consortium GRCh37
## # 93 sequences:
## # chr1 chr2 chr3
## # chr4 chr5 chr6
## # chr7 chr8 chr9
## # chr10 chr11 chr12
## # chr13 chr14 chr15
## # ... ... ...
## # chrUn_gl000235 chrUn_gl000236 chrUn_gl000237
## # chrUn_gl000238 chrUn_gl000239 chrUn_gl000240
## # chrUn_gl000241 chrUn_gl000242 chrUn_gl000243
## # chrUn_gl000244 chrUn_gl000245 chrUn_gl000246
## # chrUn_gl000247 chrUn_gl000248 chrUn_gl000249
## # (use 'seqnames()' to see all the sequence names, use the '$' or '[['
## # operator to access a given sequence)
1.4.37 BSgenome packages
The main accessor is getSeq
, and you can get data by sequence (e.g., entire chromosome or unplaced scaffold), or by passing in a GRanges object, to get just a region.
getSeq(Hsapiens, "chr1")
## 249250621-letter "DNAString" instance
## seq: NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN...NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
getSeq(Hsapiens, gns["5467",])
## A DNAStringSet instance of length 1
## width seq names
## [1] 85634 GCGGAGCGTGTGACGCTGCGG...TATTTAAGAGCTGACTGGAA 5467
The Biostrings package contains most of the code for dealing with these *StringSet
objects - please see the Biostrings vignettes and help pages for more information.
1.4.38 BSgenome exercises
- Get the sequences for all transcripts of the TP53 gene
1.4.39 AnnotationHub
AnnotationHub is a package that allows us to query and download many different annotation objects, without having to explicitly install them.
library(AnnotationHub)
hub <- AnnotationHub()
## snapshotDate(): 2018-06-27
hub
## AnnotationHub with 44925 records
## # snapshotDate(): 2018-06-27
## # $dataprovider: BroadInstitute, Ensembl, UCSC, ftp://ftp.ncbi.nlm.nih....
## # $species: Homo sapiens, Mus musculus, Drosophila melanogaster, Bos ta...
## # $rdataclass: GRanges, BigWigFile, FaFile, TwoBitFile, Rle, OrgDb, Cha...
## # additional mcols(): taxonomyid, genome, description,
## # coordinate_1_based, maintainer, rdatadateadded, preparerclass,
## # tags, rdatapath, sourceurl, sourcetype
## # retrieve records with, e.g., 'object[["AH2"]]'
##
## title
## AH2 | Ailuropoda_melanoleuca.ailMel1.69.dna.toplevel.fa
## AH3 | Ailuropoda_melanoleuca.ailMel1.69.dna_rm.toplevel.fa
## AH4 | Ailuropoda_melanoleuca.ailMel1.69.dna_sm.toplevel.fa
## AH5 | Ailuropoda_melanoleuca.ailMel1.69.ncrna.fa
## AH6 | Ailuropoda_melanoleuca.ailMel1.69.pep.all.fa
## ... ...
## AH63655 | phastCons46wayPrimates.UCSC.hg19.chrX.rds
## AH63656 | phastCons46wayPrimates.UCSC.hg19.chrY.rds
## AH63657 | Alternative Splicing Annotation for Homo sapiens (Human)
## AH63658 | Allele data from the IPD IMGT/HLA database
## AH63659 | Allele data from the IPD KIR database
1.4.40 Querying AnnotationHub
Finding the ‘right’ resource on AnnotationHub is like using Google - a well posed query is necessary to find what you are after. Useful queries are based on
Data provider
Data class
Species
Data source
names(mcols(hub))
## [1] "title" "dataprovider" "species"
## [4] "taxonomyid" "genome" "description"
## [7] "coordinate_1_based" "maintainer" "rdatadateadded"
## [10] "preparerclass" "tags" "rdataclass"
## [13] "rdatapath" "sourceurl" "sourcetype"
1.4.41 AnnotationHub Data providers
unique(hub$dataprovider)
## [1] "Ensembl"
## [2] "UCSC"
## [3] "RefNet"
## [4] "Inparanoid8"
## [5] "NHLBI"
## [6] "ChEA"
## [7] "Pazar"
## [8] "NIH Pathway Interaction Database"
## [9] "Haemcode"
## [10] "BroadInstitute"
## [11] "PRIDE"
## [12] "Gencode"
## [13] "CRIBI"
## [14] "Genoscope"
## [15] "MISO, VAST-TOOLS, UCSC"
## [16] "UWashington"
## [17] "Stanford"
## [18] "dbSNP"
## [19] "BioMart"
## [20] "GeneOntology"
## [21] "KEGG"
## [22] "URGI"
## [23] "ftp://ftp.ncbi.nlm.nih.gov/gene/DATA/"
## [24] "EMBL-EBI"
1.4.42 AnnotationHub Data classes
unique(hub$rdataclass)
## [1] "FaFile"
## [2] "GRanges"
## [3] "data.frame"
## [4] "Inparanoid8Db"
## [5] "TwoBitFile"
## [6] "ChainFile"
## [7] "SQLiteConnection"
## [8] "biopax"
## [9] "BigWigFile"
## [10] "AAStringSet"
## [11] "MSnSet"
## [12] "mzRpwiz"
## [13] "mzRident"
## [14] "list"
## [15] "TxDb"
## [16] "Rle"
## [17] "EnsDb"
## [18] "VcfFile"
## [19] "igraph"
## [20] "OrgDb"
## [21] "data.frame, DNAStringSet, GRanges"
1.4.43 AnnotationHub Species
head(unique(hub$species))
## [1] "Ailuropoda melanoleuca" "Anolis carolinensis"
## [3] "Bos taurus" "Caenorhabditis elegans"
## [5] "Callithrix jacchus" "Canis familiaris"
length(unique(hub$species))
## [1] 1971
1.4.44 AnnotationHub Data sources
unique(hub$sourcetype)
## [1] "FASTA" "UCSC track" "GTF" "TSV"
## [5] "Inparanoid" "TwoBit" "Chain" "GRASP"
## [9] "Zip" "CSV" "BioPax" "BioPaxLevel2"
## [13] "RData" "BED" "BigWig" "tab"
## [17] "mzTab" "mzML" "mzid" "GFF"
## [21] "ensembl" "VCF" "NCBI/ensembl" "NCBI/UniProt"
1.4.45 AnnotationHub query
qry <- query(hub, c("granges","homo sapiens","ensembl"))
qry
## AnnotationHub with 56 records
## # snapshotDate(): 2018-06-27
## # $dataprovider: Ensembl, UCSC
## # $species: Homo sapiens
## # $rdataclass: GRanges
## # additional mcols(): taxonomyid, genome, description,
## # coordinate_1_based, maintainer, rdatadateadded, preparerclass,
## # tags, rdatapath, sourceurl, sourcetype
## # retrieve records with, e.g., 'object[["AH5046"]]'
##
## title
## AH5046 | Ensembl Genes
## AH5160 | Ensembl Genes
## AH5311 | Ensembl Genes
## AH5434 | Ensembl Genes
## AH5435 | Ensembl EST Genes
## ... ...
## AH60085 | Homo_sapiens.GRCh38.91.gtf
## AH61125 | Homo_sapiens.GRCh38.92.abinitio.gtf
## AH61126 | Homo_sapiens.GRCh38.92.chr.gtf
## AH61127 | Homo_sapiens.GRCh38.92.chr_patch_hapl_scaff.gtf
## AH61128 | Homo_sapiens.GRCh38.92.gtf
1.4.46 AnnotationHub query
qry$sourceurl
## [1] "rtracklayer://hgdownload.cse.ucsc.edu/goldenpath/hg19/database/ensGene"
## [2] "rtracklayer://hgdownload.cse.ucsc.edu/goldenpath/hg18/database/ensGene"
## [3] "rtracklayer://hgdownload.cse.ucsc.edu/goldenpath/hg17/database/ensGene"
## [4] "rtracklayer://hgdownload.cse.ucsc.edu/goldenpath/hg16/database/ensGene"
## [5] "rtracklayer://hgdownload.cse.ucsc.edu/goldenpath/hg16/database/ensEstGene"
## [6] "ftp://ftp.ensembl.org/pub/release-70/gtf/homo_sapiens/Homo_sapiens.GRCh37.70.gtf.gz"
## [7] "ftp://ftp.ensembl.org/pub/release-69/gtf/homo_sapiens/Homo_sapiens.GRCh37.69.gtf.gz"
## [8] "ftp://ftp.ensembl.org/pub/release-71/gtf/homo_sapiens/Homo_sapiens.GRCh37.71.gtf.gz"
## [9] "ftp://ftp.ensembl.org/pub/release-72/gtf/homo_sapiens/Homo_sapiens.GRCh37.72.gtf.gz"
## [10] "ftp://ftp.ensembl.org/pub/release-73/gtf/homo_sapiens/Homo_sapiens.GRCh37.73.gtf.gz"
## [11] "ftp://ftp.ensembl.org/pub/release-74/gtf/homo_sapiens/Homo_sapiens.GRCh37.74.gtf.gz"
## [12] "ftp://ftp.ensembl.org/pub/release-75/gtf/homo_sapiens/Homo_sapiens.GRCh37.75.gtf.gz"
## [13] "ftp://ftp.ensembl.org/pub/release-78/gtf/homo_sapiens/Homo_sapiens.GRCh38.78.gtf.gz"
## [14] "ftp://ftp.ensembl.org/pub/release-76/gtf/homo_sapiens/Homo_sapiens.GRCh38.76.gtf.gz"
## [15] "ftp://ftp.ensembl.org/pub/release-79/gtf/homo_sapiens/Homo_sapiens.GRCh38.79.gtf.gz"
## [16] "ftp://ftp.ensembl.org/pub/release-77/gtf/homo_sapiens/Homo_sapiens.GRCh38.77.gtf.gz"
## [17] "ftp://ftp.ensembl.org/pub/release-80/gtf/homo_sapiens/Homo_sapiens.GRCh38.80.gtf.gz"
## [18] "ftp://ftp.ensembl.org/pub/release-81/gtf/homo_sapiens/Homo_sapiens.GRCh38.81.gtf.gz"
## [19] "ftp://ftp.ensembl.org/pub/release-82/gtf/homo_sapiens/Homo_sapiens.GRCh38.82.gtf.gz"
## [20] "ftp://ftp.ensembl.org/pub/release-83/gtf/homo_sapiens/Homo_sapiens.GRCh38.83.gtf.gz"
## [21] "ftp://ftp.ensembl.org/pub/release-84/gtf/homo_sapiens/Homo_sapiens.GRCh38.84.abinitio.gtf.gz"
## [22] "ftp://ftp.ensembl.org/pub/release-84/gtf/homo_sapiens/Homo_sapiens.GRCh38.84.chr.gtf.gz"
## [23] "ftp://ftp.ensembl.org/pub/release-84/gtf/homo_sapiens/Homo_sapiens.GRCh38.84.chr_patch_hapl_scaff.gtf.gz"
## [24] "ftp://ftp.ensembl.org/pub/release-84/gtf/homo_sapiens/Homo_sapiens.GRCh38.84.gtf.gz"
## [25] "ftp://ftp.ensembl.org/pub/release-85/gtf/homo_sapiens/Homo_sapiens.GRCh38.85.abinitio.gtf.gz"
## [26] "ftp://ftp.ensembl.org/pub/release-85/gtf/homo_sapiens/Homo_sapiens.GRCh38.85.chr.gtf.gz"
## [27] "ftp://ftp.ensembl.org/pub/release-85/gtf/homo_sapiens/Homo_sapiens.GRCh38.85.chr_patch_hapl_scaff.gtf.gz"
## [28] "ftp://ftp.ensembl.org/pub/release-85/gtf/homo_sapiens/Homo_sapiens.GRCh38.85.gtf.gz"
## [29] "ftp://ftp.ensembl.org/pub/release-86/gtf/homo_sapiens/Homo_sapiens.GRCh38.86.abinitio.gtf.gz"
## [30] "ftp://ftp.ensembl.org/pub/release-86/gtf/homo_sapiens/Homo_sapiens.GRCh38.86.chr.gtf.gz"
## [31] "ftp://ftp.ensembl.org/pub/release-86/gtf/homo_sapiens/Homo_sapiens.GRCh38.86.chr_patch_hapl_scaff.gtf.gz"
## [32] "ftp://ftp.ensembl.org/pub/release-86/gtf/homo_sapiens/Homo_sapiens.GRCh38.86.gtf.gz"
## [33] "ftp://ftp.ensembl.org/pub/release-87/gtf/homo_sapiens/Homo_sapiens.GRCh38.87.abinitio.gtf.gz"
## [34] "ftp://ftp.ensembl.org/pub/release-87/gtf/homo_sapiens/Homo_sapiens.GRCh38.87.chr.gtf.gz"
## [35] "ftp://ftp.ensembl.org/pub/release-87/gtf/homo_sapiens/Homo_sapiens.GRCh38.87.chr_patch_hapl_scaff.gtf.gz"
## [36] "ftp://ftp.ensembl.org/pub/release-87/gtf/homo_sapiens/Homo_sapiens.GRCh38.87.gtf.gz"
## [37] "ftp://ftp.ensembl.org/pub/release-88/gtf/homo_sapiens/Homo_sapiens.GRCh38.88.abinitio.gtf.gz"
## [38] "ftp://ftp.ensembl.org/pub/release-88/gtf/homo_sapiens/Homo_sapiens.GRCh38.88.chr.gtf.gz"
## [39] "ftp://ftp.ensembl.org/pub/release-88/gtf/homo_sapiens/Homo_sapiens.GRCh38.88.chr_patch_hapl_scaff.gtf.gz"
## [40] "ftp://ftp.ensembl.org/pub/release-88/gtf/homo_sapiens/Homo_sapiens.GRCh38.88.gtf.gz"
## [41] "ftp://ftp.ensembl.org/pub/release-89/gtf/homo_sapiens/Homo_sapiens.GRCh38.89.abinitio.gtf.gz"
## [42] "ftp://ftp.ensembl.org/pub/release-89/gtf/homo_sapiens/Homo_sapiens.GRCh38.89.chr.gtf.gz"
## [43] "ftp://ftp.ensembl.org/pub/release-89/gtf/homo_sapiens/Homo_sapiens.GRCh38.89.chr_patch_hapl_scaff.gtf.gz"
## [44] "ftp://ftp.ensembl.org/pub/release-89/gtf/homo_sapiens/Homo_sapiens.GRCh38.89.gtf.gz"
## [45] "ftp://ftp.ensembl.org/pub/release-90/gtf/homo_sapiens/Homo_sapiens.GRCh38.90.abinitio.gtf.gz"
## [46] "ftp://ftp.ensembl.org/pub/release-90/gtf/homo_sapiens/Homo_sapiens.GRCh38.90.chr.gtf.gz"
## [47] "ftp://ftp.ensembl.org/pub/release-90/gtf/homo_sapiens/Homo_sapiens.GRCh38.90.chr_patch_hapl_scaff.gtf.gz"
## [48] "ftp://ftp.ensembl.org/pub/release-90/gtf/homo_sapiens/Homo_sapiens.GRCh38.90.gtf.gz"
## [49] "ftp://ftp.ensembl.org/pub/release-91/gtf/homo_sapiens/Homo_sapiens.GRCh38.91.abinitio.gtf.gz"
## [50] "ftp://ftp.ensembl.org/pub/release-91/gtf/homo_sapiens/Homo_sapiens.GRCh38.91.chr.gtf.gz"
## [51] "ftp://ftp.ensembl.org/pub/release-91/gtf/homo_sapiens/Homo_sapiens.GRCh38.91.chr_patch_hapl_scaff.gtf.gz"
## [52] "ftp://ftp.ensembl.org/pub/release-91/gtf/homo_sapiens/Homo_sapiens.GRCh38.91.gtf.gz"
## [53] "ftp://ftp.ensembl.org/pub/release-92/gtf/homo_sapiens/Homo_sapiens.GRCh38.92.abinitio.gtf.gz"
## [54] "ftp://ftp.ensembl.org/pub/release-92/gtf/homo_sapiens/Homo_sapiens.GRCh38.92.chr.gtf.gz"
## [55] "ftp://ftp.ensembl.org/pub/release-92/gtf/homo_sapiens/Homo_sapiens.GRCh38.92.chr_patch_hapl_scaff.gtf.gz"
## [56] "ftp://ftp.ensembl.org/pub/release-92/gtf/homo_sapiens/Homo_sapiens.GRCh38.92.gtf.gz"
1.4.47 Selecting AnnotationHub resource
whatIwant <- qry[["AH50377"]]
We can use these data as they are, or convert to a TxDb format:
GRCh38TxDb <- makeTxDbFromGRanges(whatIwant)
GRCh38TxDb
## TxDb object:
## # Db type: TxDb
## # Supporting package: GenomicFeatures
## # Genome: GRCh38
## # transcript_nrow: 199184
## # exon_nrow: 675836
## # cds_nrow: 270225
## # Db created by: GenomicFeatures package from Bioconductor
## # Creation time: 2018-06-29 10:02:16 -0400 (Fri, 29 Jun 2018)
## # GenomicFeatures version at creation time: 1.33.0
## # RSQLite version at creation time: 2.1.1
## # DBSCHEMAVERSION: 1.2
1.4.48 AnnotationHub exercises
How many resources are on AnnotationHub for Atlantic salmon (Salmo salar)?
Get the most recent Ensembl build for domesticated dog (Canis familiaris) and make a TxDb
1.4.49 biomaRt
The biomaRt package allows queries to an Ensembl Biomart server. We can see the choices of servers that we can use:
library(biomaRt)
listMarts()
## biomart version
## 1 ENSEMBL_MART_ENSEMBL Ensembl Genes 92
## 2 ENSEMBL_MART_MOUSE Mouse strains 92
## 3 ENSEMBL_MART_SNP Ensembl Variation 92
## 4 ENSEMBL_MART_FUNCGEN Ensembl Regulation 92
1.4.50 biomaRt data sets
And we can then check for the available data sets on a particular server.
mart <- useMart("ENSEMBL_MART_ENSEMBL")
head(listDatasets(mart))
## dataset description
## 1 acarolinensis_gene_ensembl Anole lizard genes (AnoCar2.0)
## 2 amelanoleuca_gene_ensembl Panda genes (ailMel1)
## 3 amexicanus_gene_ensembl Cave fish genes (AstMex102)
## 4 anancymaae_gene_ensembl Ma's night monkey genes (Anan_2.0)
## 5 aplatyrhynchos_gene_ensembl Duck genes (BGI_duck_1.0)
## 6 btaurus_gene_ensembl Cow genes (UMD3.1)
## version
## 1 AnoCar2.0
## 2 ailMel1
## 3 AstMex102
## 4 Anan_2.0
## 5 BGI_duck_1.0
## 6 UMD3.1
1.4.51 biomaRt queries
After setting up a mart
object pointing to the server and data set that we care about, we can make queries. We first set up the mart
object.
mart <- useMart("ENSEMBL_MART_ENSEMBL","hsapiens_gene_ensembl")
Queries are of the form
getBM(attributes, filters, values, mart)
where
attributes are the things we want
filters are the types of IDs we have
values are the IDs we have
mart is the
mart
object we set up
1.4.52 biomaRt attributes and filters
Both attributes and filters have rather inscrutable names, but a listing can be accessed using
atrib <- listAttributes(mart)
filts <- listFilters(mart)
head(atrib)
## name description page
## 1 ensembl_gene_id Gene stable ID feature_page
## 2 ensembl_gene_id_version Gene stable ID version feature_page
## 3 ensembl_transcript_id Transcript stable ID feature_page
## 4 ensembl_transcript_id_version Transcript stable ID version feature_page
## 5 ensembl_peptide_id Protein stable ID feature_page
## 6 ensembl_peptide_id_version Protein stable ID version feature_page
head(filts)
## name description
## 1 chromosome_name Chromosome/scaffold name
## 2 start Start
## 3 end End
## 4 band_start Band Start
## 5 band_end Band End
## 6 marker_start Marker Start
1.4.53 biomaRt query
A simple example query
afyids <- c("1000_at","1001_at","1002_f_at","1007_s_at")
getBM(c("affy_hg_u95av2", "hgnc_symbol"), c("affy_hg_u95av2"), afyids, mart)
## affy_hg_u95av2 hgnc_symbol
## 1 1000_at MAPK3
## 2 1007_s_at DDR1
## 3 1002_f_at
## 4 1002_f_at CYP2C19
## 5 1001_at TIE1
1.4.54 biomaRt exercises
Get the Ensembl gene IDs and HUGO symbol for Entrez Gene IDs 672, 5468 and 7157
What do you get if you query for the ‘gene_exon’ for GAPDH?


Password Manager Internals
Captured password manager logs are listed below. Logs are cleared and no longer captured when all password-manager-internals pages are closed.
Captured password manager logs are
not available
in Incognito.


{% if user and not user.is_anonymous %}
| Name |
Position |
Office |
Age |
Start date |
Salary |
| Tiger Nixon |
System Architect |
Edinburgh |
61 |
2011/04/25 |
$320,800 |
| Garrett Winters |
Accountant |
Tokyo |
63 |
2011/07/25 |
$170,750 |
| Ashton Cox |
Junior Technical Author |
San Francisco |
66 |
2009/01/12 |
$86,000 |
| Cedric Kelly |
Senior Javascript Developer |
Edinburgh |
22 |
2012/03/29 |
$433,060 |
| Airi Satou |
Accountant |
Tokyo |
33 |
2008/11/28 |
$162,700 |
| Brielle Williamson |
Integration Specialist |
New York |
61 |
2012/12/02 |
$372,000 |
| Herrod Chandler |
Sales Assistant |
San Francisco |
59 |
2012/08/06 |
$137,500 |
| Rhona Davidson |
Integration Specialist |
Tokyo |
55 |
2010/10/14 |
$327,900 |
| Donna Snider |
Customer Support |
New York |
27 |
2011/01/25 |
$112,000 |
{% else %}
{% endif %}


The IBM Quantum Experience consists of:
Please note that the IBM Quantum Experience is a “living experiment,” and we are constantly making updates to it. We hope our users will help us refine its functionality and improve the overall interface by providing feedback. In the community forum, please let us know your thoughts for improvement – and please share any cool scores and results you come across! If you find any bugs, please report them with our bug tracker, accessible via the little bug icon in the lower right-hand corner of each page.
To make sure everyone has a chance to use the real device in our lab via the Cloud, we have established a Units currency system. If you have joined the IBM Quantum Experience as a Standard User, you have full access to our simulation capabilities and to previously-run cached results from the real device and a small number of Units to run real experiments on the quantum processor hardware. Once you have read through the User Guide you will be rewarded with extra Units to run more real-time experiments. This system allows our experiment queue to run smoothly. When your Units are used up, you will be replenished once you have viewed the results of the completed execution. We also invite Standard Users to request an upgrade of your User status to Expert User, which provides access to more Units and other advanced features as we introduce them. Contact us and let us know why you would like to become an Expert User.
The quantum processor in our lab requires frequent calibration; during these short periods, you will receive a “Down for Calibration” notice and if we need to perform maintenance a “Down for Maintenance” message will be displayed. In both cases the simulation will be available for you to keep learning and designing new experiments.
For those who wish to jump right into creating your own experiments, you can skip right to the Quantum Composer. If you wish to improve your understanding of the quantum world first, please continue reading this User Guide, starting with the Quantum Worldsection on the next page. Use the numbers at the top and bottom of each page to navigate through each section.
We would like to acknowledge the work done under the IARPA Multi-Qubit Coherent Operations program, the Logical Qubits program, the LPS Quantum Characterization Validation & Verification program, and the IBM Research Frontiers Institute. The research performed in those programs has contributed to making this Quantum Experience possible.
Thank you,
Jay Gambetta, Jerry Chow, and the IBM Quantum team


new Ginger(log)
Represents the core G.I.N.G.E.R. object. This object takes of managing and maintaining
the deployed G.I.N.G.E.R. instance.
Parameters:
| Name | Type | Description |
|---|---|---|
log |
boolean | Signifies whether or not G.I.N.G.E.R. should use it's own log tunnel for logging system information. |
- Source:


Be happy by setting fire in oilfield.
You can use oil, gasoline, petrol, fuel, gas or benzin to make the fire happy.
Try to find the best way to complete each level.
You can come up with your own solution so be creative and don't be afraid to think out of the box!
Some levels might look easy but let's see if you can actually get the 3 stars.
You can be pyromaniac.
 Draw lines freely to complete levels!
• Simple, smart and fun puzzles but can be challenging too
• Lots of levels with more coming soon!
• Fun and relaxing theme that will make you stay for quite some time


Neuroplasticity can be considered as learning.  It is and how we can create new connections between neurons and rewire brain function. When people stop learning or practicing new things the brain will start to lose these connecting cells that formed that pathway. Like learning a new language, you may start off practicing every day for two weeks but stop after that. Your brain might lose these connections once stopped because it is no longer considered useful “use it or lose it”.
A great example of “use it and improve it” is people who are dealing with a brain injury, they need to relearn how to adapt and recover through repetition and intensity of doing something over and over again until your brain can recognise and retrieve these actions as second nature.
Having a growth mindset refers to the belief that you can improve intelligence as opposed to having a fixed mindset.  People with growth mind sets usually embrace opportunities without the fear of failure, as they understand that trying and sometimes failing is a part of learning process. They believe new abilities can be created through practice, and that constructive criticism is not personal but related to how they can improve on what they are getting assessed on.
To help with my learning journey I will harness the realisation that my brain is constantly changing and can change with practice, it will helps eliminate those feelings of giving up because I’m not smart enough. Embracing others’ achievements, seeing peers succeed and solving problems despite the obstacles that stand in my way.
<---Return to home page


Id = 50
Nombre Capitulo = Kyle's Teenyverse
Tipo = Teenyverse
Dimension = Replacement Dimension
Personaje = ['https://rickandmortyapi.com/api/character/197', 'https://rickandmortyapi.com/api/character/364']
Numero Personaje = ['197', '364']
URL Locacion = https://rickandmortyapi.com/api/location/50


Sample Html test elements
Username
First Name
Last Name
Password
Confirm Password
Email
Gender
Male
Female
I accept Terms and Conditions


EBD - Easton Bible DIctionary
Sion
SION
"SION "elevated. (1.) Denotes Mount Hermon in
Deuteronomy 4:48
; called Sirion by the Sidonians, and by the Amorites Shenir (
Deuteronomy 3:9
).
(See HERMON.)(2.) The Greek form of Zion (q.v.) in
Matthew 21:5
;
John 12:15
.
"SION "elevated. (1.) Denotes Mount Hermon in Deuteronomy 4:48; called Sirion by the Sidonians, and by the Amorites Shenir (Deuteronomy 3:9).
(See HERMON.)(2.) The Greek form of Zion (q.v.) in Matthew 21:5; John 12:15.


{% extends "base2.html"%}
{%block nav-home%} {%endblock%}
{%block nav-tut%} active {%endblock%}
{%block nav-about%} {%endblock%}
{%block nav-faq%} {%endblock%}
{%block slim%}
Enter the repository that you want OnToology to track. At the moment we only support user repositories. If you have an organization repository (or a repository that is not under your repository) you can fork that repository and add the fork url (your-username/the-repo-name).
If it is your first time, OnToology will redirect you to GitHub. This step is needed to authorize OnToology to track your repository.
By clicking on "Authorize Application", you authorize OnToology to track your repository. DOn't worry, OnToology will never modify your code or ontologies.
To check your tracked repositories, click on the "My Repositories" tab:
By selecting a repository (click on "Select Repo"), you will see a screen with the individual configuration of all the ontologies present in that repository.
By clicking on "show configuration" in one of them, a menu with its current configuration will be displayed. The configuration includes the options which are selected when OnToology is contributing materials to your repository. For example, in the image below OnToology is configured to push documentation, diagrams, evaluation reports and JSON-LD contexts, but not validation or WebVowl diagrams.
You can also check your past jobs by clicking on "My Repositories -> Past Jobs". You will see the status of your current repositories (in case OnToology is still processing some of them) and a history of your past jobs.
Once you make a change to any of your ontologies (in the tracked repository) and push these changes, OnToology will (re)generate the associated documentation, diagrams and evaluation reports; and will create a pull request for your approval.
Next, you will need to click on the pull request generate by OnToology so see the changes and merge it to your repository.
Click on the "Merge pull request" button to accept the generated resources to your repository.
GitHub requires you to confirm the pull request to accept the changes (resources generated by OnToology). Simply click on the "Confirm merge" button.
All generated resources are located under a folder called "OnToology" in your repository, the structured of your repository is mimicked inside the "OnToology" folder.
Select the identifier you want to give to your ontology. For example, if you select "alojamiento", the w3id will be "https://w3id.org/def/alojamiento". Identifiers are unique, so OnToology will not allow repeated identifiers. Once you have reserved an id, you can go to "My Repositories -> My Published Ontologies". You should see a screen similar to the one below. The available actions are to "unpublish" a published ontology; or download a bundle in case you prefer to publish it somewhere else.
If there are any problems processing your ontologies, you may validate them using the custom syntax validator in OnToology. To use it, just click on "My Repositories" and select "Syntax Validator". You will see a screen like the one in the figure below. Simply add your ontology URI and serialization, and OnToology will tell you whether there are errors parsing it or not.


2020-02-12
Companies are hiring product managers like never before, and being a product manager has never been more popular. I knew there was a growing corpus of material on what makes a good / bad product manager, but thought there was less on getting your first job as a product manager. After tweeting about it, I was thankfully proven incorrect [1].
So I decided to switch the focus of this article towards some of the obstacles you will face trying to make the switch into product management and how to overcome them. Based on my own (biased) experience, and those I have helped make the transition, what follows is a candid description of three common paths to becoming a product manager, their associated risks & benefits, and reasons each might be right for you.
Let us accept all the different paths as different rivers running toward the same ocean.
— Swami Satchidananda
The Associate Product Manager (APM) program was pioneered by Google when Marissa Mayer bet she could hire and train new grads to be product managers faster than they could hire experienced ones. She won. Nowadays many other companies have spun up their own [2].
This option is essentially reserved for new grads with technical backgrounds (e.g. computer science, human-computer interaction). Assuming you fit that criteria, this can be a great option if your love for how technology can solve human problems outweighs your desire to actually build the solution [3].
You meet the qualifications and want a low risk way to start your career in tech with a solid reputation and expansive follow-on opportunities.
If you prefer “figuring it out” on your own and always felt like school moved too slow (← quote from a friend).
Since product management is still a relatively nascent field, many product managers transition from other disciplines (either out of interest or necessity). Some of the most common examples include engineering, analytics, marketing, and support [4].
This is a tough path. Most companies do not make this transition easy. Surprisingly it is less about arduous processes and more about overcoming the stigma existing product managers will have against you. There are companies that genuinely cheer on these types of transitions, but sadly the majority do not [5]. The key is to start taking on product management responsibilities before you formally try to switch. That way you have clear examples (and people) to point to for evidence.
Also try to identify an internal champions who can coach you on being a product manager, going through the process, and telling your story. This can be multiple people, but you will need a single person, often the hiring manager, to push you through whatever internal mobility process the company has in place.
You are already succeeding in your current role and can identify internal champions to help you through the process.
You do not have champions and are afraid of tarnishing your existing reputation within the company. Or if the work you have done is compelling enough for another company.
Joining an early stage startup is one of the best ways to learn about building a product, company, and culture — regardless of your function. You need to be ready to do the work no one else wants to, to push boundaries, and to seize opportunities. When searching for a startup to join, use the following criteria in the order listed:
People come first because they will ultimately shape your experience and be your support network when you move on. Identify founders / team members you respect and would want to learn from. Analyze how they view the world (e.g. follow them on Twitter, watch interviews on YouTube) and see who you gravitate towards.
Growth means opportunity. The faster the company is growing, the more opportunities there are to raise your hand. This doesn’t mean you are guaranteed to get those opportunities, but it does mean you will have more at-bat’s and the company will be more willing to give you a shot due to the pain.
Industry is the gravy on top. If you can find a startup that meets all three criteria, good for you. This often isn’t the case and should not stop you from a good learning opportunity. The skills you develop in an early stage company are highly transferrable and domain expertise is rarely the deciding factor in a hiring decision. Optimize for people.
Startups are simultaneously the last resort and my personal recommendation [6]. Startups are the most fertile learning environment. Startups reward growth mindsets and tenacious work ethic. Startups maximize exposure and opportunity. But startups are not for everyone.
So why do I recommend this path?
You get to choose your own adventure. You get to tell your own story. The upper bound on what is possible is not fixed. With that sort of upside potential comes no safety net. You can grind for years and come out the other end with no title to show for it. That’s okay. What matters are the skills you acquired, the behaviors you developed, the people who will vouch for you, and the stories you can tell.
The most important parts of interviewing to be a product manager are how you think and how you communicate. If you can develop frameworks from your startup experience and tell compelling narratives, you are 90% of the way there.
You thrive in chaos, want more responsibility, are comfortable with uncertainty, and are willing to work harder than is fair. Or if you have no other choice.
You prefer structured environments or need stability in your life (e.g. support family, pay off loan).
There are many paths to becoming a product manager, and none is objectively better than another. But I do believe that every product manager should do a different job before becoming a product manager. It gives you empathy for another role, a unique perspective, and tactical skills that will blossom in ways you will continued to be surprised by for years to come.
If you face resistance, keep pushing. We don’t like to talk about it, but there is an odd “club mentality” in the product management world. It feels hard to get in. And once you make it in you feel good, but also protective about others joining. This is silly. We should be doing everything we can to help the next great product managers succeed, regardless of their background. I hope this article does.
[1] I strongly recommend reading all of these articles. They each offer something valuable.
Lenny Rachitsky has the most thorough article on how to become a product manager and has excellent section that helps determine whether product management is even right for you.
Sachin Rekhi lays out five great paths and some great nuggets on demographics that will likely succeed in each.
Adam Waxman offers excellent advice on specific tactics to break into product management.
[2] Suhas Motwani has a great collection of APM programs.
[3] This does not mean that engineers do not care about solving human problems. They do, deeply. But the key is where your personal curiosity and capabilities meet.
[4] Other disciplines include Sales, Business Development, Design, any! The ones originally mentioned are simply the most common.
[5] If a company says they do, ask them how many employees have successfully made the transition and how many have tried to get a ratio. I bet it’s less than 50%.
[6] Joining a startup and hustling was the path I took, so there is a strong presence of survivorship bias here. I know excellent (better) product managers who took the other paths. I simply believe startups are a compelling option for the majority of folks looking to break into the field who don’t have the “right” backgrounds.


Statistics
Total Fire Stations: {{ stations.count | intcomma }}
Total Fire Departments: {{ departments.count | intcomma}}
Fire departments with no jurisdictions: {{ departments_with_government_unit.count | intcomma}}
Fire stations with FDIDs set: {{ stations_with_fdid.count | intcomma}}
Fire stations with Departments: {{ stations_with_departments.count | intcomma}}


IsoSpec is a fine structure calculator used for obtaining the most probable masses of a chemical compound given the frequencies of the composing isotopes and their masses. It finds the smallest set of isotopologues with a given probability. The probability is assumed to be that of the product of multinomial distributions, each corresponding to one particular element and parametrized by the frequencies of finding these elements in nature. These numbers are supplied by IUPAC - the International Union of Pure and Applied Chemistry.
| Version: | 1.9.1 |
| Depends: | R (≥ 3.0.0) |
| Imports: | Rcpp (≥ 0.12.0) |
| LinkingTo: | Rcpp |
| Suggests: | testthat |
| Published: | 2018-11-18 |
| Author: | Mateusz Krzysztof Lacki and Michal Startek |
| Maintainer: | Matteo Lacki <matteo.lacki at gmail.com> |
| License: | BSD_2_clause + file LICENCE |
| URL: | http://matteolacki.github.io/IsoSpec/ |
| NeedsCompilation: | yes |
| SystemRequirements: | C++11 |
| Citation: | IsoSpecR citation info |
| CRAN checks: | IsoSpecR results |
| Reference manual: | IsoSpecR.pdf |
| Package source: | IsoSpecR_1.9.1.tar.gz |
| Windows binaries: | r-devel: IsoSpecR_1.9.1.zip, r-release: IsoSpecR_1.9.1.zip, r-oldrel: IsoSpecR_1.9.1.zip |
| OS X binaries: | r-release: IsoSpecR_1.9.1.tgz, r-oldrel: IsoSpecR_1.9.1.tgz |
| Old sources: | IsoSpecR archive |
Please use the canonical form https://CRAN.R-project.org/package=IsoSpecR to link to this page.


Namespaces | |
| namespace | parser |
| namespace | io |
Classes | |
| class | Frame |
| A Frame is a container for storing Symbol to Value references. More... | |
| class | Value_data |
| A Value is a holder for things such as a number or a pointer to a Frame. More... | |
| class | Value |
| class | UnitTest |
| class | Array |
| An Array is a sequential block of Values, indexed by number. More... | |
| class | GCArray |
| class | Expression |
| class | Express |
| class | Float |
| Float is the core class for numbers. More... | |
| class | Lobby |
| Lobby is the root, or global context in Impulse. More... | |
| class | Message |
| A Message simply stores a selector and arguments. More... | |
| class | Assign |
| class | Method |
| A Method is a wrapper around a C++ method to be used as a slot value. More... | |
| class | Nil |
| class | Object |
| Object is the root of the proto hierarchy, which provides basic functions such as setting and getting slots. More... | |
| class | Socket |
| class | Stream |
| A Stream provides a means of input and output, to and from the console or a file. More... | |
| class | String |
| class | Symbol |
| A Symbol is an unique identifier, used for selectors in messages and keys in hash maps. More... | |
| class | ExpressTest |
| class | FloatTest |
| class | FrameTest |
| class | GarbageTest |
| class | MessageTest |
| struct | Test |
| class | MethodTest |
| class | SocketTest |
| class | SymbolTest |
| class | ValueTest |
Functions | |
| void | runAllTests () |
Variables | |
| char | spaces [] = " " |
| int | indent = 0 |
| Value | _nil_ = new Nil() |
| Value | _Float_ = new Float() |
| Value | _LitNum_ = new Float() |
| Value | _Object_ = new Object() |
| Value | _Symbol_ = new Symbol() |
| void impulse::runAllTests | ( | ) |
| char impulse::spaces = " " |
| int impulse::indent = 0 |
| Value impulse::_nil_ = new Nil() |
| Value impulse::_Float_ = new Float() |
| Value impulse::_LitNum_ = new Float() |
| Value impulse::_Object_ = new Object() |
| Value impulse::_Symbol_ = new Symbol() |


In this tutorial we'll create a simple client that will compute the average size of basic blocks executed (in instructions) weighted by their execution frequency. We start with an empty DynamoRIO client.
#include "dr_api.h" DR_EXPORT void dr_init(client_id_t id) { /* empty */ }