Package: cyp2d6-parser
CYP2D6 ParserThe CYP2D6 parser utilizies the recommendations byPharmVarto organizeCYP2D6haplotypes and genotypes. The parsing and sorting of these haplotypes appears simple but many edge cases exist. This tool helps to facillitate the genotype reporting process by providing a standardized approach for reporting haplotypes.Current tool outputs supported:AldyCyriusPyPGxStargazerStellarPGxInstallationInstallation can be acheived using pip or any other package manager of your choosingpipinstallcyp2d6_parserParsing genotypesAPIimportcyp2d6_parser# Provide a genotype. If a caller is known, you can provide it to aid in some parsing# otherwise just a genotype is fine too, but a warning will be reportedresults=cyp2d6_parser.parse_genotype(genotype="*1/*10+*36")# Provide a file. If supplying a file or directory, must identify the type of caller usedresults=cyp2d6_parser.parse_genotype(file='aldy_results.tsv',caller='aldy')# Can also provide a directory of files using glob patternsresults=cyp2d6_parser.parse_genotype(dir_='aldy_results/*.tsv',caller='aldy',output_file='results.tsv')# parse_genotype above will report activity score and phenotyperesult=cyp2d6_parser.get_activity_score(genotype='*1/*10+*36')result=cyp2d6_parser.get_phenotype(genotype='*1/*10+*36')result=cyp2d6_parser.get_phenotype(activity_score=2)CLIpython3-mcyp2d6_parsergenotype--genotype_call"*1/*10+*36"python3-mcyp2d6_parser--calleraldygenotype--filealdy_results.tsv

python3-mcyp2d6_parser--calleraldygenotype--diraldy_results/*.tsv-oresults.tsv

python3-mcyp2d6_parseractivity--genotype_call"*1/*10+*36"python3-mcyp2d6_parserphenotype--genotype_call"*1/*10+*36"python3-mcyp2d6_parserphenotype--activity_score2Interpreting output from parse_genotypesample_id - File name or left blankgenotype_raw - Genotype(s) used as input, semicolon delimitedgenotype - Parsed and organized genotype according to PharmVar reccomendations. Retired alleles are converted to the new allele name (Ex: *57 -> *36). If you would like to report retired alleles, an option is available. Suballeles names are removed (Ex: *4.001 -> *4). If a single genotype cannot be resolved, Indeterminate/Indeterminate is reported.activity_score - Total activity score for the reported genotypephenotype - Phenotype based on activity scorecopy_number - Total number of copies in genotype only if the genotype is not Indeterminate. The only allele which does not count towards total copy number is *5 (gene deletion).possible_genotype - If the input genotypes cannot be resolved to a single genotype, all possible genotypes are reported in this field as semicolon delimited.possible_activity_score - If all possible genotypes resolve to a single activity score, then an activity score is reportedpossible_phenotype - If all possible activity scores resolve to a single phenotype, then the phenotype is reported. The activity score field can be blank with a possible phenotype. Ex:possible_genotypes: *1/*1;*1/*10possible_activity_score: not reported because possible values are 2 and 1.25possible_phenotype: CYP2D6 Normal MetabolizerBugs and desired featuresPlease report any bugs and/or desired features to either the github issues page or toandrew.haddad@pitt.edu