Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combining mzML into single imzML output with command line #16

Open
fejacko opened this issue Oct 30, 2023 · 0 comments
Open

Combining mzML into single imzML output with command line #16

fejacko opened this issue Oct 30, 2023 · 0 comments

Comments

@fejacko
Copy link

fejacko commented Oct 30, 2023

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant