Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

week04 HW #120

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion weeks/week01/7_tf_binding_promoters.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1301,4 +1301,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}
23 changes: 19 additions & 4 deletions weeks/week02/homework2.ipynb

Large diffs are not rendered by default.

196 changes: 117 additions & 79 deletions weeks/week03/02_Mann_Whitney.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -549,21 +549,11 @@
},
{
"cell_type": "code",
"execution_count": 41,
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"The following objects are masked from ad13b (pos = 5):\n",
"\n",
" cohort.f2, id.f2, normal.f2, nxf1.f2, raw.f2\n",
"\n"
]
},
{
"data": {
"text/html": [
Expand Down Expand Up @@ -597,7 +587,7 @@
"[1] \"id.f2\" \"nxf1.f2\" \"raw.f2\" \"normal.f2\" \"cohort.f2\""
]
},
"execution_count": 41,
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -617,22 +607,28 @@
},
{
"cell_type": "code",
"execution_count": 42,
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"ename": "ERROR",
"evalue": "Error in stopifnot(is.numeric(x)): object 'normal' not found\n",
"output_type": "error",
"traceback": [
"Error in stopifnot(is.numeric(x)): object 'normal' not found\n"
]
"data": {
"text/plain": [
"\n",
"\tShapiro-Wilk normality test\n",
"\n",
"data: normal.f2[1:6]\n",
"W = 0.63073, p-value = 0.001059\n"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"shapiro.test(normal[1:6])"
"shapiro.test(normal.f2[1:6])"
]
},
{
Expand All @@ -644,22 +640,28 @@
},
{
"cell_type": "code",
"execution_count": 43,
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"ename": "ERROR",
"evalue": "Error in stopifnot(is.numeric(x)): object 'normal' not found\n",
"output_type": "error",
"traceback": [
"Error in stopifnot(is.numeric(x)): object 'normal' not found\n"
]
"data": {
"text/plain": [
"\n",
"\tShapiro-Wilk normality test\n",
"\n",
"data: normal.f2[7:12]\n",
"W = 0.92503, p-value = 0.5423\n"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"shapiro.test(normal[7:12])"
"shapiro.test(normal.f2[7:12])"
]
},
{
Expand All @@ -671,22 +673,29 @@
},
{
"cell_type": "code",
"execution_count": 44,
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"ename": "ERROR",
"evalue": "Error in wilcox.test(normal[1:6], normal[7:12], paired = F, alternative = \"less\"): object 'normal' not found\n",
"output_type": "error",
"traceback": [
"Error in wilcox.test(normal[1:6], normal[7:12], paired = F, alternative = \"less\"): object 'normal' not found\n"
]
"data": {
"text/plain": [
"\n",
"\tWilcoxon rank sum test\n",
"\n",
"data: normal.f2[1:6] and normal.f2[7:12]\n",
"W = 14, p-value = 0.2944\n",
"alternative hypothesis: true location shift is less than 0\n"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"wilcox.test(normal[1:6],normal[7:12],paired=F,alternative=\"less\")"
"wilcox.test(normal.f2[1:6],normal.f2[7:12],paired=F,alternative=\"less\")"
]
},
{
Expand All @@ -698,31 +707,44 @@
},
{
"cell_type": "code",
"execution_count": 45,
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"ename": "ERROR",
"evalue": "Error in eval(expr, envir, enclos): object 'normal' not found\n",
"evalue": "Error in file(con, \"rb\"): cannot open the connection\n",
"output_type": "error",
"traceback": [
"Error in eval(expr, envir, enclos): object 'normal' not found\n"
"Error in file(con, \"rb\"): cannot open the connection\n"
]
},
{
"ename": "ERROR",
"evalue": "Error in eval(expr, envir, enclos): object 'normal' not found\n",
"evalue": "Error in file(con, \"rb\"): cannot open the connection\n",
"output_type": "error",
"traceback": [
"Error in eval(expr, envir, enclos): object 'normal' not found\n"
"Error in file(con, \"rb\"): cannot open the connection\n"
]
},
{
"data": {
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/svg+xml": {
"isolated": true
}
},
"output_type": "display_data"
}
],
"source": [
"plot(normal~nxf1)\n",
"points(normal~nxf1,col=\"darkgreen\")"
"plot(normal.f2~nxf1.f2)\n",
"points(normal.f2~nxf1.f2,col=\"darkgreen\")"
]
},
{
Expand All @@ -734,7 +756,7 @@
},
{
"cell_type": "code",
"execution_count": 46,
"execution_count": 8,
"metadata": {
"collapsed": false
},
Expand All @@ -743,11 +765,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"The following objects are masked from ad13b (pos = 3):\n",
"\n",
" cohort.f2, id.f2, normal.f2, nxf1.f2, raw.f2\n",
"\n",
"The following objects are masked from ad13b (pos = 6):\n",
"The following objects are masked from ad13b:\n",
"\n",
" cohort.f2, id.f2, normal.f2, nxf1.f2, raw.f2\n",
"\n"
Expand Down Expand Up @@ -786,7 +804,7 @@
"[1] \"id.f2\" \"nxf1.f2\" \"raw.f2\" \"normal.f2\" \"cohort.f2\""
]
},
"execution_count": 46,
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -806,7 +824,7 @@
},
{
"cell_type": "code",
"execution_count": 47,
"execution_count": 9,
"metadata": {
"collapsed": false
},
Expand All @@ -821,7 +839,7 @@
"W = 0.70643, p-value = 9.494e-05\n"
]
},
"execution_count": 47,
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -839,7 +857,7 @@
},
{
"cell_type": "code",
"execution_count": 48,
"execution_count": 10,
"metadata": {
"collapsed": false
},
Expand All @@ -854,7 +872,7 @@
"W = 0.62012, p-value = 0.0001587\n"
]
},
"execution_count": 48,
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -940,39 +958,38 @@
},
{
"cell_type": "code",
"execution_count": 51,
"execution_count": 12,
"metadata": {
"collapsed": false
},
"outputs": [
{
"ename": "ERROR",
"evalue": "Error in eval(expr, envir, enclos): object 'normal' not found\n",
"output_type": "error",
"traceback": [
"Error in eval(expr, envir, enclos): object 'normal' not found\n"
]
},
{
"ename": "ERROR",
"evalue": "Error in eval(expr, envir, enclos): object 'normal' not found\n",
"output_type": "error",
"traceback": [
"Error in eval(expr, envir, enclos): object 'normal' not found\n"
"name": "stderr",
"output_type": "stream",
"text": [
"Warning message:\n",
"In wilcox.test.default(grpB, grpC, paired = F, alternative = \"less\"): cannot compute exact p-value with ties"
]
},
{
"ename": "ERROR",
"evalue": "Error in wilcox.test(grpB, grpC, paired = F, alternative = \"less\"): object 'grpB' not found\n",
"output_type": "error",
"traceback": [
"Error in wilcox.test(grpB, grpC, paired = F, alternative = \"less\"): object 'grpB' not found\n"
]
"data": {
"text/plain": [
"\n",
"\tWilcoxon rank sum test with continuity correction\n",
"\n",
"data: grpB and grpC\n",
"W = 124, p-value = 0.00999\n",
"alternative hypothesis: true location shift is less than 0\n"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"grpB<-c(normal.f2[1:18],normal[1:6])\n",
"grpC<-c(normal.f2[19:30],normal[7:12])\n",
"grpB<-c(normal.f2[1:18],normal.f2[1:6])\n",
"grpC<-c(normal.f2[19:30],normal.f2[7:12])\n",
"wilcox.test(grpB,grpC,paired=F,alternative=\"less\")"
]
},
Expand All @@ -985,18 +1002,39 @@
},
{
"cell_type": "code",
"execution_count": 52,
"execution_count": 13,
"metadata": {
"collapsed": false
},
"outputs": [
{
"ename": "ERROR",
"evalue": "Error in boxplot(grpB, grpC): object 'grpB' not found\n",
"evalue": "Error in file(con, \"rb\"): cannot open the connection\n",
"output_type": "error",
"traceback": [
"Error in file(con, \"rb\"): cannot open the connection\n"
]
},
{
"ename": "ERROR",
"evalue": "Error in file(con, \"rb\"): cannot open the connection\n",
"output_type": "error",
"traceback": [
"Error in boxplot(grpB, grpC): object 'grpB' not found\n"
"Error in file(con, \"rb\"): cannot open the connection\n"
]
},
{
"data": {
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/svg+xml": {
"isolated": true
}
},
"output_type": "display_data"
}
],
"source": [
Expand Down
Loading