Very minor issue, but it looks like you're plotting ALL of your associations in your manhattan plots, rather than just the genotype associations. To clarify: when you run your GWAS, you include the top PCs as covariates in the regression (this is correct). But this means that you also get regression results for the covariates, not just the variants you're testing. Take a look at the TEST column in the .assoc.linear output file(s) of the plink --linear command to figure out which results you want to keep/plot.
Also, your boxplot doesn't look quite right. Because you're plotting the strongest association, it doesn't make sense that there wouldn't be a clear trend in the box plot. I believe what's going on is that when you read in the phenotype values from GS451_IC50.txt, you're shifting the column indices by 7 to match the genotype indices in the VCF file.
README.md
with commands and analyses2/2
plotting.py
script to produce plots3.5/4
Very minor issue, but it looks like you're plotting ALL of your associations in your manhattan plots, rather than just the genotype associations. To clarify: when you run your GWAS, you include the top PCs as covariates in the regression (this is correct). But this means that you also get regression results for the covariates, not just the variants you're testing. Take a look at the
TEST
column in the.assoc.linear
output file(s) of theplink --linear
command to figure out which results you want to keep/plot.Also, your boxplot doesn't look quite right. Because you're plotting the strongest association, it doesn't make sense that there wouldn't be a clear trend in the box plot. I believe what's going on is that when you read in the phenotype values from
GS451_IC50.txt
, you're shifting the column indices by7
to match the genotype indices in the VCF file.https://github.com/cat-e-r/qbb2023-answers/blob/ab7ad1210cf88ef5e3e5f3935b892d50387824c5/week6-homework/plotting.py#L87-L93
BUT, the VCF has 9 fields before the genotypes start, not 7, so I think you need to shift by 9.
Pretty plots
4/4
Grade
Total: 9.5/10
Nice work!