Hi Karl
I have been trying to get effect sizes for protein/mRNA expression for SNPs of a list of TopSNPs using the maxmarg function to get the genotypes and then get phenotypes. This works well with our own data where I have the cross2 file (and all other files) with the function you provided me a few years ago in this group (thanks!). I also tried this same function on data downloaded from QTLViewer but while the TopSNP file looks the same and I have the snp_probs, the map file looks different (e.g. SNP_id missing) and while the map may be sufficient in the absence of a cross2 file, it's not working for me. Running the function gives me the error "Error in probs[[chr]][, , marker, drop = FALSE] : subscript out of bounds".
I use the below simple function that I built into a loop once it's working:
# get pheno-at-geno at different SNPs
num <- 1
genoatSNP <- maxmarg(snp_probs, pmap,
chr= top_snps_chr_2$chr[num],
pos = top_snps_chr_2$pos[num],
return_char=TRUE)
I am not sure what I am doing wrong and if there is a way to fix this with the files I have available?
Kind Regards
Jacky