Skip to content

Commit

Permalink
Fix for different pNovo mgf title format #193
Browse files Browse the repository at this point in the history
Signed-off-by: Douwe Schulte <[email protected]>
  • Loading branch information
douweschulte committed Nov 28, 2023
1 parent f216c9e commit c42643f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion stitch/OpenReads/Read.cs
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,12 @@ double ConvertToDouble(int pos) {
charge = InputNameSpace.ParseHelper.ConvertToUint(rev_name_pieces[0].ReverseString(), fields[0].Pos).UnwrapOrDefault(out_either, 0);
scan = InputNameSpace.ParseHelper.ConvertToUint(rev_name_pieces[2].ReverseString(), fields[0].Pos).UnwrapOrDefault(out_either, 0);
raw_file_name = id_pieces[1].Substring(6, id_pieces[1].Length - 8);
} else {
} else if (new Regex("""\w+\.\d+\.\d+.\d\.\d\.dta""").IsMatch(fields[0].Text)) {
var id = fields[0].Text;
var name_pieces = id.Split('.', 6);
charge = InputNameSpace.ParseHelper.ConvertToUint(name_pieces[3], fields[0].Pos).UnwrapOrDefault(out_either, 0);
scan = InputNameSpace.ParseHelper.ConvertToUint(name_pieces[1], fields[0].Pos).UnwrapOrDefault(out_either, 0);
raw_file_name = name_pieces[0] + ".raw";
// TODO: The first column is the start of the TITLE field from MGF, so all spectra will have to be located based on matching that...
// Which needs some additional ways of reporting that to the scan finder, sum types for the win...
}
Expand Down

0 comments on commit c42643f

Please sign in to comment.