Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Dec 10, 2018
1 parent 2623888 commit 41e3441
Show file tree
Hide file tree
Showing 36 changed files with 86,659 additions and 40,127 deletions.
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
- you can draw crosslink or sysnteny among features of different tracks<br><br>

### update feture:<br>
#### 2018-12-10:<br>
- add plot depth and pabio read mapping of bam file, as example/out11.svg or out10.svg <br>
#### 2018-11-12:<br>
- rewrite feature.crossing.link.conf so that defined color and opactity or order or anchor position of every pair of links.<br>
- add tracks_reorder to plot tracks by new order, otherwise you must adjust --list file <br>
Expand All @@ -35,15 +37,12 @@
&nbsp;&nbsp;&nbsp;&nbsp;5. embed svg in svg to make heatmap or scatter or line or histogram more easy to product, like example/out.svg*svg or \<foreignObject\> <br> <br>


#### denpence <br>
```
perl
Bio::DB::Sam ( install with cpan)
```
<br>



![gene cluster image](example/out11.svg)
<br><br><br>
![gene cluster image](example/out10.svg)
<br><br><br>
![gene cluster image](example/out.svg)
<br><br><br>
![gene cluster image](example/out2.svg)
Expand All @@ -52,8 +51,6 @@ Bio::DB::Sam ( install with cpan)
<br><br>
![gene cluster image](example/out3.2.svg)
<br><br>
![gene cluster image](example/out10.svg)
<br><br><br>
![gene cluster image](example/out6.svg)
<br><br><br>
![gene cluster image](example/out8.svg)
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file added example/chr14.gff
Empty file.
2,108 changes: 2,108 additions & 0 deletions example/chr14.read_mapping.gff

Large diffs are not rendered by default.

19,120 changes: 19,120 additions & 0 deletions example/chr14.read_mapping.setting.conf

Large diffs are not rendered by default.

36,494 changes: 17,844 additions & 18,650 deletions example/feature.color.label.conf10.new

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions example/feature.color.label.conf11
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

19,121 changes: 19,121 additions & 0 deletions example/feature.color.label.conf11.new

Large diffs are not rendered by default.

398 changes: 398 additions & 0 deletions example/feature.crossing.link.conf10

Large diffs are not rendered by default.

360 changes: 0 additions & 360 deletions example/feature.crossing.link.conf9.new

Large diffs are not rendered by default.

8 changes: 2 additions & 6 deletions example/list6
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
s1.s1000 s1.gff s1.seq s1000 1 2000
s1.s10000.0-2k s1.gff s1.seq s10000 1 2000
s1 s1.gff s1.seq s1 1+1 3000+50 s1 3000 6000+10 s1 6000-20 10000 s1000 2000 6000 s10000 2000 6000 s10000 6000 10000
s2 s2.gff s2.seq s2 1 9000 s2000 2000 6000 s20000 2000 6000 s20000 6000 10000
s3 s3.gff s3.seq s3 1+10 5000+100 s3 3000 6000 s3 6000 10000 s3000 2000 6000 s30000 2000 6000
s4 s4.gff s4.seq s4000 2000 6000 s40000 1000 8000 s40000 8000 10000
# download chr14.fa from http://hgdownload.cse.ucsc.edu/goldenpath/hg19/chromosomes/chr14.fa.gz
chr14 chr14.gff ../../genomeview/chr14.fa 14 66901400 66901400+1000
1 change: 1 addition & 0 deletions example/list6.new
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
chr14 chr14.gff,chr14.read_mapping.gff ../../genomeview/chr14.fa 14 66901400 66901400+1000
30 changes: 15 additions & 15 deletions example/main.10.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# output figure size
svg_width_height = 1500,1200 # *
svg_width_height = 1500,500 # *
pdf_dpi = 100
svg_background_color = white #background color of whole figure

