Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #2 from marinakiweler/master
Resolution for LTQ_orbitrap_MS added
  • Loading branch information
marinakiweler committed Jan 8, 2020
2 parents b05afef + e55f0e7 commit 5f15a33
Show file tree
Hide file tree
Showing 20 changed files with 58 additions and 14 deletions.
29 changes: 24 additions & 5 deletions MARMoSET_C/MARMoSET/InstrumentMethod.cs
Expand Up @@ -59,12 +59,30 @@ public InstrumentMethod(IRawDataPlus rawFile, int index, bool toLower = false, o
}
else if (name[index].Equals("LTQ"))
{
/*if (friendName[index].Equals("LTQ_Orbitrap_MS"))
Dictionary<string,object> methodWithResolution = ltqDictListCreate(methode);
// obtaining the resolution from all scans ('trailer data'), compare and add to method if all the same
if (friendName[index].Equals("LTQ Orbitrap MS"))
{
this.Method = ltq2DictListCreate(methode);
this.SharedTuneData = tuneData;
}*/
this.Method = ltqDictListCreate(methode);
int sNumber = rawFile.RunHeaderEx.TrailerExtraCount;
var seqSNumber = Enumerable.Range(1, sNumber);
List<int> trailerD22List = new List<int>();

foreach (int scan in seqSNumber)
{
Object aValue = rawFile.GetTrailerExtraValue(scan, 22);
int intValue = Convert.ToInt32(aValue);
trailerD22List.Add(intValue);
}
// 1077 -> 0 ???


var resolutionValues = new HashSet<int>(trailerD22List);
resolutionValues.Remove(0);
object resolution = resolutionValues;
methodWithResolution.Add("Resolution", resolution);
}

this.Method = methodWithResolution;
this.SharedTuneData = tuneData;
}
// if instrument is none of the above -> Method is List<string>
Expand Down Expand Up @@ -553,6 +571,7 @@ public List<string> MethodAsList(IRawDataPlus rawFile, int index, bool toLower =
}
}
}

// catch last entries
if (dic.Count != 0)
{
Expand Down
2 changes: 1 addition & 1 deletion MARMoSET_C/MARMoSET/MARMoSET.csproj.user
Expand Up @@ -7,7 +7,7 @@
<StartArguments>E:\bspdaten</StartArguments>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<StartArguments>C:\Users\mkiwele\Desktop\RAW_07\20070326_JG_neuronalSC_01.RAW</StartArguments>
<StartArguments>C:\Users\mkiwele\Desktop\RAW_07\ afile.json</StartArguments>
<StartWorkingDirectory>
</StartWorkingDirectory>
</PropertyGroup>
Expand Down
14 changes: 9 additions & 5 deletions MARMoSET_C/MARMoSET/Program.cs
Expand Up @@ -56,14 +56,15 @@ public static void Main(string[] args)
" For saving with full path set -r in front. If empty the output will be send to the standard output."
);
}

