Skip to content

Bug 115 function argument - #122

Open
bruno-ariano wants to merge 2 commits into
mainfrom
bug_115_function-argument
Open

Bug 115 function argument#122
bruno-ariano wants to merge 2 commits into
mainfrom
bug_115_function-argument

Conversation

@bruno-ariano

Copy link
Copy Markdown
Collaborator

Closes #115

Fix
The solution was simply to remove the parameter from the read_delim function which by default does not convert into data.table

Test
As test I have added a new file that specify the sdY. I think we should keep this file for testing the sdY function as well in out pipeline. After the fix the pipeline run without issue and include in the coloc results the trait with the given sdY

@ariannalandini

Copy link
Copy Markdown
Collaborator

I agree we should have a sdY file among our tests. However, the one you created, as it is now, should not work for this purpose, and we should address this.

sdY should be provided through file (and not directly as value in the input table) only for molQTLs - meaning GWAS summary statistics that have multiple traits within the same file (e.g. eQTLs, where the same SNP association but for multiple genes are collected in the same GWAS file usually). In case of molQTLs (is_molQTL == TRUE), the study_id would be for example "my_eQTLs_analysis_id", and the phenotype_id would be the actual individual trait, as for example ENSG ids.

Since "traditional" GWAS have a single trait within the same file, their phenotype_id is "full" (meaning that the whole summary statistics has been considered). Thus, since you have a tradistional single trait GWAS sum stat input, and assigned to phenotype_id a value that should not be in the phenotype_id column of the summary statistics, I think that the sdY in the file is simply skipped (see lines 194-196), since the condition all(dataset$phenotype_id %in% sdY_list$phenotype_id) should NOT be satisfied.

What I suggest:

  1. We can include among our tests an actual molQTL, for example eQTLs from one publicly available GTEx tissue (download here).

  2. If as you described "After the fix the pipeline run without issue", than something is not working as intended, and we should address it as well. I think we should add an else to the if statement here, dropping an error message, similary to the one just one line below. The pipeline should stop if sdY values provided through the file are not numeric or if not all phenotype_id values in the GWAS sum stat are also present in the file.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

read_delim() called with unused data.table argument

2 participants