Skip to content

Commit

Permalink
Version 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
EmineTopcu committed Jun 5, 2022
1 parent 70a306e commit 7cd8a4e
Show file tree
Hide file tree
Showing 33 changed files with 321 additions and 3,526 deletions.
10 changes: 10 additions & 0 deletions 3rd Party Licenses.md
@@ -0,0 +1,10 @@
PeSA uses some 3rd part tools. Corresponding licences are below:

**EPPlus**
https://github.com/JanKallman/EPPlus
https://www.nuget.org/packages/EPPlus/4.5.3.3/license

**Newtonsoft.Json**
https://www.newtonsoft.com/json
https://licenses.nuget.org/MIT

3 changes: 3 additions & 0 deletions ChangeLog.md
@@ -1,3 +1,6 @@
__Version 2.0__
* Migration to .NET Core

__Version 1.11__
* Save motif to Peptide Array, OPAL and Peptide list forms
* Direct link from analysis forms to the scorer
Expand Down
Binary file removed Executable/PeSA.zip
Binary file not shown.
41 changes: 41 additions & 0 deletions PeSA 2.0.sln
@@ -0,0 +1,41 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.32328.378
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Folder", "Solution Folder", "{82F43E6D-03E7-4BD7-B720-51A3AA707BC8}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
3rd Party Licenses.md = 3rd Party Licenses.md
ChangeLog.md = ChangeLog.md
LICENSE = LICENSE
README.md = README.md
Todo.txt = Todo.txt
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PeSA.Engine", "PeSA.Engine\PeSA.Engine.csproj", "{FA69AFC7-7CCD-4B4B-8EC3-6069AA3FBCD2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PeSA.Windows", "PeSA.Windows\PeSA.Windows.csproj", "{90FDDF6C-1CED-4BAE-977D-F6278C544EAF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FA69AFC7-7CCD-4B4B-8EC3-6069AA3FBCD2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FA69AFC7-7CCD-4B4B-8EC3-6069AA3FBCD2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FA69AFC7-7CCD-4B4B-8EC3-6069AA3FBCD2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FA69AFC7-7CCD-4B4B-8EC3-6069AA3FBCD2}.Release|Any CPU.Build.0 = Release|Any CPU
{90FDDF6C-1CED-4BAE-977D-F6278C544EAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{90FDDF6C-1CED-4BAE-977D-F6278C544EAF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{90FDDF6C-1CED-4BAE-977D-F6278C544EAF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{90FDDF6C-1CED-4BAE-977D-F6278C544EAF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F761AF67-2D69-4BC6-A7F3-F92F89BB29CD}
EndGlobalSection
EndGlobal
76 changes: 0 additions & 76 deletions PeSA.Engine/ChartExtensions.cs

This file was deleted.

13 changes: 7 additions & 6 deletions PeSA.Engine/Data Structures/Motif.cs
@@ -1,10 +1,5 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Windows.Forms.DataVisualization.Charting;

namespace PeSA.Engine
{
Expand Down Expand Up @@ -139,6 +134,8 @@ private void AddColumnValue(Dictionary<int, Dictionary<char, List<double>>> _Col

public Dictionary<int, Dictionary<char, double>> GetScaledColumns(Dictionary<int, Dictionary<char, double>> _Columns)
{
if (_Columns == null || !_Columns.Any())
return null;
Dictionary<int, Dictionary<char, double>> scaled = new Dictionary<int, Dictionary<char, double>>();
Dictionary<int, double> totalWeightsPerPos = new Dictionary<int, double>();
foreach (int pos in _Columns.Keys)
Expand Down Expand Up @@ -433,6 +430,8 @@ private Bitmap GetLetterImage(Char c, int width, int height, Color color)
int width, int height, int positionSpacing = 10, int letterSpacing = 3,
Color? defColor = null)
{
if (Columns == null || !Columns.Any())
return null;
Settings settings = Settings.Load("default.settings");

int maxAAperCol = settings.MotifMaxAAPerColumn;
Expand Down Expand Up @@ -568,7 +567,9 @@ public Bitmap GetFrequencyMotif(int widthImage, int heightImage)

public Bitmap GetBarChart(int width)
{
int pepsize = 0;
if (PositiveColumns == null || NegativeColumns == null)
return null;
int pepsize;
if (string.IsNullOrEmpty(WildTypePeptide))
pepsize = PosCaptions?.Count() ?? PeptideLength;
else //if (!string.IsNullOrEmpty(WildTypePeptide))
Expand Down
5 changes: 3 additions & 2 deletions PeSA.Engine/Data Structures/OPALArray.cs
Expand Up @@ -229,12 +229,13 @@ public static void CheckPermutationAxis(string[,] values, ref bool xPossible, re
for (int iRow = 1; iRow <= rowCount; iRow++)
{
string s = values[iRow, 0].Trim();
if (aaList.Contains(s[0]))
char aa = s.Length > 0 ? s[0] : ' ';
if (aaList.Contains(aa))
{
yPossible = false;
break;
}
aaList.Add(s[0]);
aaList.Add(aa);
}
}

Expand Down
10 changes: 1 addition & 9 deletions PeSA.Engine/Data Structures/Score.cs
@@ -1,12 +1,4 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Windows.Forms.DataVisualization.Charting;

namespace PeSA.Engine
namespace PeSA.Engine
{
public class Score
{
Expand Down
13 changes: 3 additions & 10 deletions PeSA.Engine/Helpers/MatrixUtil.cs
@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Text;
using System.Xml.Linq;

namespace PeSA.Engine
Expand Down Expand Up @@ -83,13 +77,12 @@ public static double GetMaxValue(double[,] matrix, int rowind = -1, int colind =
return maxval;
}

public static string[,] ClipboardToMatrix()
public static string[,] ClipboardToMatrix(MemoryStream stream)
{
try
{
var dataObject = Clipboard.GetDataObject();
string[,] matrix = null;
using (var stream = (MemoryStream)dataObject.GetData("XML Spreadsheet"))
using (stream)
{
var xml = Encoding.UTF8.GetString(stream.ToArray());
xml = xml.Substring(0, xml.Length - 1);
Expand Down

0 comments on commit 7cd8a4e

Please sign in to comment.