annotate ezBAMQC/test-data/output/data/smp1.mapq_profile.r @ 14:744987262771

Uploaded
author cshl-bsr
date Wed, 30 Mar 2016 12:15:03 -0400
parents dfa3745e5fd8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
1 png("/sonas-hs/bsr/hpc/data/yjin/test_BAMqc/exp/test1/figs/smp1.mapq_profile.png",width=500,height=500,units="px")
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
2 mapq_val=c(0,1,3,255)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
3 mapq_count=c(589,3042,8955,66672)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
4 xname=c("<3","<10","<20","<30","30-255")
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
5 freq = rep(0,5)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
6 freq[1] = sum(mapq_count[which(mapq_val<3)])/79258*100
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
7 freq[2] = sum(mapq_count[which(mapq_val<10)])/79258*100
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
8 freq[3] = sum(mapq_count[which(mapq_val<20)])/79258*100
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
9 freq[4] = sum(mapq_count[which(mapq_val<30)])/79258*100
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
10 freq[5] = 100
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
11 barplot(freq,beside=T,xlab="Mapping Quality",border="NA",space=1.5,main="Mapping Quality",ylim=c(0,100),ylab="Cumulative proportion (%)",col="blue",names.arg=xname)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
12 dev.state=dev.off()