RajLabMSSM / echodata

echoverse module: Example data.
https://rajlabmssm.github.io/echodata
0 stars 0 forks source link

Bug BP import_topSNPs #1

Closed Al-Murphy closed 2 years ago

Al-Murphy commented 2 years ago

import_topSNPs doesn't seem to like if you change the positional column name from BP even if you change the input too:

Nalls_top_SNPs
setnames(Nalls_top_SNPs,"BP","SNP_pos")

top_SNPs <- import_topSNPs(
  # topSS = "~/Desktop/Fine_Mapping/Data/GWAS/Nalls23andMe_2019/Nalls2019_TableS2.xlsx",
  topSS = Nalls_top_SNPs,
  chrom_col = "CHR", 
  position_col = "SNP_pos", 
  snp_col="SNP",
  pval_col="P, all studies", 
  effect_col="Beta, all studies", 
  gene_col="Nearest Gene", 
  locus_col = "Nearest Gene",
  grouping_vars = c("Locus"),
  remove_variants = "rs34637584")

I think this is down to the munge functionality, where you over ride the position_col variable's value (line 73)

bschilder commented 2 years ago

I've rewritten much of this function in echodata (used by the echoverse branch) so it better uses MungeSumstats's colname standardisation function, in a way that also allows users to manually specify colnames without the two standardization strategies interfering with each other.

bschilder commented 2 years ago

I believe this is now resolved in echodata.