Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [chemclipse-dev] Question about AbstractVendorMassSpectrumProxy class

Overwriting methods would be better. Copy & Paste causes problems which are hard to resolve and code that is hard to maintain. As the method is private, please inspect which methods use the private method and overwrite them. It also helps to understand how the core works.


Best,
Philip


Am 20.10.2016 um 09:48 schrieb Trig Chen:
Hi Philip,

Yes, your consideration is reasonable. Since the isProxy is a private
field and has no method to modify it, I did not extend
AbstractVendorMassSpectrumProxy class. I just copy it to my package
and add a setter for isProxy field. After I have calibrated the m/z
conversion factors, I iteratively set all scan's isProxy to true to
force them to reload if them are reaccess later. :)

Best regards,

Trig


2016-10-20 15:30 GMT+08:00 Philip Wenig <philip.wenig@xxxxxxxxxxxxx>:
Hi Trig,

this could cause some implications which would decrease the performance
tremendously.
Think of a loop where one looks for a certain m/z values. Each time, the
scan would be loaded and discarded and the loaded again and again. If it
stays in memory, no further I/O operation is needed.

I don't want to activate additional in the core platform where I'm not sure
if there are unwanted side-effects. Anyhow, feel free to overwrite the
methods in your own class and add your specific functionality. If that works
fine, let's see if we can refactor the core.


Best,
Philip


Am 20.10.2016 um 09:23 schrieb Trig Chen:

Hi Philip,

In most cases, such as processing data in OpenChrom, it would be good
loading once data from file through proxy and thereafter access this data in
memory. In my case, my data is acquired from spectrometer and then written
to file and sent to GUI for display. That means all scans are gotten access
and loaded! I prefer to release the scan after it was shown. If user clicks
the TIC plot and recall the related scan, I can reload it from file again.
So, it would be good if AbstractVendorMassSpectrumProxy class has the
ability to access data through proxy always, not just once.






Best regards,

Trig

2016-10-19 17:08 GMT+08:00 Philip Wenig <philip.wenig@xxxxxxxxxxxxx>:
Hi Trig,

that's correct.

When analyzing huge files > 1 GB, the performance would be miserable if
each scan is loaded in advance. Hence, it shall be loaded only when it is
needed. Each vendor supplier best knows on his own ho to extract the data
from a scan, when it's needed (e.g. only he knows the byte position in the
file where the requested scan is located). The member variable is set to
true after successfully loading the file. I've explicitly not added a method
to set this to false again, cause the scan is loaded after running the
"checkProxyAndImportOnDemand()" method. So it's not a proxy anymore
afterwards.


Best,
Philip



Am 19.10.2016 um 10:57 schrieb Trig Chen:

Hi all,

The class
org.eclipse.chemclipse.msd.model.core.AbstractVendorMassSpectrumProxy has
one private boolean type field "isProxy" with true initial value. This value
is changed to false as method checkProxyAndImportOnDemand() called.
checkProxyAndImportOnDemand method does the import ions job and then set
isProxy to false. Then isProxy stays false always and will never change to
true again. That means I can't import ions again.

private void checkProxyAndImportOnDemand() {

if(isProxy) {
isProxy = false;
importIons();
}
}

In my case, I firstly import ions and find the m/z values incorrect, so I
make a m/z calibration on current mass spectrum. Here comes the problem, I
can't reimport ions for current mass spectrum or any other spectra because
isProxy is false. There is not a way to set isProxy to true in
AbstractVendorMassSpectrumProxy class.


Best regards,

Trig


_______________________________________________
chemclipse-dev mailing list
chemclipse-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/chemclipse-dev

--
~~~~~~~~~~~~~~~~~~~~~~~~
OpenChrom - the open source alternative for chromatography / mass
spectrometry
Dr. Philip Wenig » Founder » philip.wenig@xxxxxxxxxxxxx »
http://www.openchrom.net
~~~~~~~~~~~~~~~~~~~~~~~~

_______________________________________________ chemclipse-dev mailing
list chemclipse-dev@xxxxxxxxxxx To change your delivery options, retrieve
your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/chemclipse-dev
_______________________________________________
chemclipse-dev mailing list
chemclipse-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from
this list, visit
https://dev.eclipse.org/mailman/listinfo/chemclipse-dev

--
~~~~~~~~~~~~~~~~~~~~~~~~
OpenChrom - the open source alternative for chromatography / mass
spectrometry
Dr. Philip Wenig » Founder » philip.wenig@xxxxxxxxxxxxx »
http://www.openchrom.net
~~~~~~~~~~~~~~~~~~~~~~~~


_______________________________________________
chemclipse-dev mailing list
chemclipse-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from
this list, visit
https://dev.eclipse.org/mailman/listinfo/chemclipse-dev

_______________________________________________
chemclipse-dev mailing list
chemclipse-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/chemclipse-dev

--
~~~~~~~~~~~~~~~~~~~~~~~~
OpenChrom - the open source alternative for chromatography / mass spectrometry
Dr. Philip Wenig » Founder » philip.wenig@xxxxxxxxxxxxx » http://www.openchrom.net
~~~~~~~~~~~~~~~~~~~~~~~~



Back to the top