Coder Social home page Coder Social logo

alanrace / imzmlconverter Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 4.0 5.35 MB

Tool for converting mass spectrometry data to the imzML format.

Java 98.61% HTML 0.20% CSS 0.65% Batchfile 0.12% MATLAB 0.43%
converter converting-data imzml mass-spectrometry-imaging

imzmlconverter's People

Contributors

alanrace avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

imzmlconverter's Issues

[issue] trying to convert grd into imzml

Hi Alan,

I was trying to use this converter to go from grd to imzml using the code below:

C:\Users\tm6\Documents\GitHub\jimzMLConverter\target>java -jar jimzMLConverter-2.1.0.jar imzML -p "X:\Teresa\BEIS biofilms project sims data\Biofilm 1\ToF\GRD ToF\biofilm 1 tof negative1.properties.txt" "X:\Teresa\BEIS biofilms project sims data\Biofilm 1\ToF\GRD ToF\biofilm 1 tof negative1.itm.grd"

But I got the following error:

Mar 31, 2021 1:43:32 PM com.alanmrace.jimzmlconverter.MainCommand convert
INFO: Converting file X:\Teresa\BEIS biofilms project sims data\Biofilm 1\ToF\GRD ToF\biofilm 1 tof negative1.itm.grd
Mar 31, 2021 1:43:32 PM com.alanmrace.jimzmlconverter.MainCommand convert
INFO: Detected ION-TOF GRD file
Mar 31, 2021 1:43:32 PM com.alanmrace.jimzmlparser.obo.OBOTerm parse
INFO: Unknown value-type encountered 'value-type:xsd:dateTime "The allowed value-type for this CV term."' @ MS:1000747
Mar 31, 2021 1:43:32 PM com.alanmrace.jimzmlparser.obo.OBOTerm parse
INFO: Unknown value-type encountered 'value-type:xsd:dateTime "The allowed value-type for this CV term."' @ MS:1002435
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "com.alanmrace.jimzmlconverter.IONTOF.IONTOFProperty.getIntegerValue()" because "xDimension" is null
at com.alanmrace.jimzmlconverter.GRDToImzMLConverter.setPropertiesFile(GRDToImzMLConverter.java:98)
at com.alanmrace.jimzmlconverter.MainCommand.convert(MainCommand.java:287)
at com.alanmrace.jimzmlconverter.MainCommand.main(MainCommand.java:186)

Do you know what this means? Does it give us a clue on what is wrong with the grd file?

Thank you,
Teresa

Scan pattern meandering in command line tool

In the Gui Version 1.3 there is an option to select a meandering scan pattern.

I can't find this option in the command line tool, also after looking in the source code.
Is a meandering scan pattern still supported (or could it be added back in) ?

Make the latest version available on command line

It seems the GUI version does not use quite the same code as what is available in this repository.

I convert mzML produced by msconvert. The GUI version is able to produce a correct imzML output, supplying both the image dimensions, and a file with spectre positions. However, supplying both inputs is not allowed in the command line version. Moreover, it looks for "scan start date" tags in the mzML file and produces a fatal error if it is not present.

Would it be possible to update this repo with the currently used version in the GUI?

errors messages - @ MS:1002435 and @ MS:1000747

Hello, I am trying to convert ToF-SIMS data (.grd) to imzML using your jimzMLConverter-2.0.6 . However, I got only one file ( .imzML.ibdtmp file ) instead of .imzMLand .ibd files when I use the command

java -jar jimzMLConverter-2.0.6.jar imzML -p "D:\file.properties.txt" "D:\file.grd"

And then, fails to recognize some tags:

D:\imzMLconver\jimzMLConverter-2.0.6\jimzMLConverter\target>java -jar jimzMLConverter-2.0.6.jar imzML -p "D:\file.properties.txt" "D:\file.grd"
May 04, 2019 10:11:48 PM com.alanmrace.jimzmlconverter.MainCommand convert
INFO: Converting file D:\file.grd
May 04, 2019 10:11:48 PM com.alanmrace.jimzmlconverter.MainCommand convert
INFO: Detected ION-TOF GRD file
May 04, 2019 10:11:48 PM com.alanmrace.jimzmlparser.obo.OBOTerm parse
INFO: Unknown value-type encountered 'value-type:xsd:dateTime "The allowed value-type for this CV term."' @ MS:1000747
May 04, 2019 10:11:48 PM com.alanmrace.jimzmlparser.obo.OBOTerm parse
INFO: Unknown value-type encountered 'value-type:xsd:dateTime "The allowed value-type for this CV term."' @ MS:1002435
May 04, 2019 10:11:48 PM com.alanmrace.jimzmlconverter.MainCommand convert
INFO: Converting using (MS:1000576) no compression compression for m/z array
May 04, 2019 10:11:48 PM com.alanmrace.jimzmlconverter.ImzMLConverter convert
INFO: Generating base imzML
May 04, 2019 10:14:05 PM com.alanmrace.jimzmlconverter.ImzMLConverter convert
INFO: Generated base imzML

I am not sure what is wrong ,so could you fix it?

Combining mzML into single imzML output with command line

I figured out how to convert a single mzML file to imzML, however I am having trouble converting many mzML files into one imzML with the --combine (or -c) flag.

I can get the conversion to happen with the --image-dimensions flag, but the outfile only ever has the last mzML file that was converted (and the "max count of pixels y" is only ever "1").

Whether I use a wildcard:
java -jar jimzMLConverter-2.1.1.jar imzML path/to/files/*.mzML --image-dimensions 74 50 -o outfile

Or if I list multiple files:
java -jar jimzMLConverter-2.1.1.jar imzML path/to/files/file1.mzML path/to/files/file2.mzML path/to/files/file3.mzML --image-dimensions 74 3 -o outfile

I'm not sure whether to add the -c flag or use it instead of the --image-dimensions flag, but either way it throws an Exception error and nothing is converted (when I try to use a wildcard or list mzML files):

Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.String.substring(String.java:1967)
        at com.alanmrace.jimzmlparser.parser.ImzMLHandler.parseimzML(ImzMLHandler.java:180)
        at com.alanmrace.jimzmlparser.parser.ImzMLHandler.parseimzML(ImzMLHandler.java:156)
        at com.alanmrace.jimzmlconverter.ImzMLToImzMLConverter.getImageSizes(ImzMLToImzMLConverter.java:83)
        at com.alanmrace.jimzmlconverter.ImzMLToImzMLConverter.setImageGrid(ImzMLToImzMLConverter.java:97)
        at com.alanmrace.jimzmlconverter.MainCommand.convert(MainCommand.java:493)
        at com.alanmrace.jimzmlconverter.MainCommand.main(MainCommand.java:186)

@AlanRace, any direction you can provide would be greatly appreciated!

Request help for pattern file creation

I am trying to finish a pipeline that takes data collected on a combined Thermo Velos, Spectroglyph source, and Predator data station based acquisition into imzML. I am currently at the point where I have a Spectroglyph position file in XML and a mzML file from msconvert. I pulled the command list from the command line and that plus observation from other questions here, I have an idea about how to handle the syntax except for the -p command. Is there any guidance on how I can mimic an established file starting with an XML position file?

An outgoing research member left a small trial data set from a previous workflow. I will attach files from this test XML and an image to show the X-Y pattern that I hope to create. The actual images would of course contain many additional pixels. This work would provide a straight forward path for the users of the National FT-ICR MS User Facility to process their high resolution data imaging when combined with DataCubeExplorer and other imzML associated tools.

Thanks in advance,
Greg Blakney

pos3sPredatorSmall_positionFile.xml.txt
testPattern

how to convert Multiple file to one imzML file

docker run -it --rm -v /path:/mydata alanrace/imzmlconverter:latest jimzMLConverter imzML /mydata/*.raw -c 10 10
-c how to combine file,the parameter how to fill in。

this error
Feb 24, 2021 1:01:05 AM com.alanmrace.jimzmlparser.obo.OBOTerm parse
INFO: Unknown value-type encountered 'value-type:xsd:dateTime "The allowed value-type for this CV term."' @ MS:1000747
Feb 24, 2021 1:01:05 AM com.alanmrace.jimzmlparser.obo.OBOTerm parse
INFO: Unknown value-type encountered 'value-type:xsd:dateTime "The allowed value-type for this CV term."' @ MS:1002435

Problem with .obo files still persists in new release

Hi,

I left a comment with the already closed issue #10 , but depending on your notification settings you may not get notifications for comments in closed issues. Therefore I am opening a new issue.

As mentioned at the end of #10, unfortunately the new relase 2.1.1 doesn't solve the issue with the Download of the .obo files.
I still get an error message. The workaround of copying an existing Ontology folder with working .obo files into the working directory still works,

Containerized version of imzML

Hi,

Not an issue per se, but is there a containerized version of the converter? This website seems to mention one?!? Btw, I am interested in deploying the converter in Linux to generate imzML from Waters .raw files.

Cheers,
Gonçalo

combine multiple raw files to one imzML file.

Hi alan I am trying to combine multiple thermo .RAW file to make a single imzML file. But the imzML converter only convert the raw files to mzML.

I am, using the following code to convert

java -jar jimzMLConverter-2.1.1.jar imzML "filepath*raw"

and give the following message in log

C:\Users\Thermo\Downloads\jimzMLConverter-2.1.1>java -jar jimzMLConverter-2.1.1.jar imzML "C:\Users\Thermo\Downloads\jimzMLConverter-2.1.1\Rows*.raw"
May 31, 2023 11:35:50 AM com.alanmrace.jimzmlconverter.MainCommand convert
INFO: Converting file C:\Users\Thermo\Downloads\jimzMLConverter-2.1.1\Rows*.raw
May 31, 2023 11:35:50 AM com.alanmrace.jimzmlconverter.MainCommand generatemzMLFiles
INFO: Detected Thermo RAW file
Checking for latest version of ProteoWizard in C:\Users\Thermo\AppData\Local\Apps
"C:\Users\Thermo\AppData\Local\Apps\ProteoWizard 3.0.23146.4ef0614 64-bit\msconvert.exe" "C:\Users\Thermo\Downloads\jimzMLConverter-2.1.1\Rows*.raw" --zlib --simAsSpectra --srmAsSpectra -o "C:\Users\Thermo\Downloads\jimzMLConverter-2.1.1\Rows"

If I am using the wrong code to make an imzMl file, please suggest the written code. The image dimension should be x=320, y=300

Download of Ontology `.obo` fails . This causes an error when runnning jimzMlConverter

This is referring to the Release version 2.1.0 of the converter.
When trying to use the converter it produced the following error message (apologies for the screenshot, this was on a remote workstation so couldn't cut & paste the text):

image

I tracked this down to some of the download URLs for .obo ontology files not being valid anymore.
These are actually defined in another project (jimzMLParser):

https://github.com/AlanRace/jimzMLParser/blob/af30b68e71b8792d13cc026df37c46ab7e659815/src/main/java/com/alanmrace/jimzmlparser/obo/OBO.java#L26-L44

The pato.obo link in the source code above appears to be correct, but it appears the imzMLParser.jar that is bundled with the 2.1.0 is trying to download this file from a different URL which is now outdated.

I could restore functionality by adding the .obo files that were downloaded when doing a conversion in Sep 2021 to the Ontologies folder.

Got problem installation imzMLConverter

Got following problem after double double clicking run.bat or command line. Anyone seen it before. JDK have been installed and re-installed. Attempts have been tries on win7sp1pro and win10. Outcomes are the same.

F:\OneDrive****\imzML convertor\imzMLConverter_1.3>java -jar -Xmx1024m imzMLConverter.jar
Exception in thread "main" java.lang.RuntimeException: Unable to add the swt jar to the class path: F:\OneDrive\study material\Queens Taskforce\sciex staff\imzML convertor\imzMLConverter_1.3\swt\org.eclipse.swt.win32.win32.x86_64-4.3.jar
at imzMLConverter.gui.SWTLoader.loadSwtJar(SWTLoader.java:76)
at imzMLConverter.gui.SWTLoader.(SWTLoader.java:11)
at imzMLConverter.gui.SWTLoader.main(SWTLoader.java:18)
Caused by: java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap')
at imzMLConverter.gui.SWTLoader.loadSwtJar(SWTLoader.java:68)
... 2 more

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.