Skip to content

add search rules for eQTL and gene_trait queries #145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 5, 2018

Conversation

yudongqiu
Copy link
Collaborator

This addresses later task in #118
Token eqtl is added to find all SNPs influencing to a certain gene.
Token genes is added to find all genes that are intersecting with all variants that are influencing a certain trait. (There is a small issue that the keyword genes will pop the geneNames as choices due to regex matching. It may be solved by using a "unique" keyword, but I'm not exactly sure what is a good keyword)

This PR also refactors the existing building query functions using the QueryBuilder class.

@yudongqiu yudongqiu requested review from haxiomic and saliksyed July 3, 2018 00:25
@yudongqiu
Copy link
Collaborator Author

I think the tests are failing because of the jest configuration but I'm not sure how to fix it.

@saliksyed
Copy link
Collaborator

saliksyed commented Jul 3, 2018

Nice work @yudongqiu -- it appears to me the QueryBuilder js file is not properly being consumed by the typescript processor (querybuilder is written in TypeScript not plain javascript):
wmonk/create-react-app-typescript#122

So the way it works is:
All imports in TS files are fed through the typescript pre-processor to compile from ES6 -> vanilla JS. In this case it seems that this pre-processing is not taking place for that particular file, so the raw es6 file is being included (which contains keywords like "export" that don't work in vanilla js).

I checked out your branch and can replicate the error by running npm test, I'm playing around with it to see if I can get it to compile, but I think it's a path issue with the jest config as you pointed out. I just realized you have never worked with TypeScript before I assigned this task!

@saliksyed
Copy link
Collaborator

saliksyed commented Jul 3, 2018

@yudongqiu -- don't spend time on this -- it's a nasty config issue. I will try to fix it.

@saliksyed
Copy link
Collaborator

The fix is to switch this line:
'^.+\\.jsx?$': 'babel-jest',

TO:

'^.+\\.jsx?$': 'ts-jest',

The babel compiler isn't correctly configured to ingest es6 files which is why it breaks. The ts-jest compiler is already configured to do this so I'm not sure why we even had babel in the first place.

Copy link
Collaborator

@saliksyed saliksyed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM @yudongqiu

@saliksyed
Copy link
Collaborator

@yudongqiu with the rebase this should just work -- as we are no longer using the babel compiler

@yudongqiu yudongqiu merged commit 070bf10 into VALIS-software:master Jul 5, 2018
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.

3 participants