Package: peptide-matcher
peptide-matcherpeptide-matcher is a piece of software that can be used for matching peptide sequences identified in proteomics experiments using a database-match or a de novo approach against a sequence database. The main purpose is to extract sequence context for the corresponding matches, but peptide-matcher can also provide structural context if provided with a database that includes structural information, seepeptide-matcher-data.There are three ways of how to use peptide-matcher:the GUIpeptide_matcher_guithe CLIpeptide_matcherthe python classpeptide_matcher.PeptideMatcherThe GUI is written withwxWidgets. Other dependencies includebiopythonandpyahocorasick.InstallationInstall with pipy:pip3 install peptide_matcher.How to use the GUITwo files are needed: the database in fasta format with optional structural annotations and a plain list of peptide sequences.The optional structural annotations should follow a custom format. Databases generated based on alphafold's models for a couple of popular model organisms are distributed atpeptide-matcher-data.The results of the peptide matching are returned to the GUI and can be saved as xlsx. For each peptide the following output is generated:FieldDescriptionExampleValuesPeptidepeptide sequenceQVHAVSFYSKstring of amino acid symbolsLengthpeptide length10integerProteinmatching protein idA6NL46stringStartstart position (1-based)150integerEndend position (1-based)159integerC-termdistance to protein's C-terminus182integerN-flankN-flanking residues in this proteinTDKAstringC-flankC-flanking residues in this proteinGHGVstringN-flank*weblogo for each position of the N-flank2T|2D|2K|2A|- separator between positionsC-flank*weblogo for each position of the C-flank1G1D|2H|1G1E|2VN-flank SSsecondary structure for the N-flankHHHHstring of DSSP codesPeptide SSsame for the peptide itselfHH------EEC-flank SSsame for the C-flank regionEEEEN-flank TMtransmembrane region for the N-flankTTTTstring of:T- TM region,S- signal peptidePeptide TMsame for the peptide itselfTT--------C-flank TMsame for the C-flank region----N-flank confalphafold's pLDDT score for the N-flank43,46,40,49list of integers 0-100Peptide confsame for the peptide itself44,44,45,44,50,39,48,39,56,46C-flank confsame for the C-flank49,47,42,46N-flank RSArelative solvent accessibility for the N-flank81,79,84,71list of integers 0-100Peptide RSAsame for the peptide itself90,78,75,78,54,62,73,84,73,81C-flank RSAsame for the C-flank67,78,71,80In the provided database, the RSA values are calculated by dividing the absolute solvent accessibility (ASA) as produced by dssp (mkdssp v.3.0.0) by the theoretical maximum values for ASA fromTien et al 2013.How to use CLICheck outpeptide_matcher -h:$ peptide_matcher -h
usage: peptide_matcher [-h] --peptides FILENAME --database FILENAME [--secstruct] [--flanks N] [--format {json,tsv,csv}] [--output OUTPUT]

Match peptides in a protein database.

optional arguments:
  -h, --help            show this help message and exit
  --peptides FILENAME, -p FILENAME
                        list of peptides to match
  --database FILENAME, -d FILENAME
                        protein database in fasta format
  --secstruct, -s       whether the database also contains structural information
  --flanks N, -f N      length of the flanks to report (default: 4)
  --format {json,tsv,csv}, -F {json,tsv,csv}
                        output format (default: json)
  --output OUTPUT, -o OUTPUT
                        output file (default: output to stdout)The output is similar to that of the GUI. The header of the tabular output formats looks as follows:[ 'peptide', 'peplen', 'record_id', 'start', 'end', 'c_term', 'n_flank', 'c_flank', 'n_logos', 'c_logos', 'sst_n_term', 'sst_pept', 'sst_c_term', 'tm_n_term', 'tm_pept', 'tm_c_term', 'conf_n_term', 'conf_pept', 'conf_c_term', 'acc_n_term', 'acc_pept', 'acc_c_term' ]. The json output is a list of dictionaries with each one of the following format:{"peptide": "IYGALAVGAP", "matches": [{"record_id": "P77549", "start": 157, "end": 166, "c_term": 227, "n_flank": "NGMA", "c_flank": "LGLL", "sst_n_term": "HHHH", "sst_pept": "HHHHHHHHHH", "sst_c_term": "HHHH", "tm_n_term": "----", "tm_pept": "----------", "tm_c_term": "----", "conf_n_term": [94, 89, 91, 94], "conf_pept": [93, 86, 88, 94, 89, 85, 90, 92, 86, 88], "conf_c_term": [93, 94, 91, 94], "acc_n_term": [3, 6, 25, 6], "acc_pept": [9, 24, 19, 0, 25, 50, 44, 0, 22, 45], "acc_c_term": [36, 0, 37, 47]}], "n_logos": [{"N": 1}, {"G": 1}, {"M": 1}, {"A": 1}], "c_logos": [{"L": 1}, {"G": 1}, {"L": 1}, {"L": 1}]}.How to use the APIfrom peptide_matcher import PeptideMatcher, wrap_logos, wrap_scores
peptides = [ 'IYGALAVGAP', 'LTCDETPVFSGSVLN', 'KRFARESGMTLL', 'GAGFAELLSSLQTPEIK', 'RTGHKLV' ] # or a file handle
database = 'UP000000625_83333_ECOLI.fasta' # or a file handle
flanks = 4
secstruct = True
pm = PeptideMatcher(peptides, database, secstruct, flanks)
for output in pm.run():
    print(output)