-
Notifications
You must be signed in to change notification settings - Fork 66
/
INSTALL
150 lines (93 loc) · 3.81 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
Building, Installing and Running CNVnator
=========================================
Requirements
============
Building CNVnator requires at least the following:
GNU make
C compiler (e.g. gcc or clang)
CERN ROOT (https://root.cern.ch)
samtools with HTSlib
GNU readline library
You must install ROOT package and set up $ROOTSYS variable (see ROOT documentation
https://root.cern.ch/root/html534/guides/users-guide/GettingStarted.html).
Download last samtools release https://github.com/samtools/samtools/releases and
compile samtools and HTSlib.
GNU readline library is required. You can install it using following commands:
yum install readline-devel # RPM-based systems
apt-get install libreadline-dev # Debian-based systems
or follow instructions: https://tiswww.case.edu/php/chet/readline/rltop.html
Building
========
Download last CNVnator release v0.4.1:
https://github.com/abyzovlab/CNVnator/releases/download/v0.4.1/CNVnator_v0.4.1.zip
Unzip and compile:
unzip CNVnator_v0.4.1.zip
cd CNVnator_v0.4.1
cd src
ln -s <path_to_samtools_dir> samtools
make OMP=no # without parallel support
or
make # with parallel suport
or
make LIBS="-lcrypto" # if you got compilation time error related to undifined libcrypto reference.
Installing
==========
Add CNVnator_v0.4.1/src folder to $PATH by adding following line to .bash_profile:
export PATH=<path_to_CNVnator_v0.4.1>/src:$PATH
or create symbolic links in folder that is already in $PATH (e.g. ~/bin/):
cd <local_bin_folder>
ln -s <path_to_CNVnator_v0.4.1>/src/cnvnator
ln -s <path_to_CNVnator_v0.4.1>/src/plotcircular.py
ln -s <path_to_CNVnator_v0.4.1>/src/plotrdbaf.py
ln -s <path_to_CNVnator_v0.4.1>/src/plotbaf.py
ln -s <path_to_CNVnator_v0.4.1>/src/pytools
Running
=======
* Extract read mapping:
cnvnator -root file.root -tree file.bam
or
cnvnator -root file.root -tree file.bam -chrom $(seq 1 22) X Y
or
cnvnator -root file.root -tree file.bam -chrom $(seq -f "chr%g" 1 22) chrX chrY
* Generate histogram:
cnvnator -root file.root -his 1000 -fasta reference_genome.fasta.gz
* Calculate statistics
cnvnator -root file.root -stat 1000
* Partition
cnvnator -root file.root -partition 1000
* Call CNVs
cnvnator -root file.root -call 1000
* Import SNP data
cnvnator -root file.root -vcf file.vcf.gz
* Import mask data
cnvnator -root file.root -mask mask.fa.gz
For hg19 reference genome mask file is provaded with CNVnator:
CNVnator_v0.4.1/ExampleData/20141020.strict_mask.whole_genome.fasta.gz
* Generate SNP histograms
cnvnator -root file.root -baf 10000
* List root file content
cnvnator -root file.root -ls
* Copy RD and SNP data to new root file
cnvnator -root file.root -cptrees new_file.root
* Genotype genomic regions - interactive mode
cnvnator -root file.root -genotype bin_size
* Ploting - interactive mode
cnvnator -root file.root -view 1000
* Ploting RD and BAF whole genome circular plots using python tool:
plotcircular.py file.root
all options:
plotcircular.py [-chrom CHROMOSOMES] [-bs BINSIZE] [-o SAVE_FILE]
[-t TITLE] [-rdbs RDBINSIZE] [-pbs PLOTBINSIZE]
[-nomask] [-useid] root_file
* Ploting RD and BAF signal over genomic region using python tool:
plotrdbaf.py file.root 15:1000000-5000000
all options:
plotrdbaf.py [-h] [-bs BINSIZE] [-rdbs RDBINSIZE] [-res RESOLUTION]
[-o SAVE_FILE] [-t TITLE] [-nomask] [-useid]
root_file region
* Ploting BAF signal over genomic region using python tool:
plotbaf.py file.root 15:1000000-5000000
all options:
plotbaf.py [-h] [-bs BINSIZE] [-rdbs RDBINSIZE] [-res RESOLUTION]
[-o SAVE_FILE] [-t TITLE] [-nomask] [-useid]
root_file region