Skip to content

plotting using ggcoverage #4

@sparthib

Description

@sparthib

Hello, I downloaded the package from github and I am trying it out on one single sample.

This is what my track.df looks like

> track.df
   seqnames    start      end score     Type Group
1     chr14 21675306 21689311     0 RGC_rep1   RGC
2     chr14 21689312 21689328     1 RGC_rep1   RGC
3     chr14 21689329 21689667     2 RGC_rep1   RGC
4     chr14 21689668 21689773     1 RGC_rep1   RGC

I use the mark.region from the vignette

mark.region=data.frame(start=112647034,
                       end=112647834,
                       label="Focus")

I used this code from the vignette for plotting

basic.coverage = ggcoverage(data = track.df, color = "auto", plot.type = "facet",
                            mark.region = mark.region, range.position = "out")

which gives this error:

Error in names(x) <- value : 
  'names' attribute [3] must be the same length as the vector [0]
> traceback()
3: `colnames<-`(`*tmp*`, value = colnames(mark.region))
2: geom_coverage(data = data, mapping = mapping, color = color, 
       rect.color = rect.color, single.nuc = single.nuc, plot.type = plot.type, 
       facet.key = facet.key, joint.avg = joint.avg, facet.order = facet.order, 
       facet.color = facet.color, facet.y.scale = facet.y.scale, 
       group.key = group.key, range.size = range.size, range.position = range.position, 
       mark.region = mark.region, mark.color = mark.color, mark.alpha = mark.alpha, 
       show.mark.label = show.mark.label, mark.label.size = mark.label.size)
1: ggcoverage(data = track.df, color = "auto", plot.type = "facet", 
       mark.region = mark.region, range.position = "out")

Any pointer as to why this might happen is appreciated! Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions