I have a FASTQ file and I'm able to run the FASTQC program to analyse the file. but when I use trim_galore, FASTQC (or the FASTQC option in trim_galore) is not working anymore.
$ fastqc ./sub1_val_1.fq.gz
This is the output:
Started analysis of sub1_val_1.fq.gz
Analysis complete for sub1_val_1.fq.gz
Failed to process file sub1_val_1.fq.gz
java.lang.ArrayIndexOutOfBoundsException: -1
at uk.ac.babraham.FastQC.Modules.SequenceLengthDistribution.calculateDistribution(SequenceLengthDistribution.java:100)
at uk.ac.babraham.FastQC.Modules.SequenceLengthDistribution.raisesError(SequenceLengthDistribution.java:184)
at uk.ac.babraham.FastQC.Report.HTMLReportArchive.startDocument(HTMLReportArchive.java:336)
at uk.ac.babraham.FastQC.Report.HTMLReportArchive.<init>(HTMLReportArchive.java:84)
at uk.ac.babraham.FastQC.Analysis.OfflineRunner.analysisComplete(OfflineRunner.java:155)
at uk.ac.babraham.FastQC.Analysis.AnalysisRunner.run(AnalysisRunner.java:110)
at java.lang.Thread.run(Thread.java:695)
Is the Failed to process file an error because the version is not correct between trim_galore and FastQC?
I found this, but that wasn't that helpful.
I'm using FastQC v0.11.5 and trim_galore v0.4.1.
I subsetted a library (reads in paired-end) using this:
seqtk sample -s100 ./SRR2937435_1.fastq.gz 10000 | gzip > sub1.fastq.gz
seqtk sample -s100 ./SRR2937435_2.fastq.gz 10000 | gzip > sub2.fastq.gz
The sub1_val_1.fq.gz file was after passing sub1.fastq.gz into trim_galore. FastQC with sub1.fastq.gz is working.
Is trim galore generating an error during run or is it completing without any errors?
$ trim_galore --illumina --paired sub1.fastq.gz sub2.fastq.gz
I admit that I have difficulty seeing if there is an error message. There are places where it seems that it's not finding the working directory...
Looks like it has trouble writing in that directory. It might be a permissions issue. Try running it in a new clean directory.
Do you mean that the file should be executable? Should I chmod it to 777?
Set a different output directory with
-o output_dir
option.That's a good option too.
The reason I suggested creating a new directory is it will definitely exist, it will definitely be empty, and it will probably be readable and writeable.
The file is already executable since you were able to execute it. I am worried about the other files and directories involved.
Can you check that the fastq looks reasonable:
You can compare to the working file if you are not sure what to expect. It should not be too different.
I get an error. It's saying something about the working directory, but I double checked with ls, and it's really in the same directory.
Pay close attention to the error message:
Look at the .fq.gz.Z file extension. I think your problem is the same as the one described here and here.
Looks like the file is empty (only 20 bytes, and the report is like 3 KB).
For reference, link to SO post: http://stackoverflow.com/questions/38706402