User:Lindenb/Notebook/UMR915/20100804

From OpenWetWare

Jump to: navigation, search

20100803        Top        20100806       


generating fake data for small browser

   cat < /dev/zero | tr "\0" "\n" | head -n 3|  awk 'BEGIN { printf("[\n");} {start=rand()*1000000; printf("%s{\"chrom\":\"chr1\",\"start\":%d,\"end\":%d,\"ref\":\"A\",\"alt\":\"G\",\"struct\":false,"hq":true,\"depth\":%d,\"sift\":\"%s\",\"pph2div\":\"%s\",\"pph2var\":\"%s\",\"rs\":%s,\"id\":%d}\n",(i==0?"":","),start,start+1,5+rand()*100,(rand()<0.5?"DAMAGING":"TOLERATED"),(rand()<0.5?"benign":"probably damaging"),(rand()<0.5?"benign":"probably damaging"),(rand()<0.5?"null":sprintf("\"rs%d\"",+(rand()*1000))),i++);} END { printf("\n];\n");}'
Personal tools