Expand All @@ -21,13 +21,13 @@ feature_label_color=black
feature_shift_y=0 # unit is feature_shift_y_unit
feature_shift_y_unit=backbone # backbone or radius or percent, backbone is genome_height_ratio
feature_shift_x=0 # unit is bp
feature_height_ratio= 1 # defined feature height
feature_height_ratio=3 # defined feature height
track_style= fill:blue;opacity:0.2 # fill:blue;stroke:pink;stroke-width:5;fill-opacity:0.1;stroke-opacity:0.9
feature_color=rgb(50,205,50)
feature_border_size=0
feature_border_color=black
genome_height_ratio=0.2 # mean genome height extend ratio
feature_arrow_sharp_extent=0 # bigger mean sharper arrow
genome_height_ratio=1 # mean genome height extend ratio
feature_arrow_sharp_extent=1 # bigger mean sharper arrow
# order for display
track_order=1
feature_order=2
Expand Down Expand Up @@ -80,7 +80,7 @@ legend_stroke_color=black
legend_stroke_width=0.5

# crossling among features
crossing_link = feature.crossing.link.conf9.new
crossing_link = feature.crossing.link.conf10
cross_link_color = #FF8C00
cross_link_opacity = 1
cross_link_anchor_pos = low_up # up,medium,low
Expand Down Expand Up @@ -118,21 +118,21 @@ scale_tick_fontsize=13
#$sample,$scf,$block_flag,$window_size,$depth_file,$yaxis,$ytick_flag,$yaxis_show,$ytick_label,$hgrid_flag,$tick_color,$tick_opacity,$tick_border,$label_size


plot_depth = hist,1,s3,s3,1,100,s3.s3.depth.txt,5->55,ytick_flag,20->30->2,ytick_label_text,hgrid_flag,green:black,1:0.5,0.3:0.3,3:3 highlight_hgrid->26:2:green,28:2:black highlight_columns->0:20:green:0.7,20:100:black:0.5 start_end_xaxis->111:511,711:1111,1211:1911
plot_depth = hist,1,s3,s3,1,100,s3.s3.depth.txt,65->95,ytick_flag,20->30->2,ytick_label_text,hgrid_flag,green:black,1:0.5,0.3:0.3,2:2
plot_depth = hist,1,s3,s3,2,100,s3.s3.depth.txt,15->70,ytick_flag,20->30->2,ytick_label_text,hgrid_flag,green:green,0.6:0.3,0.3:0.3,3:3
plot_depth = hist,1,s3,s3,1,100,s3.s3.depth.txt,5->55,ytick_flag,20->30->2,ytick_label_text,hgrid_flag,green:black,1:0.5,5:5:2:0.2,3:3 highlight_hgrid->26:2:green,28:2:black highlight_columns->0:20:green:0.7,20:100:black:0.5 start_end_xaxis->111:511,711:1111,1211:1911
plot_depth = hist,1,s3,s3,1,100,s3.s3.depth.txt,65->95,ytick_flag,20->30->2,ytick_label_text,hgrid_flag,green:black,1:0.5,5:5:2:0.2,2:2
plot_depth = hist,1,s3,s3,2,100,s3.s3.depth.txt,15->70,ytick_flag,20->30->2,ytick_label_text,hgrid_flag,green:green,0.6:0.3,5:5:2:0.2,3:3

plot_depth = scatter,1,s3,s3,3,50,s3.s3.depth.txt,5->50,ytick_flag,20->30->2,ytick_label_text,hgrid_flag,black:green,1:0.3,0.3:0.3,3:3
plot_depth = scatter_line,1,s3,s3,3,50,s3.s3.depth.txt,5->50,ytick_flag,20->30->2,ytick_label_text,hgrid_flag,black:green,1:0.3,0.3:0.3,3:3
plot_depth = hist,1,s3,s3,3,50,s3.s3.depth.txt,55->90,ytick_flag,10->30->4,ytick_label_text,hgrid_flag,black:green,1:0.3,0.3:0.3,3:3
plot_depth = scatter,1,s3,s3,3,50,s3.s3.depth.txt,5->50,ytick_flag,20->30->2,ytick_label_text,hgrid_flag,black:green,1:0.3,5:5:2:0.2,3:3
plot_depth = scatter_line,1,s3,s3,3,50,s3.s3.depth.txt,5->50,ytick_flag,20->30->2,ytick_label_text,hgrid_flag,black:green,1:0.3,5:5:2:0.2,3:3
plot_depth = hist,1,s3,s3,3,50,s3.s3.depth.txt,55->90,ytick_flag,10->30->4,ytick_label_text,hgrid_flag,black:green,1:0.3,5:5:2:0.2,3:3

