This is a test version of Biostars. For the public version, visit https://www.biostars.org.
genoPlotR in R

I'm working on plotting gene orders of two organisms using genoPlotR in R. I have my data downloaded from Nucleotide NCBI database in gb format. My data plots perfectly, however, names of genes appear to be crammed up, and I did not really find a way to make space between them or expand size of segment.

My code is the following:

data files

twelve<-try(read_dna_seg_from_file("//Users/location/12.gb"))
thirteen<-try(read_dna_seg_from_file("//Users/location/13.gb"))

annotation files

ann_twelve<-annotation(x1=middle(twelve), text=twelve$name, rot = 30)
ann_thirteen<-annotation(x1=middle(thirteen), text=thirteen$name, rot = 30)

comparison file

out144<-try(read_comparison_from_blast("/Users/location/out144.out"))

plotting

plot_gene_map(
  dna_segs = list(twelve,thirteen), 
  comparisons = list(out144),
  annotations = list(ann_twelve, ann_thirteen),
  annotation_height = 0.8,
  gene_type = "side_blocks",
  dna_seg_scale = TRUE,
  scale = FALSE,
  dna_seg_labels = c("twelve","thirteen"))

I have been trying different ways to modify segment size on the plotting code, but was not successful.

Here is how my plotted data looks like:

r genoplotr

2 answers

Use the argument annotation_cex=0.5 (or less) in plot_gene_map function.

I appreciate your reply. The font got smaller and gene names are separated now. I was able to view genes clearly when I downloaded the plot as PDF.

Thanks again!

Hi,

Could you send me your 12.gb, 13.gb, and out144.out to me (xianghe.yan@ars.usda.gov)? And brief instruction how you generate out144.out file. I would like to have a try this program. Thank YOU VERY MUCH!!

Log in to answer this question.