Package: algn2pheno
algn2phenoA bioinformatics tool for rapid screening of genetic features (nt or aa changes) potentially linked to specific phenotypesINTRODUCTIONThealgn2phenomodule screens a amino acid/nucleotide alignment against a "genotype-phenotype" database and reports the repertoire of mutations of interest per sequences and their potential impact on phenotype.INPUT FILESTable database in .tsv or .xlsx formatANDAlignment (nucleotide or amino acid)(Mutation numbering will refer to the user-defined reference sequence included in the alignment).INSTALLATIONpipinstallalgn2phenoUSAGEusage:algn2pheno[-h][--dbDB][--sheetSHEET][--tableTABLE][--gencolGENCOL][--phencolPHENCOL]-gGENE--algnALGN-rREFERENCE[--nucl][--odirODIR][--outputOUTPUT][--logLOG][-f]parsearguments

optionalarguments:-h,--helpshowthishelpmessageandexit--dbDBphenotypedb.ifexcel,providesheetnameandcolumnsnumbersforgenotypeandphenotypedata.ifnotexcel,providepathtodb,ensure3columns'Mutation','Phenotype category'&'Flag'--sheetSHEET,-sSHEETGivesheetname(genenameor'Lineages').excelinput.--tableTABLE,-tTABLEtablenameindb.default:pokay.sqliteinput.--gencolGENCOLnrofcolumnwithgenotypedata.excelinput.--phencolPHENCOLnrofcolumnwithphenotypedata.excelinput.-gGENE,--geneGENESetgeneorproteinprefix--algnALGNInputalignmentfile-rREFERENCE,--referenceREFERENCEGivefullreferencesequenceasinalignmentfile(usequotationmarksifthiscontainsaspace)--nuclprovideifnucleotidealignmentinsteadofaminoacid.--odirODIR,-oODIRoutputdirectory--outputOUTPUTSetoutputfileprefix--logLOGlogfile-f,--forceoverwriteexistingfilesHow to run (examples)database (.tsv) + amino acid alignment (SARS-CoV-2 Spike)algn2pheno--dbdatabase.tsv--algnalignment_aa_Spike.fasta-gS-rreference_header--odiroutput_folder--outputoutput_prefixdatabase (.xlsx) + amino acid alignment (SARS-CoV-2 Spike)algn2pheno--dbdatabase.xlsx--algnalignment_aa_Spike.fasta--sheetS--gencol["Mutation"columnnumber]--phencol["Phenotype category"columnnumber]-gS-rreference_header--odiroutput_folder--outputoutput_prefixREQUIREMENTSThe input database must contain mutations and associated phenotypes, listed in columns namedMutationandPhenotype categoryrespectively. An additional columnFlagmay be provided for the ".tsv" input format.In the case of using an excel file as input, an intermediary .tsv database will be created. A "Flag" column will be generated automatically with Flags "D" and "P" to differentiate mutation(s) Directly associated with the phenotype ("D") and mutation(s) Partially associated with the phenotype (i.e., the mutation is Part of a constellation associated with that phenotype) ("P"). Constellation of mutations should be included in the same row separated by commas (e.g., H69del,H70del,L452R,N501Y).Undefined amino acids should be included as "X" in the protein alignment.
Undefined nucleotides should be included as "N" in the gene alignment.Modules:Main alignment to phenotype.python=3.7biopythonnumpypandasFurther modules required to scrape Pokay database.openpyxlrequestspygithubsqlalchemybeautifulsoup4lxmlINSTALLATIONgit clone this repository.install and activate environment with required modules (seepyenv.yml).CONFIGURATIONThis module does not require configuration.MAIN OUTPUTS_full_mutation_report.tsv: provides the repertoire of "Flagged mutations" (i.e., database mutations detected in the alignment), the list of "phenotypes" supported by those mutations of interest and the list of "All mutations" detected in alignment for each sequence._flagged_mutation_report.tsv: "Flagged mutation" binary matrix for all sequences and the "associated" phenotypes.Other intermediate outputs:_all_mutation_matrix:  matrix of all mutations found in the alignment [mutations coded as 1 (presence), 0 (absence)]. At this stage, undefined amino acids ("X") or undefined nucleotides ("n") are not yet handled as no coverage positions._all_mutation_report: matrix of all mutations found in the alignment [mutations coded as 1 (presence), 0 (absence) or nc (no coverage) positions] and associated phenotypes for the mutations in the database._all_db_mutations_report: matrix of mutations in the database [mutations coded as 1 (presence), 0 (absence) or nc (no coverage) positions] and associated phenotypes, regardless if they were found or not in the alignmentdatabase.CLEAN.tsv: conversion of the ".xlsx" database into a clean ".tsv" format adding the gene "prefix" (-g argument) to each mutation (similar to when providing a .tsv database with the three headers 'Mutation', 'Phenotype category' and 'Flag')MAINTAINERSCurrent maintainers:Joao Santos (santosjgnd)Bioinformatics Unit of the Portuguese National Institute of Health Dr. Ricardo Jorge (INSA) (insapathogenomics)CITATIONIf you run algn2pheno, please cite:João D. Santos,  Carlijn Bogaardt, Joana Isidro, João P. Gomes, Daniel Horton, Vítor Borges (2022). Algn2pheno: A bioinformatics tool for rapid screening of genetic features (nt or aa changes) potentially linked to specific phenotypes.FUNDINGThis work was supported by funding from the European Union’s Horizon 2020 Research and Innovation programme under grant agreement No 773830: One Health European Joint Programme.