[genoPlotR-help] Request a question for genoPlotR
Lionel Guy
lionel.guy at ebc.uu.se
Fri May 20 10:13:11 CEST 2011
Hi Zhuofei,
The problem comes from the trimming of the comparison. Since there is only one comparison element in that subregion you are plotting, and that it is larger than your xlims, it is filtered out. If you try
> plot_gene_map(dna_segs=list(BH=bh, BQ=bq), comparisons=list(bh_vs_bq),xlims=list(c(1,10000),c(1,10000)))
You will see the comparison again. To further explain, you can even try
> trim(bh_vs_bq, c(1,5000), c(1,5000))
which returns a comparison with no rows, whereas
> trim(bh_vs_bq, c(1,10000), c(1,10000))
returns a single row. The plotting function uses the trim function as well.
I know this may not be the expected behavior, but I've been thinking a lot how to do that correctly, and couldn't come up with a convincing solution. If the comparisons are really larger than your dna_seg, do you really want to display such a large comparison? I'm not sure... And how to resize them properly? And what when you have several subsegments? This is on my to-do list, but not on the top.
Anyway, you can try resize or divide the comparison elements in smaller pieces...:
> cp2 <- trim(bh_vs_bq, c(1,10000), c(1,10000))
> cp2$end1 <- 4999
> cp2$end2 <- 4999
> plot_gene_map(dna_segs=list(BH=bh, BQ=bq), comparisons=list(cp2),xlims=list(c(1,5000),c(1,5000)))
Should work.
By the way, I cc this message to genoplotr-help at lists.r-forge.r-project.org, the mailing list of genoplotr.
HTH,
Lionel
On 20 May 2011, at 9:31 , ZFXu wrote:
> Dear Dr Guy,
>
> I am using your package genoPlotR. I want to ask a question. Please see the following information:
> > bh<-read_dna_seg_from_ptt('BH.ptt')
> > bq<-read_dna_seg_from_ptt('BQ.ptt')
> > bh_vs_bq<-read_comparison_from_blast('BH_vs_BQ.blastn.tab',color_scheme="grey")
> > plot_gene_map(dna_segs=list(BH=bh, BQ=bq), comparisons=list(bh_vs_bq),xlims=list(c(1,50000),c(1,50000)))
> <correct.jpg>
> but when i reduce the range of genomic region, the region that should be matched can not be viewed normally. The commands are follows:
>
> > plot_gene_map(dna_segs=list(BH=bh, BQ=bq), comparisons=list(bh_vs_bq),xlims=list(c(1,5000),c(1,5000)))
> <incorrect.jpg>
> Could you tell me how to solve this problem?
>
> Thanks in advance!
>
> Zhuofei Xu
>
>
> ZFXu, Dr.
> 2011-05-20
More information about the genoPlotR-help
mailing list