else
{
// Output path
string outName = string.Empty;
if (args.Length > 1)
{ // 2nd argument is path + name
outName = args[1];
if (outName.Equals("-r") || outName.Equals("-R"))
if (outName.Equals("-r") || outName.Equals("-R")) // Mode for R Package
{
pathShort = true;
outName = args[2];
Expand All @@ -74,9 +75,11 @@ public static void Main(string[] args)
{ // no 2nd arg -> file on console
consoleOut = true;
}

// read all rawFiles, convert to JSON

//___________________________________________________
// main file handling:
var rawFiles = new FileSet(path, consoleOut);
// convert structure to JSON
string json = JsonConvert.SerializeObject(rawFiles, Formatting.Indented) + "\n";
// deleting ":" at the end of keys (tune data and instrument method)
json = json.Replace(":\":", "\":");
Expand All @@ -97,15 +100,16 @@ public static void Main(string[] args)
else
{
// is path to dir or file?
if (path.EndsWith(".raw"))
string lowPath = path.ToLower();
if (lowPath.EndsWith(".raw"))
{
outPath = (System.IO.Path.GetDirectoryName(path));
}
else
{
outPath = path;
}
fullOutPath = outPath + "\\" + outName;
fullOutPath = System.IO.Path.Combine(outPath, outName);
}
System.IO.File.WriteAllText(fullOutPath, json);
}
Expand Down
Binary file modified MARMoSET_C/MARMoSET/bin/x64/Debug/MARMoSET.exe
Binary file not shown.
Binary file modified MARMoSET_C/MARMoSET/bin/x64/Debug/MARMoSET.pdb
Binary file not shown.
Binary file modified MARMoSET_C/MARMoSET/bin/x64/Release/MARMoSET.exe
Binary file not shown.
Binary file modified MARMoSET_C/MARMoSET/bin/x64/Release/MARMoSET.pdb
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
1005f4ce76369c18d99608c19a1b3ef7d845a78a
accfaa5dd80ee39f64af26fa6b8ebcce153e648a
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
6c7aab82043387192984052d277efc2be4a2c022
0e07f3fdd32529e8f0140e5a46a6be6b427de4a6
Expand Up @@ -61,3 +61,14 @@ P:\allMARMoSET\MARMoSET_C\MARMoSET\obj\x64\Debug\MARMoSET.pdb
\\KI-S0138\Abt-A$\mkiwele\allMARMoSET\MARMoSET_C\MARMoSET\obj\x64\Debug\MARMoSET.csproj.CopyComplete
\\KI-S0138\Abt-A$\mkiwele\allMARMoSET\MARMoSET_C\MARMoSET\obj\x64\Debug\MARMoSET.exe
\\KI-S0138\Abt-A$\mkiwele\allMARMoSET\MARMoSET_C\MARMoSET\obj\x64\Debug\MARMoSET.pdb
\\mpg-nki-winfs.kerckhoff.mpg.de\mkiwele$\allMARMoSET\MARMoSET_C\MARMoSET\bin\x64\Debug\MARMoSET.exe.config
\\mpg-nki-winfs.kerckhoff.mpg.de\mkiwele$\allMARMoSET\MARMoSET_C\MARMoSET\bin\x64\Debug\MARMoSET.exe
\\mpg-nki-winfs.kerckhoff.mpg.de\mkiwele$\allMARMoSET\MARMoSET_C\MARMoSET\bin\x64\Debug\MARMoSET.pdb
\\mpg-nki-winfs.kerckhoff.mpg.de\mkiwele$\allMARMoSET\MARMoSET_C\MARMoSET\bin\x64\Debug\Newtonsoft.Json.dll
\\mpg-nki-winfs.kerckhoff.mpg.de\mkiwele$\allMARMoSET\MARMoSET_C\MARMoSET\bin\x64\Debug\Newtonsoft.Json.pdb
\\mpg-nki-winfs.kerckhoff.mpg.de\mkiwele$\allMARMoSET\MARMoSET_C\MARMoSET\bin\x64\Debug\Newtonsoft.Json.xml
\\mpg-nki-winfs.kerckhoff.mpg.de\mkiwele$\allMARMoSET\MARMoSET_C\MARMoSET\obj\x64\Debug\MARMoSET.csproj.CoreCompileInputs.cache
\\mpg-nki-winfs.kerckhoff.mpg.de\mkiwele$\allMARMoSET\MARMoSET_C\MARMoSET\obj\x64\Debug\MARMoSET.csproj.CopyComplete
\\mpg-nki-winfs.kerckhoff.mpg.de\mkiwele$\allMARMoSET\MARMoSET_C\MARMoSET\obj\x64\Debug\MARMoSET.exe
\\mpg-nki-winfs.kerckhoff.mpg.de\mkiwele$\allMARMoSET\MARMoSET_C\MARMoSET\obj\x64\Debug\MARMoSET.pdb
\\mpg-nki-winfs.kerckhoff.mpg.de\mkiwele$\allMARMoSET\MARMoSET_C\MARMoSET\obj\x64\Debug\MARMoSET.csprojAssemblyReference.cache
Binary file not shown.
Binary file modified MARMoSET_C/MARMoSET/obj/x64/Debug/MARMoSET.exe
Binary file not shown.
Binary file modified MARMoSET_C/MARMoSET/obj/x64/Debug/MARMoSET.pdb
Binary file not shown.
@@ -1 +1 @@
36b4f4454047f5ca5b82504e0b30315c189cb3c3
f2e199b9aef3cbda48b099284c4164caf57d681e
Expand Up @@ -61,3 +61,13 @@ P:\allMARMoSET\MARMoSET_C\MARMoSET\obj\x64\Release\MARMoSET.pdb
\\KI-S0138\Abt-A$\mkiwele\allMARMoSET\MARMoSET_C\MARMoSET\obj\x64\Release\MARMoSET.csproj.CopyComplete
\\KI-S0138\Abt-A$\mkiwele\allMARMoSET\MARMoSET_C\MARMoSET\obj\x64\Release\MARMoSET.exe
\\KI-S0138\Abt-A$\mkiwele\allMARMoSET\MARMoSET_C\MARMoSET\obj\x64\Release\MARMoSET.pdb
\\mpg-nki-winfs.kerckhoff.mpg.de\mkiwele$\allMARMoSET\MARMoSET_C\MARMoSET\bin\x64\Release\MARMoSET.exe.config
\\mpg-nki-winfs.kerckhoff.mpg.de\mkiwele$\allMARMoSET\MARMoSET_C\MARMoSET\bin\x64\Release\MARMoSET.exe
\\mpg-nki-winfs.kerckhoff.mpg.de\mkiwele$\allMARMoSET\MARMoSET_C\MARMoSET\bin\x64\Release\MARMoSET.pdb
\\mpg-nki-winfs.kerckhoff.mpg.de\mkiwele$\allMARMoSET\MARMoSET_C\MARMoSET\bin\x64\Release\Newtonsoft.Json.dll
\\mpg-nki-winfs.kerckhoff.mpg.de\mkiwele$\allMARMoSET\MARMoSET_C\MARMoSET\bin\x64\Release\Newtonsoft.Json.pdb
\\mpg-nki-winfs.kerckhoff.mpg.de\mkiwele$\allMARMoSET\MARMoSET_C\MARMoSET\bin\x64\Release\Newtonsoft.Json.xml
\\mpg-nki-winfs.kerckhoff.mpg.de\mkiwele$\allMARMoSET\MARMoSET_C\MARMoSET\obj\x64\Release\MARMoSET.csproj.CoreCompileInputs.cache
\\mpg-nki-winfs.kerckhoff.mpg.de\mkiwele$\allMARMoSET\MARMoSET_C\MARMoSET\obj\x64\Release\MARMoSET.csproj.CopyComplete
\\mpg-nki-winfs.kerckhoff.mpg.de\mkiwele$\allMARMoSET\MARMoSET_C\MARMoSET\obj\x64\Release\MARMoSET.exe
\\mpg-nki-winfs.kerckhoff.mpg.de\mkiwele$\allMARMoSET\MARMoSET_C\MARMoSET\obj\x64\Release\MARMoSET.pdb
Binary file modified MARMoSET_C/MARMoSET/obj/x64/Release/MARMoSET.exe
Binary file not shown.
Binary file modified MARMoSET_C/MARMoSET/obj/x64/Release/MARMoSET.pdb
Binary file not shown.

0 comments on commit 5f15a33

Please sign in to comment.