Skip to content

Issues running MapGen for eQTL finemapping #12

Description

@llpesce

I am trying to finemap some eQTL signals, so I am running 3000 or so phenotypes.

It is not always too happy about the LD matrix (my sample is like a 100), but it works OK.

But for one of them I get this error:

selected.sumstats <- gwas.sumstats[gwas.sumstats$locus %in% sig.loci, ]
susie.results <- run_finemapping(selected.sumstats,
region_info = region_info, n=119,
priortype = 'uniform', L= my_L )
sumstats.locus <- gwas.sumstats[gwas.sumstats$locus == sig_loc, ]
susie.sumstats <- merge_susie_sumstats(susie.results, sumstats.locus)
Error in [<-:
! Row index NA is used more than once for assignment.
Run rlang::last_trace() to see where the error occurred.
rlang::last_trace(drop = FALSE)
<error/tibble_error_assign_duplicate_row_subscript>
Error in [<-:
! Row index NA is used more than once for assignment.


Backtrace:

  1. └─mapgen::merge_susie_sumstats(susie.results, sumstats.locus)
  2. ├─base::[<-(*tmp*, snp.idx, "susie_pip", value = <dbl>)
  3. └─tibble:::[<-.tbl_df(*tmp*, snp.idx, "susie_pip", value = <dbl>)
  4. └─tibble:::tbl_subassign(x, i, j, value, i_arg, j_arg, substitute(value))
    
  5.   └─tibble:::vectbl_as_new_row_index(i, x, i_arg, call = call)
    
  6.     └─tibble:::abort_assign_duplicate_row_subscript(i, call)
    
  7.       └─tibble:::tibble_abort(...)
    
  8.         └─rlang::abort(x, class, ..., call = call, parent = parent, use_cli_format = TRUE)
    

I tried to match the sumstats.locus and susie.results manually and I can't find (I extracted like susie.results$25$snp and matched it)

Any ideas? thank you.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions