Skip to content
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

Add chrom regex filter #11

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Add chrom regex filter #11

wants to merge 3 commits into from

Conversation

Lipastomies
Copy link
Contributor

Sometimes the data contains some odd contigs. Added an input to the saige_sub.wdl to filter chromosomes based on a regex (saige.test_combine.combine.chrom_regex), which by default should be chr([0-9]{1,2})|(XYM)\s to include chr1-22, chrX, chrY, chrM.

@Lipastomies Lipastomies requested a review from juhis April 20, 2021 12:53
Copy link
Contributor

@juhis juhis left a comment

Choose a reason for hiding this comment

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

Nice! Just one generalization

@@ -19,6 +19,7 @@
"saige.test_combine.test.minmac": 5,
"saige.test_combine.test.logP": true,
"saige.test_combine.combine.logP": true,
"saige.test_combine.combine.chrom_regex": "^chr(([0-9]{1,2})|([XYM]))$",
Copy link
Contributor

Choose a reason for hiding this comment

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

Not relevant for current functioning but while at this I would make chr optional in case this is used for data without a chr prefix. Also would add XYMT in case there's mitochondrial as MT

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Then, how about this:

Suggested change
"saige.test_combine.combine.chrom_regex": "^chr(([0-9]{1,2})|([XYM]))$",
"saige.test_combine.combine.chrom_regex": "^(chr)?(([0-9]{1,2})|([XYM]|MT))$",

Now chr is optional (matched 0 or 1 times) and chromosome can be 0-99, X,Y,M,MT

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.

2 participants