I have installed GMAJ using:

wget http://globin.bx.psu.edu/dist/gmaj/gmaj.zip  -O output/software/gmaj.zip
unzip -u output/software/gmaj.zip -d output/software/gmaj/
rm output/software/gmaj.zip

I ran lastz on two chromosomes from two different assemblies of C. elegans:

lastz c_elegans.PRJNA13758.WS263.genomicI.fa I.fa --format=maf > MAF.maf

and got a MAF file.

Then, I tried to visualise the file using:

java -jar output/software/gmaj/gmaj.jar MAF.maf

but I got the following error:

Exception in thread "main" java.lang.ClassCastException: java.lang.StringBuffer cannot be cast to java.lang.String
    at edu.psu.bx.gmaj.MajGui.setDefaults(MajGui.java:272)
    at edu.psu.bx.gmaj.Maj.<init>(Maj.java:53)
    at edu.psu.bx.gmaj.MajMain.main(MajMain.java:86)

Can someone help me resolve this error or suggest an alternative way to visualise my alignment?

I work on Mac OS X.



1 Answer 1


It's a programming error that should look like this:

StringBuffer sb = (...)
String s = (String)sb;

while it should be

StringBuffer sb = (...)
String s = sb.toString();

( see also https://www.biostars.org/p/177992/ ) . You cannot do anything about it but asking the authors of the software.

  • $\begingroup$ Sent an email to Cathy Riemer asking for help. $\endgroup$ Commented Jul 11, 2018 at 11:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.