[genoPlotR-help] genoplot

Lionel Guy guy.lionel at gmail.com
Thu Oct 17 10:34:57 CEST 2013


Hi Denis,

Thanks for your interest in genoPlotR. See my comments inline.

On 16 Oct 2013, at 19:02 , denis goryunov <denis.goryunov at mail.ru> wrote:

> 1.
> For example, We have 4 contigs (A,B,C,D) in 4 different genbank format files(A.gbk,B.gbk,C.gbk,D.gbk) and We desire to compare the contig A with each other contigs.
> We can perform BLAST and get 3 files:
> A_vs_B.blastout
> A_vs_C.blastout
> A_vs_D.blastout
> Can We use the genoplot software to visualize this comparison?

Yes, but you'd have to cheat a bit. One solution is to make a plot with the A segment in two different rows, like this:

B
A
C
A
D

Thus you get all comparisons to A. Easy, but you'd have to run some more blasts (B to A, C to A). And a bit cumbersome. The other possibility that I see would be to have for example C and D on the same line, like this:

B
A
C // D

but requires some more tinkering: 
- concatenating contigs C and D, recording the position of each start/end of contig (e.g. if contig C is 25 kb and contig D is 30, the start/end positions are now 1-25000 for C and 25001-30000 for D)
- running a blast A to CD
- running plot_gene_map with dna_segs=list(B, A, CD) and xlims=list(c(1,Inf), c(1,Inf), c(1, 25000, 25001, 30000))
Something along those lines...


> 2.
> Other example.
> We also have 4 contigs (A,B,C & D) in 4 different genbank format files(A.gbk,B.gbk,C.gbk,D.gbk) .
> We performed BLAST and got 3 files:
> A_vs_B.blastout
> B_vs_C.blastout
> C_vs_D.blastout
> How We should specify for the plot_gene_map function, that:
> 
> pair of A.gbk & B.gbk files corresponds to A_vs_B.blastout file
> 
> pair of B.gbk & C.gbk files corresponds to B_vs_C.blastout file
> 
> pair of C.gbk & D.gbk files corresponds to C_vs_D.blastout file ?

Hmm... not sure I'm following you. There is no hard link between dna_segs and comparisons, just the order in which they are entered. Thus, if you have obtained your dna_seg objects A to D using 

A <- read_dna_seg_from_file(file="A.gbk, etc...) 

and comparisons using 

A_vs_B <- read_comparisons_from_blast(file="A_vs_B.blastout", ...) 

Then using 

plot_gene_map(dna_segs=list(A, B, C, D), comparisons=list(A_vs_B, B_vs_C, C_vs_D) 

should just work. Is that what you were asking? 

> How We should specify for the plot_gene_map function which of genbank format files correspond to the annotation object (if I'll use it)?

Again, this is input order-dependent: simply use

plot_gene_map(dna_segs=list(A, B, C, D), comparisons=list(A_vs_B, B_vs_C, C_vs_D), annotations=list(A_annotation, B_annotation,...)


> 3.
> 
> Finally, I have some plot after execution the plot_gene_map function (see attachment). How I should determine where are contigs A, B, C and D, if dna_segs=list(A,B,C,D) ?

Hmm... are you sure you input 4 dna_segs? On the plot I see just three. So if you used dna_segs=list(A, B, C), then A is on top and C at the bottom.

> Can I little bit adjust my picture, so that the annotation labels don't overlap each other and don't walk out beyond of paper?

Yes. Either 
- use a larger device size: pdf(file=file.pdf, w=8, h=11), 
- increase the space for annotations: plot_gene_map(annotation_height = 2, ...)
- reduce font size: plot_gene_map(annotation_cex = 0.5)
or any combination thereof. You can also play with the "rot" argument/attribute of the annotation. See ?annotation and ?auto_annotate.

HTH,

Lionel

> Thank You in advance,
> Dr. Denis Goryunov,
> Institute of Physico-chemical biology,
> Department of Evolutionary Biochemistry,
> MSU
> 
> 
> 
> <Rplot01.pdf>

--
Lionel Guy 
Fålhagsleden 13, SE-75324 Uppsala | email: guy.lionel at gmail.com | mobile: +46 (0)73 9760618 | phone: +46 (0)18 410 7398



More information about the genoPlotR-help mailing list