= {}
mq_dict_evidence
'Sequence'] = 'sequence_naked'
mq_dict_evidence['Length'] = 'n_AA'
mq_dict_evidence['Modifications'] = 'mq_modifications'
mq_dict_evidence['Modified sequence'] = 'mq_sequence'
mq_dict_evidence['Missed cleavages'] = 'n_missed'
mq_dict_evidence['Proteins'] = 'protein_group'#it is not entirely clear what the difference between Leading Proteins and Proteins is
mq_dict_evidence['Leading proteins'] = 'protein_group'
mq_dict_evidence['Leading razor protein'] = 'protein'
mq_dict_evidence['Type'] = 'type'
mq_dict_evidence['Raw file'] = 'mq_rawfile'
mq_dict_evidence['MS/MS m/z'] = 'undefined'
mq_dict_evidence['Charge'] = 'charge'
mq_dict_evidence['m/z'] = 'mz'
mq_dict_evidence['Mass'] = 'mass'
mq_dict_evidence['Uncalibrated - Calibrated m/z [ppm]'] = 'undefined'
mq_dict_evidence['Uncalibrated - Calibrated m/z [Da]'] = 'undefined'
mq_dict_evidence['Mass error [ppm]'] = 'undefined'
mq_dict_evidence['Mass error [Da]'] = 'undefined'
mq_dict_evidence['Uncalibrated mass error [ppm]'] = 'undefined'
mq_dict_evidence['Uncalibrated mass error [Da]'] = 'undefined'
mq_dict_evidence['Max intensity m/z 0'] = 'undefined'
mq_dict_evidence['Retention time'] = 'rt'
mq_dict_evidence['Retention length'] = 'undefined'
mq_dict_evidence['Calibrated retention time'] = 'undefined'
mq_dict_evidence['Calibrated retention time start'] = 'undefined'
mq_dict_evidence['Calibrated retention time finish'] = 'undefined'
mq_dict_evidence['Retention time calibration'] = 'undefined'
mq_dict_evidence['Match time difference'] = 'undefined'
mq_dict_evidence['Match m/z difference'] = 'undefined'
mq_dict_evidence['Match q-value'] = 'undefined'
mq_dict_evidence['Match score'] = 'undefined'
mq_dict_evidence['Number of data points'] = 'undefined'
mq_dict_evidence['Number of scans'] = 'undefined'
mq_dict_evidence['Number of isotopic peaks'] = 'n_isotopes'
mq_dict_evidence['PIF'] = 'undefined'
mq_dict_evidence['Fraction of total spectrum'] = 'fragments_matched_int_ratio'
mq_dict_evidence['Base peak fraction'] = 'undefined'
mq_dict_evidence['PEP'] = 'undefined'
mq_dict_evidence['MS/MS count'] = 'undefined'
mq_dict_evidence['MS/MS scan number'] = 'undefined'
mq_dict_evidence['Score'] = 'score'
mq_dict_evidence['Delta score'] = 'undefined'
mq_dict_evidence['Combinatorics'] = 'undefined'
mq_dict_evidence['Intensity'] = 'ms1_int_sum'
mq_dict_evidence['Reverse'] = 'reverse'
mq_dict_evidence['Potential contaminant'] = 'contaminant'
mq_dict_evidence['id'] = 'id'
mq_dict_evidence['Protein group IDs'] = 'undefined'
mq_dict_evidence['Peptide ID'] = 'undefined'
mq_dict_evidence['Mod. peptide ID'] = 'undefined'
mq_dict_evidence['MS/MS IDs'] = 'undefined'
mq_dict_evidence['Best MS/MS'] = 'undefined'
mq_dict_evidence['Taxonomy IDs'] = 'undefined' mq_dict_evidence[
Export
MaxQuant output files
Read MaxQuant folder and return the files.
Sequence Notation
Dictionary to be able to convert AlphaPept sequence notaiton to MaxQuant
ap_to_mq_sequence
ap_to_mq_sequence (sequence, mod_translation)
Converts AlphaPept sequence format to MaxQuant Format returns sequence_naked, len_sequence, modifications_, mq_sequence
remove_mods
remove_mods (sequence)
evidence.txt
Apparently, the columns for evidence.txt are dynamic. As an example, when including Oxidation of M as modification, the following columns will be added:
'Oxidation (M)',
'Oxidation (M) Probabilities',
'Oxidation (M) Score Diffs',
'Oxidation (M) site IDs'
Example code to load and print the columns
import pandas as pd
evidence = pd.read_csv('F:/TESTDATA/DEFAULT/THERMO_IRT_MANY_MOD/combined/txt/evidence.txt', sep = '\t')
for _ in evidence.columns:
print(f"mq_dict_evidence['{_}'] =")
prepare_ap_results
prepare_ap_results (ref_ap)
import pandas as pd
ref_ap = pd.read_csv('E:/test_temp/results.csv')
ref_ap = prepare_ap_results(ref_ap)
mq_evidence = pd.DataFrame.from_dict({k: ref_ap[mq_dict_evidence[k]] for k in mq_dict_evidence.keys()})
mq_evidence.to_csv('mq_evidence.txt', sep = '\t', index=None)
ProteinGroups
#export
mq_dict_proteinGroups = {}
mq_dict_proteinGroups['Protein IDs'] =
mq_dict_proteinGroups['Majority protein IDs'] =
mq_dict_proteinGroups['Peptide counts (all)'] =
mq_dict_proteinGroups['Peptide counts (razor+unique)'] =
mq_dict_proteinGroups['Peptide counts (unique)'] =
mq_dict_proteinGroups['Fasta headers'] =
mq_dict_proteinGroups['Number of proteins'] =
mq_dict_proteinGroups['Peptides'] =
mq_dict_proteinGroups['Razor + unique peptides'] =
mq_dict_proteinGroups['Unique peptides'] =
mq_dict_proteinGroups['Sequence coverage [%]'] =
mq_dict_proteinGroups['Unique + razor sequence coverage [%]'] =
mq_dict_proteinGroups['Unique sequence coverage [%]'] =
mq_dict_proteinGroups['Mol. weight [kDa]'] =
mq_dict_proteinGroups['Sequence length'] =
mq_dict_proteinGroups['Sequence lengths'] =
mq_dict_proteinGroups['Q-value'] =
mq_dict_proteinGroups['Score'] =
mq_dict_proteinGroups['Intensity'] =
mq_dict_proteinGroups['MS/MS count'] =
mq_dict_proteinGroups['Only identified by site'] =
mq_dict_proteinGroups['Reverse'] =
mq_dict_proteinGroups['Potential contaminant'] =
mq_dict_proteinGroups['id'] =
mq_dict_proteinGroups['Peptide IDs'] =
mq_dict_proteinGroups['Peptide is razor'] =
mq_dict_proteinGroups['Mod. peptide IDs'] =
mq_dict_proteinGroups['Evidence IDs'] =
mq_dict_proteinGroups['MS/MS IDs'] =
mq_dict_proteinGroups['Best MS/MS'] =
mq_dict_proteinGroups['Oxidation (M) site IDs'] =
mq_dict_proteinGroups['Oxidation (M) site positions'] =
mq_dict_proteinGroups['Taxonomy IDs'] =