Plotting genotype frequency distribution
1
0
Entering edit mode
5.9 years ago
David_emir ▴ 490

Hi All,

I am planning to detect possible strand issues by checking genotype frequencies against population allele frequencies. for this, I am using Plugin af-dist from BCFtools.

I am following all the steps as mentioned in manual HERE. But, I am not able to plot The genotype frequency distribution, in this case, the data is

PROB_DIST   0.000000    0.100000    100618
PROB_DIST   0.100000    0.200000    144103
PROB_DIST   0.200000    0.300000    214923
PROB_DIST   0.300000    0.400000    320721
PROB_DIST   0.400000    0.500000    817965
PROB_DIST   0.500000    0.600000    84027
PROB_DIST   0.600000    0.700000    86531
PROB_DIST   0.700000    0.800000    97986
PROB_DIST   0.800000    0.900000    108776
PROB_DIST   0.900000    1.000000    176755

please help me in plotting this, I am looking to plot something like This

Thanks a lot for your help

Have a great day,

Dave!

af-dist plot distribution • 1.6k views
ADD COMMENT
1
Entering edit mode

Please provide headers to your columns for others to understand

ADD REPLY
1
Entering edit mode

Please select a more meaningful title for your question.

In addition, see How to add images to a Biostars post

ADD REPLY
0
Entering edit mode
5.9 years ago

Dave, this should give you a good start:

plot(test[,2], type="l", xlab="Genotype Probability (HWE)", ylab="Frequency", lwd=3, col="orange")
lines(test[,3], type="l", lwd=2.5, col="skyblue")
legend("bottomright", bty="n", c("incorrect strand","correct strand"), fill=c("orange","skyblue"))

f

If you want to add extra axes a ticks, then just use something like:

axis(side=4, labels=FALSE)

You can take a look at these functions to see all other available options.

Kevin

ADD COMMENT

Login before adding your answer.

Traffic: 2414 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6