Skip to content

Walkthrough Example

Anthony edited this page Apr 28, 2014 · 20 revisions

This page is now deprecated!

This is a walkthrough of some scripts you would run to analyze DNA methylation data using a down syndrome project as an example. Everything can be run on the command line. The walkthrough will allow you to do several things:

Step 1: Import data in methylumi object to mongoDB.

If our methylumi object is stored in an .RData run the command: python ReadRObject.py "~/Down/down_methylumiobject.RData" "~/Outputs/Down/"

This will give us the files down_betas.txt, down_expression.txt and down_pData.txt.

Details found here.

Step 2A: Import HumanMethylation450 array annotations to mongoDB.

With a methyl450k annotation textfile, run the command: python InsertProbeAnnotation.py ~/Annotations/methyl450array_annotation_from_magda.txt

When asked 'Are you inserting illumina 450k methylation data? (y/n): ' enter y.

Details found here.

Step 2B: Import GoldenGate array annotations to mongoDB

With a goldengate annotation textfile, run the command: python InsertProbeAnnotation.py ~/Annotations/golden_gate_probe_info.txt

Enter the following when prompted:

  • 'Are you inserting illumina 450k methylation data? (y/n): ' enter n.
  • 'What is the column name of your chromosome values in the .txt file? (exact match): ' enter Chromosome.
  • 'What do you want the id prefix to be? (tip: use arraytype such as golden_gate): ' enter goldengate_array
  • 'What do you want the id prefix to be? (tip: use arraytype such as golden_gate): ' enter cg_no

Details found here.

Step 3: Import beta and expression values into mongoDB.

With the directory containing down_betas.txt and down_expression.txt, run the command: python MethylDataMaker.py ~/Down/

Details found here.

Step 4: Update imported beta and expression values with HumanMethylation450 array annotations.

Knowing our DNA methylation data is in collection 'methylation' and annotation data is in collection' annotations', run the command: python UpdateMethylData.py methylation annotations

When prompted with message, 'Enter project name to add to each un-updated document in collection: ', enter down.

Details found here.

Step 5: Import sample information into mongoDB

With the down pData containing sample information, run the command: python InsertSampleInfo.py /Down/down_pData.txt

When prompted with 'Inserting kollman or down?: ' enter down

When prompted with _'Insert column name that indicates the sample label or ID: ' enter SampleID

Details found here.

Step 6: Plot beta differences between down and controls across chromosomes 21 and 22.

With all the annotations, annotated methylation data and meta data, run the command:

python WalkAlongChromosome.py

When prompted with 'Look at down or kollman project? ' enter down

When prompted with 'Enter chromosome (1, 2, X, Y...): ' enter 21.

Wait a little bit... (around 30 seconds to 5 minutes)

When prompted again with 'Enter chromosome (1, 2, X, Y...): ' enter 22.

A plot of DNA methylation differences between downs and controls will pop up.

Details found here.

Step 7: Find differentially methylated probes.

Run the command:

python TTestingProbes.py

Wait a little bit more... (5 to 10 minutes)

Plots will be automatically saved in the folder '/home/jyeung/Documents/Presentations/batchplots/'

Details found here.

Step 8: Predict blood fraction in samples.

Run the command:

python GetSamplesFromProbes.py

When prompted 'Take top significant differentially methylated probes or bottom? (top/bottom/random): ' enter top.

First plot showing prediction using 4 probes will pop up. Close/save this to continue code.

Second plot showing aggregated summary will pop up. Close/save this to continue code.

Third plot showing beta values across 21 probes will pop up. Close/save this to end code.

Details found here.

Clone this wiki locally