-
Notifications
You must be signed in to change notification settings - Fork 1
Walkthrough Example
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: Take a methylumi object (contains betas, M-values and meta data) stored in a .RData file and import the data into mongoDB.
- Step 2A/B: Import annotation data for Infinium HumanMethylation450 array and GoldenGate array.
- Step 3: Import DNA methylation data into mongoDB.
- Step 4: Update DNA methylation data with array annotations.
- Step 5: Import sample information into mongoDB.
- Step 6: Analyze DNA methylation differences between diseased and control across two chromosomes (selected by user).
- Step 7: Find differentially methylated probes using a two-sample t-test.
- Step 8: Predict fraction of blood in buccal samples.
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.
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.
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.
With the directory containing down_betas.txt and down_expression.txt, run the command:
python MethylDataMaker.py ~/Down/
Details found here.
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.
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.
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.
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.
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.