Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/xieguigang/mzkit
Browse files Browse the repository at this point in the history
  • Loading branch information
xieguigang committed Dec 9, 2024
2 parents 775d58e + ee94b2c commit b517680
Show file tree
Hide file tree
Showing 38 changed files with 122 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,18 @@ Imports Microsoft.VisualBasic.Imaging.Drawing2D.Colors
Imports Microsoft.VisualBasic.Language
Imports Microsoft.VisualBasic.Linq
Imports Microsoft.VisualBasic.MIME.Html.CSS
Imports Microsoft.VisualBasic.MIME.Html.Render
Imports Microsoft.VisualBasic.Scripting.MetaData
Imports Microsoft.VisualBasic.Scripting.Runtime
Imports R_graphics.Common.Runtime
Imports SMRUCC.Rsharp.Runtime
Imports SMRUCC.Rsharp.Runtime.Components
Imports SMRUCC.Rsharp.Runtime.Internal.Invokes
Imports SMRUCC.Rsharp.Runtime.Internal.Object
Imports SMRUCC.Rsharp.Runtime.Interop
Imports SMRUCC.Rsharp.Runtime.Vectorization
Imports RgraphicsDev = R_graphics.Common.Runtime.graphicsDevice
Imports std = System.Math
Imports RInternal = SMRUCC.Rsharp.Runtime.Internal
Imports R_graphics.Common.Runtime
Imports Microsoft.VisualBasic.MIME.Html.Render


Imports std = System.Math

#If NET48 Then
Imports Pen = System.Drawing.Pen
Expand Down Expand Up @@ -118,6 +115,7 @@ Imports GraphicsPath = Microsoft.VisualBasic.Imaging.GraphicsPath
Imports FontStyle = Microsoft.VisualBasic.Imaging.FontStyle
#End If


