roh_visual.Rd
This function is designed to custom visualizing ROH. It support to plot ROH by Chromosome, Interested region, Single sample, Target gene, and combine ROH plot with Gene annotation plot. It also support users to customize the color and size of final graph.
roh_visual( clean_roh, max_chr = NULL, chr_id = NULL, chr_length = NULL, start_position = NULL, end_position = NULL, individual_id = NULL, refgene = NULL, target_region = c(0, 160), plot_title = NULL, report_id = NULL, pedigree = NULL, show_name = c(0, 160), width_1 = 13, height_1 = 10, col_short = "deepskyblue", col_mid = "black", col_long = "deeppink2", folder = "roh_visual", gene_font_size = 2.2 )
clean_roh | support roh results from Plink or generated by cnv_clean form CNVPartition results |
---|---|
max_chr | the maximum number of chromosomes to plot, it used for plot all chromosomes at once |
chr_id | the number of chromosome want to plot, integer type, such as '1' indicate the Chromosome 1. |
chr_length | set the length for the chromosome, unnecessary at the moment. |
start_position | decimal digit, default unit in 'Mb'. such as 23.2112 |
end_position | decimal digit, default unit in 'Mb'. such as 23.2112 |
individual_id | sample ID, which used to plot ROH by interested Samples. |
refgene | if true, will plot gene above roh plot |
target_region | plot target region by setting given interval in 'c(value1, value2)'. |
plot_title | add title in the plot |
report_id | report the sample ID while plotting |
pedigree | pedigree list, require at least three columns, Sample_Id, Sire and Dam |
show_name | default value is show_name = c(0, 160). accept the vectors only, unit is Mb. for example show_name = c(11.2, 12.4, 15.3, 18.4), means only plot the genes within the given interval |
width_1 | number to set the width of final plot size, unit is 'cm' |
height_1 | number to set the height of final plot size, unit is 'cm' |
col_short | set color to shorter length of roh in distribution plot |
col_mid | set color to middle length of roh in distribution plot |
col_long | set color to longer length of roh in distribution plot |
folder | set new folder to save results |
gene_font_size | set the font size of gene in ROH annotation plot |
ROH distribution plot