#plot_depth = hist,1,s3,s3,3,50,s3.s3.depth.txt,-55->-90,ytick_flag,10->30->4,ytick_label_text,hgrid_flag,black:green,1:0.3,0.3:0.3,3:3

plot_depth = hist,1,s2,s2,1,50,../data/s2.seq.sam.sorted.bam,15->80,ytick_flag,10->120->10,ytick_label_text,hgrid_flag,black:green,1:0.3,0.3:0.3,3:3
plot_depth = hist,1,s2,s2,1,50,../data/s2.seq.sam.sorted.bam,15->80,ytick_flag,10->120->10,ytick_label_text,hgrid_flag,black:green,1:0.3,5:5:2:0.2,3:3

reads_mapping=long_reads,1,s2,s2000,0,../data/s2.seq.longreads.map2ref.sort.bam,rainbow_or_hline,55->85,ytick_flag,20->30->2,ytick_label_text,hgrid_flag,green:black,1:0.5,0.3:0.3,3:3 start_end_xaxis->3000:4000,4500:5500
reads_mapping=long_reads,1,s2,s2000,0,../data/s2.seq.longreads.map2ref.sort.bam,rainbow_or_hline,20->50,ytick_flag,20->30->2,ytick_label_text,hgrid_flag,green:black,1:0.5,0.3:0.3,3:3 start_end_xaxis->2000:6000
reads_mapping=long_reads,1,s2,s20000,0,../data/s2.seq.longreads.map2ref.sort.bam,rainbow_or_hline,23->80,ytick_flag,20->30->2,ytick_label_text,hgrid_flag,green:black,1:0.5,0.3:0.3,3:3 start_end_xaxis->2000:6000
reads_mapping=long_reads,1,s2,s2000,0,../data/s2.seq.longreads.map2ref.sort.bam,rainbow_or_hline,55->85,ytick_flag,20->30->2,ytick_label_text,hgrid_flag,green:black,1:0.5,5:5:2:0.2,3:3 start_end_xaxis->3000:4000,4500:5500
reads_mapping=long_reads,1,s2,s2000,0,../data/s2.seq.longreads.map2ref.sort.bam,rainbow_or_hline,20->50,ytick_flag,20->30->2,ytick_label_text,hgrid_flag,green:black,1:0.5,5:5:2:0.2,3:3 start_end_xaxis->2000:6000
reads_mapping=long_reads,1,s2,s20000,0,../data/s2.seq.longreads.map2ref.sort.bam,rainbow_or_hline,23->80,ytick_flag,20->30->2,ytick_label_text,hgrid_flag,green:black,1:0.5,5:5:2:0.2,3:3 start_end_xaxis->2000:6000



140 changes: 140 additions & 0 deletions example/main.11.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
# output figure size
svg_width_height = 1000,800 # *
pdf_dpi = 100
svg_background_color = white #background color of whole figure

# plot feature type
feature_keywords = gene,circle,ytick,plot_depth,long_read,xxxxx # *, gene,point,hist,heatmap
feature_setting = feature.color.label.conf11.new # *

# figure width layout
width_ratio_ref_cluster_legend = 0.1-0.75-0.15 # 0.1+0.75+0.15=1




