Biostar Beta. Not for public use.
Question: Plotting genotype frequency distribution
0
Entering edit mode

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!

ADD COMMENTlink 21 months ago David_emir • 340 • updated 21 months ago Kevin Blighe 43k
Entering edit mode
1

Please provide headers to your columns for others to understand

ADD REPLYlink 21 months ago
Vijay Lakhujani
4.1k
Entering edit mode
1

Please select a more meaningful title for your question.

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

ADD REPLYlink 21 months ago
WouterDeCoster
39k
0
Entering edit mode

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 COMMENTlink 21 months ago Kevin Blighe 43k

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.0