Closed Tarskin closed 6 years ago
This also requires changing the 'writeResults' function, specifically line:
composition,charge,isotope = i[4][0].split("_")
Suggested change:
composition, charge, isotope = "_".join(i[4][0].split("_")[:-2]), i[4][0].split("_")[-2], i[4][0].split("_")[-1]
The program currently extracts the charge from an analyte as follows:
charge = j[0].split("_")[1]
This will take the wrong section if an analyte is used with underscores, rather should split and count from the end, as LaCyTools always appends charge state and isotope, suggested change:
charge = j[0].split("_")[-2]