[genoPlotR-help] dhrs4

Lionel Guy lionel.guy at icm.uu.se
Thu Nov 15 09:41:45 CET 2012


Hi Leifeng,

I cc this email to the help mailing list
(genoplotr-help at lists.r-forge.r-project.org).

About your question 1: in your data, there is only one "common block"
that is shared by all the species, and by default read_mauve_backbone
reads only common blocks. Use the argument common_blocks_only = FALSE to
see all blocks:

library(genoPlotR)
bbone_file <- "dhrs4.backbone"
bbone <- read_mauve_backbone(bbone_file, common_blocks_only = FALSE, ref
= 1)
names <- c("human-DHRS4", "human-DHRS4L2", "human-DHRS4L1",
"chimp-DHRS4","chimp-DHRS4L1","rhesus-DHRS4","rhesus-DHRS4L2","rhesus-DHRS4L1","mouse-DHRS4","rat-DHRS4","cow-DHRS4","dog-DHRS4","chicken--DHRS4","zebrafish-DHRS4")

names(bbone$dna_segs) <- names
for (i in 1:length(bbone$comparisons)) {
  cmp <- bbone$comparisons[[i]]
  bbone$comparisons[[i]]$length <- abs(cmp$end1 - cmp$start1) +
    abs(cmp$end2 - cmp$start2)
}
plot_gene_map(dna_segs = bbone$dna_segs, comparisons = bbone$comparisons,
 global_color_scheme = c("length", "increasing", "red_blue",
 0.7), override_color_schemes = TRUE)

About question 2, you get a message telling you that you don't have any
data left in your backbone. There are probably no blocks larger than
1000. Try to lower the filter_low argument or even to remove it when
reading the data (I couldn't test it since you didn't send the data, but
it should work):

bbone <- read_mauve_backbone(bbone_file, ref = 3, filter_low =50)

or

bbone <- read_mauve_backbone(bbone_file, ref = 3, filter_low =0)

HTH,

Lionel

On 11/13/2012 04:00 PM, leifeng wrote:
> Dear fellow,
>   I am a graduate student from china.
>   I am interested in the R package genoPlotR and just learn how to use 
> it. For the reason that i am not good at script language R, it is hard 
> for me to mater it.
>   Now, i have two questions, could you help me ?
> Question 1,
>   I run the following script and could not get the result like mauve
> and just like this
> library(genoPlotR)
>   bbone_file <- "dhrs4.backbone"
> bbone <- read_mauve_backbone(bbone_file, ref = 1, filter_low =20)
>   names <- c("human-DHRS4", "human-DHRS4L2", "human-DHRS4L1", "chimp-DHRS4","chimp-DHRS4L1","rhesus-DHRS4","rhesus-DHRS4L2","rhesus-DHRS4L1","mouse-DHRS4","rat-DHRS4","cow-DHRS4","dog-DHRS4","chicken--DHRS4","zebrafish-DHRS4")
>   names(bbone$dna_segs) <- names
>   for (i in 1:length(bbone$comparisons)) {
>   cmp <- bbone$comparisons[[i]]
>   bbone$comparisons[[i]]$length <- abs(cmp$end1 - cmp$start1) +
>   abs(cmp$end2 - cmp$start2)
>   }
>   plot_gene_map(dna_segs = bbone$dna_segs, comparisons = bbone$comparisons,
>   global_color_scheme = c("length", "increasing", "red_blue",
>   0.7), override_color_schemes = TRUE)
> Could you tell me?
> Question 2,
> when i run the following script, the program always return errors,
>  >  bbone_file <- "cluster.backbone"
>  > bbone <- read_mauve_backbone(bbone_file, ref = 3, filter_low =1000)
> 错误于read_mauve_backbone(bbone_file, ref = 3, filter_low = 1000) :
>    No row left in data. Check data and/or lower filter_low argument
>  >  names <- c("human-DHRS4", "human-DHRS4L2", "human-DHRS4L1", "chimp-DHRS4","chimp-DHRS4L1")
>  >  names(bbone$dna_segs) <- names
> 错误于names(bbone$dna_segs) <- names : 找不到对象'bbone'
>  >  for (i in 1:length(bbone$comparisons)) {
> +  cmp <- bbone$comparisons[[i]]
> +  bbone$comparisons[[i]]$length <- abs(cmp$end1 - cmp$start1) +
> +  abs(cmp$end2 - cmp$start2)
> +  }
> 错误: 找不到对象'bbone'
>  >  plot_gene_map(dna_segs = bbone$dna_segs, comparisons = bbone$comparisons,
> +  global_color_scheme = c("length", "increasing", "red_blue",
> +  0.7), override_color_schemes = TRUE)
> 错误于 
> plot_gene_map(dna_segs = bbone$dna_segs, comparisons = bbone$comparisons,  : 
> 
>    找不到对象'bbone'
> Thank you for your help,
> sincerely regards
> 2012-11-13 23:00:50
> ------------------------------------------------------------------------
> 冯雷
> 汕头大学医学院2010级硕士研究生
> 生物化学与分子生物学专业
> 广州省汕头市新陵路22号
> 电话:13592899729
> 邮编:515041


More information about the genoPlotR-help mailing list