Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ngs-docs/2015-may-nonmodel
Browse files Browse the repository at this point in the history
  • Loading branch information
ctb committed May 5, 2015
2 parents f26f5e6 + b59c9dd commit f8c6898
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 10 deletions.
Binary file added files/nema-edgeR-MA-plot.pdf
Binary file not shown.
Binary file added files/nema-edgeR-MDS.pdf
Binary file not shown.
29 changes: 29 additions & 0 deletions files/nema-edgeR.csv
@@ -0,0 +1,29 @@
"","logFC","logCPM","PValue","FDR"
"bundle_24",14.4729865179274,14.0299655757247,0.0302768626331507,0.847752153728219
"bundle_14",14.3464326761289,13.9039028346367,0.135488882562265,0.97264654246365
"bundle_27",-14.835869975884,14.3855931200707,0.144032683440994,0.97264654246365
"bundle_6",-14.234747239784,13.7835637435361,0.1581542204802,0.97264654246365
"bundle_5",11.0308618861615,14.018246336949,0.173686882582795,0.97264654246365
"bundle_8",13.2389265954586,16.2330381121375,0.306793870709584,1
"bundle_22",4.92287402954956,14.2393137971876,0.364458605983172,1
"bundle_1",-13.114990166072,12.6612296126701,0.369505991953791,1
"bundle_28",13.6254547854307,13.1868220173904,0.375615420683723,1
"bundle_13",-12.944675454604,12.4903544274141,0.378965316886638,1
"bundle_23",-6.2476786518982,15.20690780882,0.473710745753074,1
"bundle_11",12.9902791292564,12.5573126885887,0.476566503088613,1
"bundle_19",-7.34869563086617,9.01866160303159,0.585280610438655,1
"bundle_7",3.23348934067089,16.5425410560567,0.761629729699292,1
"bundle_18",-2.82430936476491,15.8390278005958,0.77942357032803,1
"bundle_26",-2.23613040685778,15.0839706203438,0.807619040809705,1
"bundle_16",-1.78336002747876,14.6421497843144,0.821892297433184,1
"bundle_2",-2.32973095820576,15.084597220235,0.831172050806527,1
"bundle_17",-1.87296979236501,16.8623784531514,0.879655950617142,1
"bundle_20",1.96685179915843,16.568435477304,0.890960240896915,1
"bundle_9",1.27424954712777,9.55864505509543,0.895901240884305,1
"bundle_4",-0.920290080437448,14.301978044377,0.8998044456292,1
"bundle_10",-0.503825146423093,14.6020477994112,0.931891623925841,1
"bundle_3",0.773290725766433,15.2953925724507,0.946094431703242,1
"bundle_21",-0.553540063999796,17.5421659859617,0.959892407057648,1
"bundle_25",-0.0395510538641514,13.5191171788508,0.99751132871367,1
"bundle_12",0,4.55115823757055,1,1
"bundle_15",0,4.55115823757055,1,1
31 changes: 21 additions & 10 deletions quantification.rst
Expand Up @@ -101,20 +101,23 @@ We'll be using `edgeR
to do the basic differential expression analysis of our counts.

To run edgeR, you need to write a data loading and manipulation script
in R. In this case, I've provided one -- `chick.R
<https://github.com/ngs-docs/2015-mar-semimodel/blob/master/files/chick.R>`__.
in R. In this case, I've provided one -- `diff_exp.R
<https://github.com/ngs-docs/2015-may-nonmodel/blob/master/files/diff_exp.R>`__.
This script will load in two samples with two replicates, execute an
MA plot, do an MDS analysis/plot, and provide a spreadsheet with
differential expression information in it. To download it, `click
here
<http://2015-mar-semimodel.readthedocs.org/en/latest/_static/chick.R>`__.
differential expression information in it.

Links:

* `False Discovery Rate <http://en.wikipedia.org/wiki/False_discovery_rate>`__
* `Learn R with Swirl <http://swirlstats.com/>`__

edgeR prefers its counts in a slightly different format than eXpress uses. I've provided a short python script to the conversion for you::
So, download the script::

cd /mnt/work
curl -O http://2015-may-nonmodel.readthedocs.org/en/latest/_static/diff_exp.R

edgeR prefers its counts in a slightly different format than eXpress uses. I've provided a short python script to the conversion for you, which we'll run before we run the script we just downloaded::

cd /mnt/work
curl -O http://2015-may-nonmodel.readthedocs.org/en/latest/_static/merge.py
Expand All @@ -123,9 +126,17 @@ edgeR prefers its counts in a slightly different format than eXpress uses. I've
python merge.py 6Hour_repl1_counts.txt > 6Hour_repl1_counts.txt.merged
python merge.py 6Hour_repl2_counts.txt > 6Hour_repl2_counts.txt.merged

So, download the script::

cd /mnt/work
curl -O http://2015-may-nonmodel.readthedocs.org/en/latest/_static/diff_exp.R
Now we run the differential expression script with::

Rscript diff_exp.R

This will produce three files, `nema-edgeR-MA-plot.pdf
<http://2015-may-nonmodel.readthedocs.org/en/latest/_static/nema-edgeR-MA-plot.pdf>`__,
`nema-edgeR-MDS.pdf
<http://2015-may-nonmodel.readthedocs.org/en/latest/_static/nema-edgeR-MDS.pdf>`__,
and `nema-edgeR.csv
<http://2015-may-nonmodel.readthedocs.org/en/latest/_static/nema-edgeR.csv>`__. The CSV file can be opened directly in Excel; you can
also look at it `here
<https://raw.githubusercontent.com/ngs-docs/2015-may-nonmodel/master/files/chick-subset/chick-edgeR.csv>`__.
It consists of five columns: gene name, log fold change, P-value, and
FDR-adjusted P-value.

0 comments on commit f8c6898

Please sign in to comment.