cd /mnt/d/001poppy_atac_new_genome
conda activate circos
cd /mnt/d/001poppy_atac_new_genome/ATAC_peak
mkdir -p my_first_circos && cd my_first_circos
vim poppy_atac.txt
chr - chr1 chr1 0 253956107 grey
chr - chr2 chr2 0 328069000 grey
chr - chr3 chr3 0 297363500 grey
chr - chr4 chr4 0 173483500 grey
chr - chr5 chr5 0 250439107 grey
chr - chr6 chr6 0 186956000 grey
chr - chr7 chr7 0 249601500 grey
chr - chr8 chr8 0 211634000 grey
chr - chr9 chr9 0 180954015 grey
chr - chr10 chr10 0 201134000 grey
chr - chr11 chr11 0 172472893 grey
grep '[[:blank:]]gene[[:blank:]]' Papaver_somniferum.gene.gff3 | cut -f 1,4,5 | awk '{print $1"\t"$2"\t"$3}' > genes.bed
cut -d ' ' -f 3,6 poppy_atac.txt | tr ' ' '\t' > poppy.genome
bedtools makewindows -g poppy.genome -w 2000000 > poppy.windows
bedtools coverage -a poppy.windows -b genes.bed | cut -f 1-4 > genes_num.txt
# guo is capsule, hua is petal, jing is stem, ye is leaf, xugen is fine root, zhugen is tap root
bedtools coverage -a poppy.windows -b ATAC_seq_GUO.narrowPeak | cut -f 1-4 > guo_atac.txt
bedtools coverage -a poppy.windows -b ATAC_seq_HUA.narrowPeak | cut -f 1-4 > hua_atac.txt
bedtools coverage -a poppy.windows -b ATAC_seq_JING.narrowPeak | cut -f 1-4 > jing_atac.txt
bedtools coverage -a poppy.windows -b ATAC_seq_YE.narrowPeak | cut -f 1-4 > ye_atac.txt
bedtools coverage -a poppy.windows -b ATAC_seq_XUGEN.narrowPeak | cut -f 1-4 > xugen_atac.txt
bedtools coverage -a poppy.windows -b ATAC_seq_ZHUGEN.narrowPeak | cut -f 1-4 > zhugen_atac.txt
touch circos.conf
vim circos.conf
karyotype = poppy_atac.txt
<ideogram>
<spacing>
default = 0.005r
</spacing>
radius = 0.90r
thickness = 20p
fill = yes
stroke_color = dgrey
stroke_thickness = 2p
show_label = yes
label_font = default
label_radius = dims(ideogram,radius) + 0.2r
label_size = 30
label_parallel = yes
label_format = eval(sprintf("%s",var(chr)))
</ideogram>
<image>
dir* = .
radius* = 550p
svg* = yes
<<include etc/image.conf>>
</image>
chromosomes_units = 5000000
show_ticks = yes
show_tick_labels = yes
<ticks>
radius = 1r
color = black
thickness = 2p
multiplier = 1e-6
format = %d
<tick>
spacing = 1u
size = 5p
</tick>
<tick>
spacing = 5u
size = 10p
show_label = yes
label_size = 25p
label_offset = 10p
format = %d
</tick>
</ticks>
<plots>
<plot>
type = heatmap
file = genes_num.txt
color = blues-9-seq
r1 = 0.99r
r0 = 0.90r
</plot>
<plot>
type = histogram
file = guo_atac.txt
fill_color = set3-12-qual-4
color = set3-12-qual-4
r1 = 0.89r
r0 = 0.80r
</plot>
<plot>
type = histogram
file = hua_atac.txt
fill_color = set3-12-qual-8
color = set3-12-qual-8
r1 = 0.79r
r0 = 0.70r
</plot>
<plot>
type = histogram
file = jing_atac.txt
fill_color = set3-12-qual-7
color = set3-12-qual-7
r1 = 0.69r
r0 = 0.60r
</plot>
<plot>
type = histogram
file = ye_atac.txt
fill_color = set3-12-qual-11
color = set3-12-qual-11
r1 = 0.59r
r0 = 0.50r
</plot>
<plot>
type = histogram
file = zhugen_atac.txt
fill_color = set3-12-qual-5
color = set3-12-qual-5
r1 = 0.49r
r0 = 0.40r
</plot>
<plot>
type = histogram
file = xugen_atac.txt
fill_color = set3-12-qual-9
color = set3-12-qual-9
r1 = 0.39r
r0 = 0.30r
</plot>
</plots>
<<include etc/colors_fonts_patterns.conf>>
<<include etc/housekeeping.conf>>
conda activate circos
circos -conf circos.conf