-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added custom protease window in GUI #2352
base: master
Are you sure you want to change the base?
Conversation
… customProtease tsv to store all the customed proteases and then add to the dictionary
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2352 +/- ##
==========================================
+ Coverage 93.62% 93.64% +0.02%
==========================================
Files 140 140
Lines 21895 21923 +28
Branches 3005 3009 +4
==========================================
+ Hits 20499 20530 +31
+ Misses 937 936 -1
+ Partials 459 457 -2
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great start! I have a few suggestions and recommendations
@@ -14,6 +15,9 @@ | |||
using Omics.Modifications; | |||
using TopDownProteomics; | |||
using UsefulProteomicsDatabases; | |||
using Omics.Digestion; | |||
using static System.Net.Mime.MediaTypeNames; | |||
using System.Collections; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are all of these new namespaces necessary?
} | ||
if (DigestionMotifTextBox.Text.Length == 0) | ||
{ | ||
MessageBox.Show("Please specify the digestion motif(s) of the protease"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we check to see if the digestion motiff is a valid amino acid?
//load the default ProteaseDictionary | ||
//string folderPath = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles); | ||
//string path = ((!string.IsNullOrWhiteSpace(folderPath) && AppDomain.CurrentDomain.BaseDirectory.Contains(folderPath) && !AppDomain.CurrentDomain.BaseDirectory.Contains("Jenkins")) ? System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "MetaMorpheus") : AppDomain.CurrentDomain.BaseDirectory); | ||
//string path2 = System.IO.Path.Combine(path, "ProteolyticDigestion", "proteases.tsv"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comments can be removed
CleavageSpecDic.Add(c.ToString(), c); | ||
} | ||
CleavageSpecificity cleavageSpecificity = CleavageSpecDic[CleavageSpecComboBox.Text]; | ||
List<DigestionMotif> digestionMotifs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace this dictionary creation with
if (Enum.TryParse(CleavageSpecComboBox.Text, out _ cleaveageSpec)
{
set the value
}
else
{
message box error and return
}
ProteaseDictionary.Dictionary.Add(proteaseName, proteaseToAdd); | ||
} | ||
|
||
if (!ProteaseDictionary.Dictionary.TryAdd(proteaseName, proteaseToAdd)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check seems redundant
File.Create(customProteasePath); | ||
} | ||
|
||
string lineToAdd = "\n" + proteaseName + "\t" + motifString + "\t\t\t" + CleavageSpecComboBox.Text + "\t" + psiMsAccessionNum + "\t" + psiMsName + "\t\t\t\t\t"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what pieces of information are being skipped over with all of the \t\t\t\t and is that information important here?
DialogResult = false; | ||
} | ||
|
||
private void CleavageSpecComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused method can be removed
{ | ||
string[] proteaseToAdd = File.ReadAllLines(customProteasePath); | ||
for (int i = 0; i < proteaseToAdd.Length; i++) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most likely need to start at i == 1 because the first row is the header
No description provided.