Created
July 8, 2017 21:28
-
-
Save zhaofengli/abbb5c3b7c9bfd911b6cc08af01cd0d4 to your computer and use it in GitHub Desktop.
SNPedia genoset criteria syntax
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Start | |
= Comment* fc:FunctionCall Comment* { return fc } | |
// Function names must be at least 2 characters and must start with a lowercase letter | |
FunctionName | |
= first:[a-z] rest:[a-z0-9]i+ { return first + rest.join('') } | |
FunctionCall | |
= Ws name:FunctionName '(' Ws args:ArgumentList Ws ')' { return { type: 'FunctionCall', name, args } } | |
/ Ws name:FunctionName { return { type: 'FunctionCall', name, arguments: [] } } | |
Argument | |
= FunctionCall | |
/ Genotype | |
/ Base | |
/ Number | |
ArgumentList | |
= first:Argument rest:(Comment* Ws ',' Comment* Ws rlist:ArgumentList { return rlist })? (Ws ',')? { return rest === null ? [first] : [first].concat(rest); } | |
Base | |
= [AGCTD-] | |
Genotype | |
= allele1:Base ';' allele2:Base { return { type: 'Genotype', allele1, allele2 } } | |
Number | |
= n:[0-9]+ { return parseInt(n.join('')) } | |
Ws | |
= [ \t\r\n]* | |
Comment | |
= Ws '#' [^\r\n]* LineEnding? { return null } | |
/ '<!--' ( !'-->' . )* '-->' | |
LineEnding | |
= '\r\n' | |
/ '\r' | |
/ '\n' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
and( | |
not(gs266), | |
atleast(2, | |
rs2032605(C), | |
rs2032606(G), | |
rs35460572(A), | |
rs2032603(A), | |
rs2032651(D;D), | |
rs2032651(A), | |
rs9341296(C), | |
rs9341296(T), | |
rs13304168(C), | |
rs13304168(T), | |
rs1118473(A), | |
rs1118473(G), | |
rs150173(A), | |
rs150173(C), | |
or(rs1558843(C;C),rs1558843(A;A)), | |
rs16980426(G), | |
rs16980426(T), | |
or(rs17222419(C;C),rs17222419(T;T)), | |
) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# [[rs1805007]](T;T), | |
# [[rs1805008]](T;T)) | |
# [[rs1805009]](C;C), | |
or( | |
rs1805007(T;T), | |
rs1805008(T;T), | |
rs1805009(C;C) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment