Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [chemclipse-dev] Help: display chromatogram during acquisition

You mean, e.g. scanning m/z 104.29893 takes 20 microseconds?
Do you scan over a range of e.g. m/z 28 to m/z 650?

Am 05.09.2016 um 11:31 schrieb Trig Chen:
Hi Philip,

This might be due to the cause  that the time of one scan less than 1 milliscan (it was just 20 microsecond).



Best regards,

Trig

2016-09-05 17:05 GMT+08:00 Philip Wenig <philip.wenig@xxxxxxxxxxxxx>:
Trig,

your chromatogram (tideMS20160831215604.tms) looks odd due to the following reason: Have a look at the retention time of each scan.

Here's a System.out.println of the retention time (milliseconds) and the TIC when parsing the file:

0    0.0
0    7.0192876E9
97    7.0198062E9
194    7.020417E9
291    7.0204462E9
389    7.0214676E9
486    7.0210243E9
583    7.0207713E9
680    7.0216013E9
778    7.0217242E9
875    7.0210365E9
972    7.021568E9
1070    7.021483E9
1167    7.0211174E9
1264    7.0205414E9
1361    7.0223048E9
1459    7.0224993E9
1556    7.0232392E9
1653    7.0236396E9
1751    7.0227553E9
1848    7.0240435E9
1945    7.0234102E9
2042    7.0237932E9
2140    7.0236948E9
0    7.0227794E9
0    7.0228864E9
0    7.0235643E9
0    7.0240317E9
0    7.0229335E9
0    7.0240645E9
0    7.0224072E9
0    7.0197504E9
0    7.0207852E9
0    7.0216801E9
0    7.0224471E9
0    7.0209347E9
0    7.0209951E9
0    7.0228608E9
...

That can't work, cause retention times are 0.


Best,
Philip



Am 02.09.2016 um 02:14 schrieb Trig Chen:
The *.tms file has been attached in the 7th message of this session.

Best regards,

Trig

2016-09-02 3:30 GMT+08:00 Philip Wenig <philip.wenig@xxxxxxxxxxxxx>:

Trig,

I'll have a look at it.

Could you send me a test *.tms file which fails to be displayed.

Best,
Philip


Am 01.09.2016 2:34 nachm. schrieb Trig Chen <trigchen@xxxxxxxxx>:
The MSD and MSDWriter:
org.eclipse.chemclipse.msd.model.implementation.ChromatogramMSD.ChromatogramMSD
org.eclipse.chemclipse.msd.converter.supplier.chemclipse.io.ChromatogramWriterMSD

Yes. I've gotten reply from Jan. He creates a new View Part org.chromulan.system.control.ui.chromatogram.ChromatogramViewer to show the new scan of chromatogram. In ChromatogramViewer, class org.chromulan.system.control.ui.chromatogram.ChromatogramOverviewUI does the graphical work.
When acquisition done, open the ChromatogramEditorCSD manually. He also recorded a video to show the steps:  http://leteckaposta.cz/131205367
It is helpful although  it is not the exact way I want. 
I'm still struggling on it. 


Best regards,

Trig

2016-09-01 19:18 GMT+08:00 Philip Wenig <philip.wenig@xxxxxxxxxxxxx>:
Which "ChromatogramWriterMSD" do you use?
Did you get a feedback from Jan (the CHROMuLAN developer) already?


Best,
Philip


Am 01.09.2016 um 09:34 schrieb Trig Chen:
Sorry for codes missing.

final File file = new File("C:\\Temp\\blank.ocb");
final IChromatogramMSD msd = new ChromatogramMSD();
final ChromatogramWriterMSD writer = new ChromatogramWriterMSD();
try {
writer.writeChromatogram(file, msd, new NullProgressMonitor());
} catch(final Exception e2) {
// TODO: handle exception
}


Best regards,

Trig

2016-09-01 15:00 GMT+08:00 Trig Chen <trigchen@xxxxxxxxx>:
I used the following code to generate a blank ChromatogramMSD file, and then opened it in OpenChrom. The Editor part just displayed problem information but not an empty and blank chromatogram figure.

In my data acquisition case, I press the acquisition button and new a blank ChromatogramMSD object. If I immediately open a new ChromatogramMSD Editor with this chromatogram object held, what will hapen? If I update this object with one scan adding, what wil happen to the Editor?


Best regards,

Trig

2016-08-31 22:16 GMT+08:00 Trig Chen <trigchen@xxxxxxxxx>:
In Editor Area, the left part is create by pressing "Start Acquire" button in control pane, the right part is created by opening the file acquired and saved to disk. 
There were many "Given range is invalid" errors printed in Console View:
java.lang.IllegalArgumentException: Given range is invalid
at org.swtchart.internal.axis.Axis.setRange(Axis.java:190)
at org.swtchart.internal.axis.Axis.setRange(Axis.java:156)
at org.eclipse.chemclipse.swt.ui.support.ChartUtil.checkAndSetRange(ChartUtil.java:92)
at org.eclipse.chemclipse.msd.swt.ui.components.AbstractBarSeriesUI.redraw(AbstractBarSeriesUI.java:292)
at org.eclipse.chemclipse.thirdpartylibraries.swtchart.ext.InteractiveChartExtended.handleEvent(InteractiveChartExtended.java:83)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

It seems the problem of no acquired chromatogram displayed is caused by the "Given range is invalid" errors.

When I double clicked on the figure of right part, the chromatogram displayed as a red rectangle. 
Even I right clicked on the figure and select "Reset 1:1", the rectangle stayed with no change. :(. 
There were no more error printed as I right clicked or double clicked.


Best regards,

Trig

2016-08-31 21:40 GMT+08:00 Trig Chen <trigchen@xxxxxxxxx>:
Following is my open/create EditorMSD code:

=====================================================================
final TideMSChromatogram tideMSChromatogram = new TideMSChromatogram();
tideMSChromatogram.setFile(saveFile);
final ZipBufferWriter writer = new ZipBufferWriter(saveFile);
// ****
openMSDEditor(tideMSChromatogram); 
//***
for(int i = 0; i < usbDevice.getSpectraNumber(); i++) {
usbDevice.acquireMassSpectrum(tideMSChromatogram, writer, i);
}
writer.writeOverviewFolder(tideMSChromatogram);

=====================================================================
private void openMSDEditor(final IChromatogram chromatogram) {

new UIJob("Open MSD Editor") {

@Override
public IStatus runInUIThread(final IProgressMonitor monitor) {

MPart editor = findMSDEditor(chromatogram);
if(editor == null) {
editor = createMSDEditor(chromatogram);
} else {
editor.setObject(chromatogram);
partService.showPart(editor, PartState.ACTIVATE);
}
return Status.OK_STATUS;
}
}.schedule();
}

=====================================================================
private MPart findMSDEditor(final IChromatogram chromatogram) {

final Iterator<MPart> it = partService.getParts().iterator();
while(it.hasNext()) {
final MPart part = it.next();
if(ChromatogramEditorMSD.CONTRIBUTION_URI.equals(part.getContributionURI())) {
final Object obj = part.getObject();
if(obj instanceof IChromatogram) {
final File file1 = ((IChromatogram)obj).getFile();
final File file2 = chromatogram.getFile();
if((file1 != null) && (file2 != null) && file1.getAbsolutePath().equals(file2.getAbsolutePath())) {
return part;
}
}
}
}
return null;
}

=====================================================================

Best regards,

Trig

2016-08-31 21:34 GMT+08:00 Trig Chen <trigchen@xxxxxxxxx>:

2016-08-31 14:53 GMT+08:00 Philip Wenig <philip.wenig@xxxxxxxxxxxxx>:
When recording the chromatogram, you could use your chromatogram object to display the data and fire the updates, see how the chromatogram editor is created. It requires a file or an IChromatogramMSD instance:

org.eclipse.chemclipse.ux.extension.msd.ui.editors.ChromatogramEditorMSD

    private void loadChromatogram() {

        try {
            /*
             * Import the chromatogram without showing it on the gui. The GUI
             * will take care itself of this action.
             */
            Object object = part.getObject();
            if(object instanceof String) {
                /*
                 * Try to load the chromatogram from file.
                 */
                File file = new File((String)object);
                importChromatogram(file);
            } else if(object instanceof IChromatogramMSD) {
                IChromatogramMSD chromatogram = (IChromatogramMSD)object;
                chromatogramSelection = new ChromatogramSelectionMSD(chromatogram);
It seems the chromatogramSelection field is very important and should not be absent.
 I created an EditorMSD and set it's object to chromatogram. But I don't know how to create a chromatogramSelection for the EditorMSD. There is not a setter method to set chromatogramSelection. :(.

                chromatogramFile = null;  
Why set chromatogramFile to null?
 
            }
        } catch(Exception e) {
            logger.warn(e);
        }
    }

Have a look at the convenient class that helps to open a chromatogram from file or from instance:

org.eclipse.chemclipse.ux.extension.msd.ui.support.ChromatogramEditorSupport

public void openEditor(IChromatogram chromatogram, EModelService modelService, MApplication application, EPartService partService) {
...

Please also check, that the retention time (in milliseconds) is set in each scan of your chromatogram.


Best,
Philip









_______________________________________________
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
_______________________________________________
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