<commit_before>﻿Imports System.Runtime.CompilerServices
Imports Microsoft.VisualBasic.ComponentModel.Collection.Generic
Imports Microsoft.VisualBasic.ComponentModel.DataSourceModel.Repository
Imports Microsoft.VisualBasic.ComponentModel.DataSourceModel.SchemaMaps
Imports Microsoft.VisualBasic.Math.Scripting
Imports Microsoft.VisualBasic.Serialization.JSON

Public Class Library

    Public Property ID As String
    Public Property PrecursorMz As String
    Public Property ProductMz As String
    Public Property LibraryIntensity As String
    Public Property Name As String

    Public Overrides Function ToString() As String
        Return Me.GetJson
    End Function
End Class

Public Class ms2

    ''' <summary>
    ''' Molecular fragment m/z
    ''' </summary>
    ''' <returns></returns>
    <DataFrameColumn(NameOf(mz))>
    Public Property mz As Double
    ''' <summary><commit_msg>add xml code comments<commit_after>﻿Imports System.Runtime.CompilerServices
Imports Microsoft.VisualBasic.ComponentModel.Collection.Generic
Imports Microsoft.VisualBasic.ComponentModel.DataSourceModel.Repository
Imports Microsoft.VisualBasic.ComponentModel.DataSourceModel.SchemaMaps
Imports Microsoft.VisualBasic.Math.Scripting
Imports Microsoft.VisualBasic.Serialization.JSON

''' <summary>
''' MS2 fragment matrix
''' </summary>
Public Class Library

    ''' <summary>
    ''' Fragment ID in this matrix.
    ''' </summary>
    ''' <returns></returns>
    Public Property ID As String
    ''' <summary>
    ''' 前体离子的m/z
    ''' </summary>
    ''' <returns></returns>
    Public Property PrecursorMz As String
    ''' <summary>
    ''' 碎片的m/z
    ''' </summary>
    ''' <returns></returns>
    Public Property ProductMz As String
    ''' <summary>
    ''' 当前的这个碎片的信号强度
    ''' </summary>
    ''' <returns></returns>
    Public Property LibraryIntensity As String
    ''' <summary>
    ''' library name
    ''' </summary>
    ''' <returns></returns>
    Public Property Name As String

    Public Overrides Function ToString() As String
        Return $"[{ProductMz}, {LibraryIntensity}]"
    End Function
End Class

Public Class ms2

    ''' <summary>
    ''' Molecular fragment m/z
    ''' </summary>
    ''' <returns></returns>
    <DataFrameColumn(NameOf(mz))>
    Public Property mz As Double
    ''' <summary>
{'fraction_non_alphanumeric': 0.11168831168831168, 'fraction_numerical': 0.0012987012987012987, 'mean_word_length': 3.8045738045738045, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1443763', 'n_tokens_mistral': 626, 'n_tokens_neox': 629, 'n_words': 169}