## global setting start, specific setting in feature_setting
feature_shape=arrow # only arrow, rect for figure shape, not support round_rect and circle_point yet
feature_arrow_width_extent=0.3
feature_label_size=10
feature_label_color=black
feature_shift_y=0 # unit is feature_shift_y_unit
feature_shift_y_unit=backbone # backbone or radius or percent, backbone is genome_height_ratio
feature_shift_x=0 # unit is bp
feature_height_ratio=5 # defined feature height
feature_height_unit=percent
track_style= fill:blue;opacity:0.2 # fill:blue;stroke:pink;stroke-width:5;fill-opacity:0.1;stroke-opacity:0.9
feature_color=rgb(50,205,50)
feature_border_size=0
feature_border_color=black
genome_height_ratio=5 # mean genome height extend ratio
feature_arrow_sharp_extent=0 # bigger mean sharper arrow
# order for display
track_order=1
feature_order=2
feature_label_order=4
cross_link_order=0 # bigger mean upper
display_feature=yes # no or yes
# whether dispaly feature label
display_feature_label=no # yes or no or yes,no or no,yes
# feature_label 9 kinds of positon
pos_feature_label=right_low # or medium_low or left_low or right_low or medium_medium or left_medium
# padding between feature and label
# padding between feature and label
padding_feature_label = 0.01 # space between feature and label
# freature label rotate angle
label_rotate_angle=0
feature_label_auto_angle_flag=1 # if auto shift angle
# display or conceal the connect line between same scaffold
connect_with_same_scaffold=no
connect_stroke_dasharray=2,5
connect_stroke_width=2
connect_stroke_color=black
absolute_postion_in_title=yes
## global setting end, specific setting in feature_setting



# if less this, will trigger auto shift feature label
distance_closed_feature=200 # xxbp, if the distancetwo feature is too close, so sparate with shift_angle_closed_feature
shift_angle_closed_feature = 10

# layout
top_bottom_margin = 0.2 # 高度上 top和bottom占的比例,top和bottom可能有scale
space_between_blocks = 500 # bp, mean space of every block in one track
default_legend = other

# new sample name
#sample_name_old2new = sample.name.new.conf
sample_name_color_default = black
sample_name_font_size_default = 15


# legend
display_legend=yes # yes or other
legend_font_size = 20 #legend中文字字体大小
legend_height_ratio = 0.7 # compare with feature height
legend_width_margin = 0.15 # legends左右两侧的margin
legend_height_space = 0.1
legend_width_textpercent = 0.7 # legend内部的文字和arrow的比例,text是0.6则arrow是0.4
legend_stroke_color=black
legend_stroke_width=0.5

# crossling among features
#crossing_link = feature.crossing.link.conf9.new
cross_link_color = #FF8C00
cross_link_opacity = 1
cross_link_anchor_pos = low_up # up,medium,low
ignore_sharp_arrow=no # yes or no
cross_link_orientation_ellipse=up
cross_link_shape=quadrilateral # ellipse or w or quadrilateral or line
cross_link_height_ellipse=10,8 # 10 and 8 is the radius of outter ellipse and inner ellipse



#sort_by_one_feature = sort.feature # every track sort block's position by this feaure list(just only one feature for one track, if one traack not has one feature in this list , mean don't sort block's pos of this track )
#scaffold_order = order.list # if set this, will draw full-length of scaffold in gff, will ignore 4th col to last col of the --list

# scale
scale_display=yes # yes or no
scale_position=low # up or low or up_low
scale_color=green
scale_width=0.5
scale_ratio=100 # bp
scale_padding_y=0.6
scale_tick_opacity=1
scale_tick_height=0.01
scale_order=-1
scale_tick_padding_y=10
scale_tick_fontsize=13


# 3rd column: 0 mean all fragment, otherwise 1 mean 1st fragment in the track
# forth column mean depth window size bp
# bam or dep.txt
# 10 -> 50 or -10 -> -50
# 20->30 is for show
#depth_hist = s2,s2000,0,100,path_map.sort.bam,0->50,ytick_flag,20->30,ytick_label_text,hgrid_flag,black:black,1:0.3,1:0.5
#depth_hist = s2,s2000,0,100,path_map.sort.bam,60->90,ytick_flag,20->30,ytick_label_text,hgrid_flag,green:green,1:0.3,1:0.5
#$sample,$scf,$block_flag,$window_size,$depth_file,$yaxis,$ytick_flag,$yaxis_show,$ytick_label,$hgrid_flag,$tick_color,$tick_opacity,$tick_border,$label_size


