~ubuntu-branches/debian/sid/libvcflib/sid

« back to all changes in this revision

Viewing changes to bin/plotBfst.R

  • Committer: Package Import Robot
  • Author(s): Andreas Tille
  • Date: 2016-09-16 15:52:29 UTC
  • Revision ID: package-import@ubuntu.com-20160916155229-24mxrntfylvsshsg
Tags: upstream-1.0.0~rc1+dfsg
ImportĀ upstreamĀ versionĀ 1.0.0~rc1+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#usage:  nohup R --vanilla < plotPfst --args pFst.txt
 
2
 
 
3
cmd_args <- commandArgs(trailingOnly = TRUE)
 
4
 
 
5
plotPfst<-function(x){
 
6
        require("ggplot2")
 
7
        dat<-read.table( x, header=FALSE )
 
8
        dat$V2 <-dat$V2 / 1e3
 
9
 
 
10
        theplot<-ggplot(dat, aes(x=V2, y=V9))+geom_point()+geom_segment(aes(x=V2, xend=V2, y=V10, yend=V11))+labs(x="KB position", y="Fst")+theme_grey(15)
 
11
        pngName<-paste(c(x, format(Sys.time(), "%a%b%d_%H_%M_%S.png")), collapse="_")
 
12
        ggsave(filename=pngName, width=20, height=4, units="in", theplot)
 
13
}
 
14
 
 
15
plotPfst(cmd_args)
 
 
b'\\ No newline at end of file'