Skip to content

Workflow: Analysis of BSMAP data

sr320 edited this page May 24, 2013 · 9 revisions

This workflow outlines analysis of data from mapping bisulfite treated DNA (BS-seq) to the oyster genome.

Initially sequencing reads, in this case from oyster sperm, are mapped to the genome using BS-MAP.

./bsmap -a /Volumes/betty/filtered_174gm_A_NoIndex_L006_R1.fastq.gz -b /Volumes/betty/filtered_174gm_A_NoIndex_L006_R2.fastq.gz -d /Volumes/betty/oyster_v9.fa -o /Volumes/betty/BiGO_Betty_plain.sam -p 4

output:
Total number of aligned reads:
pairs: 90102067 (53%)
single a: 17033002 (9.9%)
single b: 15975991 (9.3%)

http://eagle.fish.washington.edu/cnidarian/BiGO_Betty_plain.sam

Resulting SAM file then subjected to methratio python script

python methratio.py -d /Volumes/betty/oyster_v9.fa -u -z -g -o  /Volumes/betty/BiGO_betty_plain_methratio_v1.txt -s /Volumes/Bay3/Software/BSMAP/bsmap-2.73/samtools /Volumes/betty/BiGO_Betty_plain.sam

output:
total 167774088 valid mappings, 127192776 covered cytosines, average coverage: 13.23 fold.

http://eagle.fish.washington.edu/cnidarian/BiGO_betty_plain_methratio_v1.txt

This file was uploaded to SQLShare using python script

python singleupload.py sr320@washington.edu c8APIKEYAPIKEYAPIKEY5c15c /Volumes/web/cnidarian/BiGO_betty_plain_methratio_v1.txt

Screenshot%205/24/13%2010:34%20AM

directlink: https://sqlshare.escience.washington.edu/sqlshare#s=query/sr320%40washington.edu/BiGO_betty_plain_methratio_v1.txt


Interested in is how many CpG loci is there information for?

The following query will get all lines where CG are in the 3rd and 4th position.

SELECT * FROM [sr320@washington.edu].[BiGO_betty_plain_methratio_v1.txt]​ betty where context like '__CG_'​​​​​​​​​​​​​ --_=single character wildcard​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​

<img src="https://www.evernote.com/shard/s10/sh/ea1d91af-c92b-4461-a979-c357dce141ff/285518308334e0dfb6eed38f1eb2902e/deep/0/Screenshot%205/24/13%2010:45%20AM.png" width = "60%" "alt="Screenshot%205/24/13%2010:45%20AM" />


To count the number of instances in this query


How to convert methratio file to gff format

In this case will make GFF only of CpGs, where there is at least 10x coverage.

more soon

Clone this wiki locally