#plot_depth = hist,1,s3,s3,1,100,s3.s3.depth.txt,5->55,ytick_flag,20->30->2,ytick_label_text,hgrid_flag,green:black,1:0.5,0.3:0.3,3:3 highlight_hgrid->26:2:green,28:2:black highlight_columns->0:20:green:0.7,20:100:black:0.5 start_end_xaxis->111:511,711:1111,1211:1911
#plot_depth = hist,1,s3,s3,1,100,s3.s3.depth.txt,65->95,ytick_flag,20->30->2,ytick_label_text,hgrid_flag,green:black,1:0.5,0.3:0.3,2:2
#plot_depth = hist,1,s3,s3,2,100,s3.s3.depth.txt,15->70,ytick_flag,20->30->2,ytick_label_text,hgrid_flag,green:green,0.6:0.3,0.3:0.3,3:3

#plot_depth = scatter,1,s3,s3,3,50,s3.s3.depth.txt,5->50,ytick_flag,20->30->2,ytick_label_text,hgrid_flag,black:green,1:0.3,0.3:0.3,3:3
#plot_depth = scatter_line,1,s3,s3,3,50,s3.s3.depth.txt,5->50,ytick_flag,20->30->2,ytick_label_text,hgrid_flag,black:green,1:0.3,0.3:0.3,3:3
#plot_depth = hist,1,s3,s3,3,50,s3.s3.depth.txt,55->90,ytick_flag,10->30->4,ytick_label_text,hgrid_flag,black:green,1:0.3,0.3:0.3,3:3

#plot_depth = hist,1,s3,s3,3,50,s3.s3.depth.txt,-55->-90,ytick_flag,10->30->4,ytick_label_text,hgrid_flag,black:green,1:0.3,0.3:0.3,3:3

#plot_depth = hist,1,s2,s2,1,50,../data/s2.seq.sam.sorted.bam,15->80,ytick_flag,10->120->10,ytick_label_text,hgrid_flag,black:green,1:0.3,0.3:0.3,3:3

#reads_mapping=long_reads,1,s2,s2000,0,../data/s2.seq.longreads.map2ref.sort.bam,rainbow_or_hline,55->85,ytick_flag,20->30->2,ytick_label_text,hgrid_flag,green:black,1:0.5,0.3:0.3,3:3 start_end_xaxis->3000:4000,4500:5500
#reads_mapping=long_reads,1,s2,s2000,0,../data/s2.seq.longreads.map2ref.sort.bam,rainbow_or_hline,20->50,ytick_flag,20->30->2,ytick_label_text,hgrid_flag,green:black,1:0.5,0.3:0.3,3:3 start_end_xaxis->2000:6000
#reads_mapping=long_reads,1,s2,s20000,0,../data/s2.seq.longreads.map2ref.sort.bam,rainbow_or_hline,23->80,ytick_flag,20->30->2,ytick_label_text,hgrid_flag,green:black,1:0.5,0.3:0.3,3:3 start_end_xaxis->2000:6000
reads_mapping=long_reads,1,chr14,14,0,../../genomeview/genomeview/examples/data/pacbio.chr14.sort.bam,rainbow_or_hline,15->1250,ytick_flag,20->30->2,ytick_label_text,hgrid_flag,green:black,1:1,3:10:2:0,15:15 # $tick_color, $tick_opacity, $tick_border, tick_label_size
tracks_shift_y=chr14,0,+12 #sample2,block_index2,+0.3;sample2,block_index2,-0.1


4 changes: 2 additions & 2 deletions example/main.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ feature_height_ratio=4
feature_opacity=0.8
track_style=fill:blue # green or #02030
feature_color = rgb(50,205,50)
genome_height_ratio=0.5 # mean genome height extend ratio
feature_arrow_sharp_extent=0 # bigger mean sharper arrow
genome_height_ratio=1 # mean genome height extend ratio
feature_arrow_sharp_extent=1 # bigger mean sharper arrow
# order for display
track_order=1
feature_order=2
Expand Down
Binary file added example/out.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 41e3441

Please sign in to comment.