Concept error in Sum spectrum, changed to Mean spectrum
This commit is contained in:
parent
8e1c473acb
commit
2bd2e819a4
20
app.jl
20
app.jl
@ -54,7 +54,7 @@ include("./julia_imzML_visual.jl")
|
|||||||
@in btnSearch=false # To search for files in your device
|
@in btnSearch=false # To search for files in your device
|
||||||
@in mainProcess=false # To generate images
|
@in mainProcess=false # To generate images
|
||||||
@in compareBtn=false # To open dialog
|
@in compareBtn=false # To open dialog
|
||||||
@in createSumPlot=false # To generate sum spectrum plot
|
@in createMeanPlot=false # To generate mean spectrum plot
|
||||||
@in createXYPlot=false # To generate an spectrum plot according to the xy values inputed
|
@in createXYPlot=false # To generate an spectrum plot according to the xy values inputed
|
||||||
@in image3dPlot=false # To generate 3d plot based on current image
|
@in image3dPlot=false # To generate 3d plot based on current image
|
||||||
@in triq3dPlot=false # To generate 3d plot based on current triq image
|
@in triq3dPlot=false # To generate 3d plot based on current triq image
|
||||||
@ -290,13 +290,13 @@ include("./julia_imzML_visual.jl")
|
|||||||
# Splitting the route with regex from imzml to mzml so the plotting can work
|
# Splitting the route with regex from imzml to mzml so the plotting can work
|
||||||
full_routeMz=replace(full_route, r"\.[^.]*$" => ".mzML")
|
full_routeMz=replace(full_route, r"\.[^.]*$" => ".mzML")
|
||||||
if isfile(full_routeMz)
|
if isfile(full_routeMz)
|
||||||
# Start the sum spectrum creation on loading
|
# Start the mean spectrum creation on loading
|
||||||
progressSpectraPlot=true
|
progressSpectraPlot=true
|
||||||
btnPlotDisable=true
|
btnPlotDisable=true
|
||||||
btnStartDisable=true
|
btnStartDisable=true
|
||||||
msg="Loading SUM spectrum plot..."
|
msg="Loading mean spectrum plot..."
|
||||||
sTime=time()
|
sTime=time()
|
||||||
plotdata, plotlayout, xSpectraMz, ySpectraMz=sumSpectrumPlot(full_routeMz)
|
plotdata, plotlayout, xSpectraMz, ySpectraMz=meanSpectrumPlot(full_routeMz)
|
||||||
selectedTab="tab2"
|
selectedTab="tab2"
|
||||||
progressSpectraPlot=false
|
progressSpectraPlot=false
|
||||||
btnPlotDisable=false
|
btnPlotDisable=false
|
||||||
@ -319,13 +319,13 @@ include("./julia_imzML_visual.jl")
|
|||||||
btnSpectraDisable=false
|
btnSpectraDisable=false
|
||||||
SpectraEnabled=true
|
SpectraEnabled=true
|
||||||
if isfile(full_routeMz)
|
if isfile(full_routeMz)
|
||||||
# Start the sum spectrum creation on loading
|
# Start the mean spectrum creation on loading
|
||||||
progressSpectraPlot=true
|
progressSpectraPlot=true
|
||||||
btnPlotDisable=true
|
btnPlotDisable=true
|
||||||
btnStartDisable=true
|
btnStartDisable=true
|
||||||
msg="Loading SUM spectrum plot..."
|
msg="Loading mean spectrum plot..."
|
||||||
sTime=time()
|
sTime=time()
|
||||||
plotdata, plotlayout, xSpectraMz, ySpectraMz=sumSpectrumPlot(full_routeMz)
|
plotdata, plotlayout, xSpectraMz, ySpectraMz=meanSpectrumPlot(full_routeMz)
|
||||||
selectedTab="tab2"
|
selectedTab="tab2"
|
||||||
progressSpectraPlot=false
|
progressSpectraPlot=false
|
||||||
btnPlotDisable=false
|
btnPlotDisable=false
|
||||||
@ -469,15 +469,15 @@ include("./julia_imzML_visual.jl")
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@onbutton createSumPlot begin
|
@onbutton createMeanPlot begin
|
||||||
msg="Sum spectrum plot selected"
|
msg="Mean spectrum plot selected"
|
||||||
sTime=time()
|
sTime=time()
|
||||||
if isfile(full_routeMz) # Check if the file exists
|
if isfile(full_routeMz) # Check if the file exists
|
||||||
progressSpectraPlot=true
|
progressSpectraPlot=true
|
||||||
btnPlotDisable=true
|
btnPlotDisable=true
|
||||||
btnStartDisable=true
|
btnStartDisable=true
|
||||||
msg="Loading plot..."
|
msg="Loading plot..."
|
||||||
plotdata, plotlayout, xSpectraMz, ySpectraMz=sumSpectrumPlot(full_routeMz)
|
plotdata, plotlayout, xSpectraMz, ySpectraMz=meanSpectrumPlot(full_routeMz)
|
||||||
GC.gc() # Trigger garbage collection
|
GC.gc() # Trigger garbage collection
|
||||||
if Sys.islinux()
|
if Sys.islinux()
|
||||||
ccall(:malloc_trim, Int32, (Int32,), 0) # Ensure julia returns the freed memory to OS
|
ccall(:malloc_trim, Int32, (Int32,), 0) # Ensure julia returns the freed memory to OS
|
||||||
|
|||||||
@ -64,14 +64,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<q-list>
|
<q-list>
|
||||||
<q-item clickable v-close-popup v-on:click="createSumPlot=true">
|
<q-item clickable v-close-popup v-on:click="createMeanPlot=true">
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label>Sum Spectrum Plot</q-item-label>
|
<q-item-label>Mean spectrum plot</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item clickable v-close-popup v-on:click="createXYPlot=true">
|
<q-item clickable v-close-popup v-on:click="createXYPlot=true">
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label>Spectrum Plot (X,Y)</q-item-label>
|
<q-item-label>Spectrum plot (X,Y)</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
</q-list>
|
</q-list>
|
||||||
|
|||||||
@ -442,17 +442,17 @@ function padarray(A, padsize)
|
|||||||
return padded
|
return padded
|
||||||
end
|
end
|
||||||
|
|
||||||
# sumSpectrumPlot recieves the local directory of the image as a string,
|
# meanSpectrumPlot recieves the local directory of the image as a string,
|
||||||
# returns the layout and data for the surface plotly plot
|
# returns the layout and data for the surface plotly plot
|
||||||
# this function loads the spectra data and makes a mean to display
|
# this function loads the spectra data and makes a mean to display
|
||||||
# its values in the spectrum plot
|
# its values in the spectrum plot
|
||||||
function sumSpectrumPlot(mzmlRoute::String)
|
function meanSpectrumPlot(mzmlRoute::String)
|
||||||
spectraMz=LoadMzml(mzmlRoute)
|
spectraMz=LoadMzml(mzmlRoute)
|
||||||
xSpectraMz=Float64[]
|
xSpectraMz=Float64[]
|
||||||
ySpectraMz=Float64[]
|
ySpectraMz=Float64[]
|
||||||
|
|
||||||
layout=PlotlyBase.Layout(
|
layout=PlotlyBase.Layout(
|
||||||
title="SUM spectrum plot",
|
title="Mean spectrum plot",
|
||||||
xaxis=PlotlyBase.attr(
|
xaxis=PlotlyBase.attr(
|
||||||
title="<i>m/z</i>",
|
title="<i>m/z</i>",
|
||||||
showgrid=true,
|
showgrid=true,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user