bicycle bicycle

Quick start

This quick start tutorial shows you how to perform a simple bicycle analysis using simulated sample data. This quick start uses the bicycle docker image, so make sure that you have docker already installed in your computer.

These steps are also available in this bash script.

A version of this quick start tutorial for Windows users is also available here.

For an advanced example where differential methylation is analyzed, see this case study.

Timing: ≈ 7 minutes
Equipment: Ubuntu 14.04.3 LTS, 4 cores (Intel(R) Core(TM) i5 @ 2.20GHz), 16GB of RAM and SSD disk.

1. Declare a variable with the bicycle command

Run the following instruction in order to define the bicycle command under docker. Your current working directory (pwd) will be seen insice docker as /data:
alias bicycle="docker run --rm -v `pwd`/data:/data -u `id -u \`whoami\`` -it singgroup/bicycle bicycle"

2. Download the sample data

wget https://sing.ei.uvigo.es/bicycle/downloads/sample-data.zip
unzip sample-data.zip -d data

3. Create a project

bicycle create-project -p data/myproject -r data/ref_genomes -f data/reads

4. Create the Watson and Crick in-silico bisulfited reference genomes

bicycle reference-bisulfitation -p data/myproject

5. Create the bisulfited reference genome indexes

bicycle reference-index -p data/myproject -t 4

6. Align reads to both references

bicycle align -p data/myproject -t 4

7. Perform methylation analysis and methylcytosine calling

bicycle analyze-methylation -p data/myproject -n 4 -a -e from_control_genome=Ecoli

8. Check the results

You are finished! You can explore the summary output file ./data/myproject/output/sample-1_mm9_chr1_reduced_plus_Ecoli.fa.summary (in bold there are the detected errors in Ecoli and the methylation level, as expected from simulated data)
	====METHYLATION RESULTS=======================================================
	File: sample-1_mm9_chr1_reduced_plus_Ecoli.fa.summary
	Date: Tue May 30 13:50:30 CEST 2017

	====ANALYSIS PARAMETERS=======================================================
	Correct non-CG: true
	Filters:
	remove ambiguous reads: true
	remove non-correctly bisulfite-converted reads: true
	trim to 'x' mismatch: true x=4
	remove clonal reads: false
	FDR threshold: 0.01

	====ERROR ESTIMATION AND SIGNIFICANCE ADJUSTMENTS=============================
	Error rates (from control genome: Ecoli):
	  WATSON={CG=9.686509334272632E-4 (1265/1305940), CHG=0.0010630211982115276 (1179/1109103), CHH=0.0010214901652048762 (2076/2032325)}
	CRICK={CG=0.0010030059599348046 (1312/1308068), CHG=0.001042832963281255 (1154/1106601), CHH=9.824304531497866E-4 (1970/2005231)}

	p-value cutoffs: {WATSON={CHH=9.515226330187381E-5, CG=0.01494593925387917, CHG=9.853761678579196E-5}, CRICK={CHH=9.471328057717618E-5, CG=0.01481125092524056, CHG=9.836380454616681E-5}}

	====METHYLATION ANALYSIS RESULTS==============================================
	---- GLOBAL --------
	Called methylcytosines (pval<cutoff)
	total: 108033/3898156 (0.027713872918374738)
	per context called methylcytosines:  CG:0.6686382864495108 CHG:0.0720890838910333 CHH:0.2592726296594559
	CG called methylcytosines: 72235/120785 (0.5980461149977232)
	CHG called methylcytosines: 7788/798844 (0.009749087431338285)
	CHH called methylcytosines: 28010/2978527 (0.009403977200811004)
	Methylation Levels:
	 CG: 107826/364342 (0.2959472144303978)
	CHG: 118475/2427700 (0.048801334596531694)
	CHH: 436883/9009617 (0.048490740505395515)
	non-CG corrections: 0

	... (more)