Closed cjchen5 closed 5 years ago
Hi,
You are showing me the head(df)
but running the command on df_filt
.
df_filt <- runGprimeAnalysis(SNPset = df_filt, windowSize = 1e6, outlierFilter = "deltaSNP")
Did you filter snps already?
How many rows in the df_filt data frame? Just based on the error msg it seems that the df_filt is empty?
Or maybe one of the Chrms is empty.
Something is strange with the data.
Ben
Hi Ben, Thank you! I guess one of the Chrms is empty after filtering. I will check it later. BTW, I have another question for Gprime plot. The deltaSNP plot from same data is continuous but Gprime plot have a weird gap near the peak. Could you tell me what might cause the gap in Gprime plot?
Hi,
The default y axis limits are -0.6 to 0.6, you have a nice peak there going past that range so it's getting cut off. You are probably also getting a warning message about values not being mapped.
To remedy this you should add + ylim(-1,1)
or some other range after your plotQTLStats()
function.
Ben
Thanks! But when I change my plot code to:
plotQTLStats(SNPset = df_filt, var = "deltaSNP", plotIntervals = TRUE, + ylim(-1,1))
Error in ylim(-1, 1) : could not find function "ylim"
Could you please tell me more detail of add + ylim(-1,1)?
Thank you very much!
The function is a wrapper for ggplot therefore you need to add + ylim() after the function. I.e. plotQTLStats(....) + ylim(..) Look at the ggplot package to understand more. Ben
Thank you so much!
When I library("ggplot2")
first and then plotQTLStats(....) + ylim(..
) it works.
Hi Ben, I got a problem in runGprimeAnalysis when I use version 0.7.5.2 Here is my code, same with your guide.
Here is output:
Here is code I use to get table, same with your guide for -F and -GF:
gatk VariantsToTable -R ${ref}/$reference_file -V ${reference}_Mr_cohort_snps.vcf -F CHROM -F POS -F REF -F ALT -GF AD -GF DP -GF GQ -GF PL -O ${reference}_Mr_db.snps.vcf.table
Here is head of df:
Could you tell me what might cause that error? Thanks!