Data Export

JuChrom.InputOutput.DelimitedTextWriter.DelimitedTextType
DelimitedText(; delim::Union{AbstractChar, AbstractString}="\t") <: Fileformat

Return a DelimitedText file format object. The optional delim keyword argument allows you to specify the column delimiter, which can be either a single character or a string. If the provided filename lacks a suffix, an appropriate one will be automatically appended.

See also FileFormat, exportdata.

Examples

julia> DelimitedText()
DelimitedText{String}("	")

julia> DelimitedText(delim=';')
DelimitedText{Char}(';')
source
JuChrom.InputOutput.ExcelWriter.ExcelType
Excel(; sheetname::AbstractString) <: FileFormat

Returns an Excel file format object. The optional keyword argument sheetname allows you to specify the name of the sheet to operate on.

See also FileFormat, exportdata.

Examples

julia> Excel()
Excel{Nothing}(nothing)

julia> Excel(sheetname="TIC")
Excel{String}("TIC")
source
JuChrom.InputOutput.exportdataMethod
exportdata(chrom::AbstractChrom, file::AbstractString, fileformat::FileFormat; 
timeunit::Unitful.TimeUnits, overwrite::Bool=false)

Export the scan times and corresponding intensity values from the AbstractChrom object to a file in the specified format. If the AbstractChrom object includes a RiMapper, it will also export retention indices to the file. The optional timeunit parameter allows you to define the unit of measurement for the scan times in the output. All time units supported by the package Unitful.jl (e.g., u"s", u"minute") can be used. Additionally, the optional overwrite keyword argument specifies whether an existing target file should be overwritten.

See also AbstractChrom, DelimitedText, Excel.

Examples

julia> chrom = Chrom((1:3)u"minute", [123, 224, 103])
Chrom {scan times: Int64, intensities: Int64}
3 scans; scan times: 1 minute, 2 minute, 3 minute
intensity range: 103 - 224
metadata: 0 entries

julia> exportdata(chrom, "./delimtest", DelimitedText());

julia> exportdata(chrom, "./exceltest", Excel(sheetname="TIC"));
source
JuChrom.InputOutput.exportdataMethod
exportdata(chrom::AbstractChromMS, file::AbstractString, fileformat::FileFormat; 
timeunit::Unitful.TimeUnits, overwrite::Bool=false)

Export the scan times, ions, and corresponding intensity values from the AbstractChromMS object to a file in the specified format. If the AbstractChromMS object includes a RiMapper, it will also export retention indices to the file. The optional timeunit parameter allows you to define the unit of measurement for the scan times in the output. All time units supported by the package Unitful.jl (e.g., u"s", u"minute") can be used. Additionally, the optional overwrite keyword argument specifies whether an existing target file should be overwritten.

See also AbstractChromMS, DelimitedText, Excel.

Examples

julia> chrom = Chrom((1:3)u"minute", [123, 224, 103])
Chrom {scan times: Int64, intensities: Int64}
3 scans; scan times: 1 minute, 2 minute, 3 minute
intensity range: 103 - 224
metadata: 0 entries

julia> exportdata(chrom, "./delimtest", DelimitedText());

julia> exportdata(chrom, "./exceltest", Excel(sheetname="GCMS"));
source