Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plot coverage variation of a bin across all samples #40

Open
Kirk3gaard opened this issue Feb 5, 2018 · 1 comment
Open

plot coverage variation of a bin across all samples #40

Kirk3gaard opened this issue Feb 5, 2018 · 1 comment

Comments

@Kirk3gaard
Copy link
Contributor

Kirk3gaard commented Feb 5, 2018

Make a function to plot coverage variation of a bin across all samples

Something like this

mmplot_coverage<-function(data,ncov=2,log.y=F,plotline=F) { dm<-melt(data$scaffolds,measure.vars = names(data$scaffolds)[c(4:(ncov+3))]) p<-ggplot(dm, aes(x = variable, y = value,col=tax,size=length)) + geom_point(alpha=0.1)+ theme_bw()+theme(axis.text.x = element_text(angle = 90))+ylab("Coverage") if (log.y == T){p <- p + scale_y_log10()} if (plotline==T){p <- p +geom_line(aes(group = scaffold),size=1)} return(p) }
mmplot_coverage_example

@KasperSkytte
Copy link

It has been implemented in mmgenome2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants