This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Help with Fastqc error

Hi, people.

$sudo fastqc abc.basecaller.bam -o /mgm_test/

Exception in thread "main" java.lang.NoClassDefFoundError: htsjdk/samtools/SAMFormatException
        at uk.ac.babraham.FastQC.Sequence.SequenceFactory.getSequenceFile(SequenceFactory.java:100)
        at uk.ac.babraham.FastQC.Sequence.SequenceFactory.getSequenceFile(SequenceFactory.java:62)
        at uk.ac.babraham.FastQC.Analysis.OfflineRunner.processFile(OfflineRunner.java:129)
        at uk.ac.babraham.FastQC.Analysis.OfflineRunner.<init>(OfflineRunner.java:102)
        at uk.ac.babraham.FastQC.FastQCApplication.main(FastQCApplication.java:316)
Caused by: java.lang.ClassNotFoundException: htsjdk.samtools.SAMFormatException
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 5 more

Somebody help me...what's wrong here?

fastqc htsjdk

I am getting the same error. Anyone knows the solution? help!

Consider @Devon's solutions first. Are you using a FastQC install that is known to work?

Hi. Thanks for your reply. Yes, FastQC I am used works fine with fastq files, both from the terminal level and when using GUI. However it displays this error when .sam or .bam is used as input (same with or without sudo).

OK. Solved. Reinstalling (likely also updating) Java helped.

1 answer

A) You should not be using sudo B) Reinstall FastQC or try a previous version. You seem to be missing part of it.

I have turned this into an answer as it is the most likely to be correct and the OP needs to reinstall before other solutions.

Log in to answer this question.