''' <summary>
''' spatial tissue region handler
'''
Expand All @@ -135,6 +133,7 @@ Module TissueMorphology
Call RInternal.generic.add("plot", GetType(TissueRegion()), AddressOf PlotTissueMap)
End Sub

<RGenericOverloads("as.data.frame")>
Private Function createTissueTable(tissues As TissueRegion(), args As list, env As Environment) As dataframe
Dim labels As String() = tissues _
.Select(Function(i) i.label.Replicate(n:=i.nsize)) _
Expand Down Expand Up @@ -164,14 +163,15 @@ Module TissueMorphology
}
End Function

<RGenericOverloads("as.data.frame")>
Private Function createUMAPTable(umap As UMAPPoint(), args As list, env As Environment) As dataframe
Dim px As Integer() = umap.Select(Function(i) i.Pixel.X).ToArray
Dim py As Integer() = umap.Select(Function(i) i.Pixel.Y).ToArray
Dim x As Double() = umap.Select(Function(i) i.x).ToArray
Dim y As Double() = umap.Select(Function(i) i.y).ToArray
Dim z As Double() = umap.Select(Function(i) i.z).ToArray
Dim cluster As Integer() = umap _
.Select(Function(i) Integer.Parse(i.class)) _
Dim cluster As String() = umap _
.Select(Function(i) i.class) _
.ToArray

Return New dataframe With {
Expand All @@ -189,6 +189,7 @@ Module TissueMorphology
}
End Function

<RGenericOverloads("plot")>
Public Function PlotTissueMap(tissue As TissueRegion(), args As list, env As Environment) As Object
If args.CheckGraphicsDeviceExists Then
' draw on current graphics context
Expand Down
18 changes: 18 additions & 0 deletions Rscript/Library/mzkit_app/vignettes/mzkit/TissueMorphology.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,24 @@ <h1>TissueMorphology</h1>
<table class="table-three-line">
<caption>.NET clr function exports</caption>
<tbody><tr>
<td id="as.data.frame.tissueregion">
<a href="./TissueMorphology/as.data.frame.tissueregion.html">as.data.frame.tissueregion</a>
</td>
<td><a href="/vignettes/clr/BioNovoGene/Analytical/MassSpectrometry/MsImaging/TissueMorphology/TissueRegion.html">TissueRegion</a>: <p>a tissue polygon region object</p></td>
</tr>
<tr>
<td id="as.data.frame.umappoint">
<a href="./TissueMorphology/as.data.frame.umappoint.html">as.data.frame.umappoint</a>
</td>
<td><a href="/vignettes/clr/BioNovoGene/Analytical/MassSpectrometry/MsImaging/TissueMorphology/UMAPPoint.html">UMAPPoint</a>: <p>3d scatter data point, a spatial spot or a single cell data</p></td>
</tr>
<tr>
<td id="plot.tissueregion">
<a href="./TissueMorphology/plot.tissueregion.html">plot.tissueregion</a>
</td>
<td><a href="/vignettes/clr/BioNovoGene/Analytical/MassSpectrometry/MsImaging/TissueMorphology/TissueRegion.html">TissueRegion</a>: <p>a tissue polygon region object</p></td>
</tr>
<tr>
<td id="tag_samples">
<a href="./TissueMorphology/tag_samples.html">tag_samples</a>
</td>
Expand Down
4 changes: 4 additions & 0 deletions src/assembly/BrukerDataReader/BrukerDataReader.NET5.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\GCModeller\src\runtime\sciBASIC#\Data\BinaryData\BinaryData\binarydata-netcore5.vbproj" />
<ProjectReference Include="..\..\..\..\GCModeller\src\runtime\sciBASIC#\Data\BinaryData\SQLite3\SQLite3.vbproj" />
Expand Down
4 changes: 4 additions & 0 deletions src/assembly/Comprehensive/Comprehensive.NET5.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -164,5 +164,9 @@
<Import Include="System.Data" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
</ItemGroup>


</Project>
4 changes: 4 additions & 0 deletions src/assembly/LoadR.NET5/LoadR.NET5.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\GCModeller\src\R-sharp\R#\Rsharp-netcore5.vbproj" />
<ProjectReference Include="..\..\..\..\GCModeller\src\R-sharp\studio\RData\RData.NET5.vbproj" />
Expand Down
4 changes: 4 additions & 0 deletions src/assembly/NMRFidTool/NMRFidTool.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\GCModeller\src\runtime\sciBASIC#\Data\BinaryData\BinaryData\binarydata-netcore5.vbproj" />
<ProjectReference Include="..\..\..\..\GCModeller\src\runtime\sciBASIC#\Data_science\Mathematica\Math\DataFittings\linear-netcore5.vbproj" />
Expand Down
1 change: 1 addition & 0 deletions src/assembly/SignalReader/SignalReader.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

<ItemGroup>
<PackageReference Include="System.Composition" Version="8.0.0" />
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
<PackageReference Include="System.Resources.Extensions" Version="8.0.0" />
</ItemGroup>

Expand Down
4 changes: 4 additions & 0 deletions src/assembly/SpectrumTree/spectrumTree.NETCore5.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\GCModeller\src\runtime\sciBASIC#\Data\BinaryData\BinaryData\binarydata-netcore5.vbproj" />
<ProjectReference Include="..\..\..\..\GCModeller\src\runtime\sciBASIC#\Data\BinaryData\HDSPack\HDSPack.vbproj" />
Expand Down
4 changes: 4 additions & 0 deletions src/assembly/ThermoRawFileReader/MSFileReader.NET5.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\GCModeller\src\runtime\sciBASIC#\Data_science\Mathematica\Math\Math\Math.NET5.vbproj" />
<ProjectReference Include="..\..\..\..\GCModeller\src\runtime\sciBASIC#\Data_science\Mathematica\SignalProcessing\SignalProcessing\signalprocessing-netcore5.vbproj" />
Expand Down
1 change: 1 addition & 0 deletions src/assembly/assembly/assembly-netcore5.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@

<ItemGroup>
<PackageReference Include="System.Composition" Version="8.0.0" />
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
<PackageReference Include="System.Resources.Extensions" Version="8.0.0" />
</ItemGroup>

Expand Down
1 change: 1 addition & 0 deletions src/assembly/mzPack/mzpack.NET5.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@

<ItemGroup>
<PackageReference Include="System.Composition" Version="8.0.0" />
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
<PackageReference Include="System.Resources.Extensions" Version="8.0.0" />
</ItemGroup>

Expand Down
6 changes: 6 additions & 0 deletions src/assembly/mzPackExtensions/mzPackExtensions.NET5.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,10 @@
</Reference>
</ItemGroup>



<ItemGroup>
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@

<ItemGroup>
<PackageReference Include="System.Composition" Version="8.0.0" />
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
<PackageReference Include="System.Resources.Extensions" Version="8.0.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,10 @@
<Import Include="System.Data" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\GCModeller\src\runtime\sciBASIC#\Data_science\Graph\graph-netcore5.vbproj" />
<ProjectReference Include="..\..\..\..\GCModeller\src\runtime\sciBASIC#\Data_science\Mathematica\Math\Math.Statistics\stats-netcore5.vbproj" />
Expand Down
1 change: 1 addition & 0 deletions src/metadb/Massbank/massbank.NET5.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@

<ItemGroup>
<PackageReference Include="System.Composition" Version="8.0.0" />
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
<PackageReference Include="System.Resources.Extensions" Version="8.0.0" />
</ItemGroup>

Expand Down
4 changes: 4 additions & 0 deletions src/metadb/MoNA/MoNA.NET5.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,8 @@
<Import Include="System.Data" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
</ItemGroup>

</Project>
4 changes: 4 additions & 0 deletions src/metadb/SMILES/SMILES.NET5.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,8 @@
<Import Include="System.Data" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
</ItemGroup>

</Project>
4 changes: 4 additions & 0 deletions src/metadb/XrefEngine/XrefEngine.NET5.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,8 @@
<Import Include="System.Data" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
</ItemGroup>

</Project>
4 changes: 4 additions & 0 deletions src/metadna/MetaDNA_visual/metaDNA_visual.NET5.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\GCModeller\src\GCModeller\core\Bio.Assembly\biocore-netcore5.vbproj" />
<ProjectReference Include="..\..\..\..\GCModeller\src\runtime\sciBASIC#\Data_science\Graph\graph-netcore5.vbproj" />
Expand Down
1 change: 1 addition & 0 deletions src/metadna/metaDNA/metaDNA.NET5.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@

<ItemGroup>
<PackageReference Include="System.Composition" Version="8.0.0" />
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
<PackageReference Include="System.Resources.Extensions" Version="8.0.0" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/mzkit
Submodule mzkit updated from 1f5123 to 059466
4 changes: 4 additions & 0 deletions src/mzmath/GCxGC/GCxGC.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
<Configurations>Debug;Release;LipidSearch;mzkit;Rsharp_app_release</Configurations>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\GCModeller\src\runtime\sciBASIC#\Data_science\Mathematica\Math\Math\Math.NET5.vbproj" />
<ProjectReference Include="..\..\..\..\GCModeller\src\runtime\sciBASIC#\Data_science\Mathematica\SignalProcessing\SignalProcessing\signalprocessing-netcore5.vbproj" />
Expand Down
1 change: 1 addition & 0 deletions src/mzmath/MSEngine/MSEngine.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@

<ItemGroup>
<PackageReference Include="System.Composition" Version="8.0.0" />
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
<PackageReference Include="System.Resources.Extensions" Version="8.0.0" />
</ItemGroup>

Expand Down
1 change: 1 addition & 0 deletions src/mzmath/MSFinder/MSFinder.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@

<ItemGroup>
<PackageReference Include="System.Composition" Version="8.0.0" />
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
<PackageReference Include="System.Resources.Extensions" Version="8.0.0" />
</ItemGroup>

Expand Down
4 changes: 4 additions & 0 deletions src/mzmath/MoleculeNetworking/MoleculeNetworking.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,10 @@
<None Remove="NewFolder\**" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\GCModeller\src\runtime\sciBASIC#\Data\BinaryData\BinaryData\binarydata-netcore5.vbproj" />
<ProjectReference Include="..\..\..\..\GCModeller\src\runtime\sciBASIC#\Data\BinaryData\HDSPack\HDSPack.vbproj" />
Expand Down
1 change: 1 addition & 0 deletions src/mzmath/Mummichog/Mummichog.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@

<ItemGroup>
<PackageReference Include="System.Composition" Version="8.0.0" />
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
<PackageReference Include="System.Resources.Extensions" Version="8.0.0" />
</ItemGroup>

Expand Down
1 change: 1 addition & 0 deletions src/mzmath/SingleCells/SingleCells.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

<ItemGroup>
<PackageReference Include="System.Composition" Version="8.0.0" />
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
<PackageReference Include="System.Resources.Extensions" Version="8.0.0" />
</ItemGroup>

Expand Down
1 change: 1 addition & 0 deletions src/mzmath/SpatialMath/SpatialMath.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

<ItemGroup>
<PackageReference Include="System.Composition" Version="8.0.0" />
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
<PackageReference Include="System.Resources.Extensions" Version="8.0.0" />
</ItemGroup>

Expand Down
4 changes: 4 additions & 0 deletions src/mzmath/TargetedMetabolomics/Targetted.NET5.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,8 @@
<Import Include="System.Data" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions src/mzmath/ms2_math-core/mzmath-netcore5.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@

<ItemGroup>
<PackageReference Include="System.Composition" Version="8.0.0" />
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
<PackageReference Include="System.Resources.Extensions" Version="8.0.0" />
</ItemGroup>

Expand Down
4 changes: 4 additions & 0 deletions src/mzmath/ms2_simulator/ms2_simulator.NET5.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@
<Import Include="System.Data" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\GCModeller\src\runtime\sciBASIC#\Data\Trinity\Trinity.NET5.vbproj" />
<ProjectReference Include="..\..\..\..\GCModeller\src\runtime\sciBASIC#\Data\word2vec\word2vec.vbproj" />
Expand Down
1 change: 1 addition & 0 deletions src/mzmath/mz_deco/deconv.NET5.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@

<ItemGroup>
<PackageReference Include="System.Composition" Version="8.0.0" />
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
<PackageReference Include="System.Resources.Extensions" Version="8.0.0" />
</ItemGroup>

Expand Down
4 changes: 4 additions & 0 deletions src/visualize/ComprehensiveMsPlot/ComprehensiveMsPlot.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
<Configurations>Debug;Release;LipidSearch;mzkit;Rsharp_app_release</Configurations>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\GCModeller\src\runtime\sciBASIC#\gr\Microsoft.VisualBasic.Imaging\imaging.NET5.vbproj" />
<ProjectReference Include="..\..\..\..\GCModeller\src\runtime\sciBASIC#\Microsoft.VisualBasic.Core\src\Core.vbproj" />
Expand Down
2 changes: 1 addition & 1 deletion src/visualize/KCF
Submodule KCF updated from 83ebba to d7adbf
1 change: 1 addition & 0 deletions src/visualize/MsImaging/MsImaging.NET5.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@

<ItemGroup>
<PackageReference Include="System.Composition" Version="8.0.0" />
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
<PackageReference Include="System.Resources.Extensions" Version="8.0.0" />
</ItemGroup>

Expand Down
4 changes: 4 additions & 0 deletions src/visualize/SDF.Extensions/SDF.Extensions.NET5.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,8 @@
<Import Include="System.Data" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
</ItemGroup>

</Project>
Loading

0 comments on commit b517680

Please sign in to comment.