You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is unfortunate that scan numbers in MGF files are not retained by Casanovo. We should make it possible to keep this information, in addition to the scan index. In the future, DepthCharge is going to be modified to be more flexible with the information it parses from the mass spec data files. When that happens, we can use that functionality to track scan numbers. However, prior to these changes, we could accomplish this by adding to Casanovo a post-processing step wherein the MGF file is read again. It’s not hard to do---something like the following would work:
with open("test.mgf") as mgf_file:
index_counter = 0
index2scan = {}
for line in mgf_file:
if line.startswith("SCAN ID"):
index2scan[index_counter] = line.split("=", 1)[1]
index_counter += 1
index2scan would be a dictionary mapping the scan index to the scan id value, again assuming all scans had the SCAN ID field.
In practice, we should probably support SCAN ID, SCAN and SCANS, since there is no definitive standard for MGF.
The text was updated successfully, but these errors were encountered:
It is unfortunate that scan numbers in MGF files are not retained by Casanovo. We should make it possible to keep this information, in addition to the scan index. In the future, DepthCharge is going to be modified to be more flexible with the information it parses from the mass spec data files. When that happens, we can use that functionality to track scan numbers. However, prior to these changes, we could accomplish this by adding to Casanovo a post-processing step wherein the MGF file is read again. It’s not hard to do---something like the following would work:
index2scan
would be a dictionary mapping the scan index to the scan id value, again assuming all scans had theSCAN ID
field.In practice, we should probably support
SCAN ID
,SCAN
andSCANS
, since there is no definitive standard for MGF.The text was updated successfully, but these errors were encountered: