faircloth-lab / phyluce

software for UCE (and general) phylogenomics
http://phyluce.readthedocs.org/
Other
78 stars 49 forks source link

phyluce_assembly_assemblo_trinity failed: gzip: stdout: Broken pipe #159

Closed caioraposo closed 3 years ago

caioraposo commented 5 years ago

After getting the error Neither Trinity.fasta nor trinity.log were found in output. The output provided by trinity.log was:

Trinity version: v2.1.1
** NOTE: Latest version of Trinity is Trinity-v2.8.4, and can be obtained at:
    https://github.com/trinityrnaseq/trinityrnaseq/releases

Tuesday, May 14, 2019: 09:20:19 CMD: java -Xmx64m -XX:ParallelGCThreads=2 -jar /home/caio/miniconda3/envs/phyluce/opt/trinity-2.1.1/util/support_scripts/ExitTester.jar 0
Tuesday, May 14, 2019: 09:20:20 CMD: java -Xmx64m -XX:ParallelGCThreads=2 -jar /home/caio/miniconda3/envs/phyluce/opt/trinity-2.1.1/util/support_scripts/ExitTester.jar 1
Tuesday, May 14, 2019: 09:20:21 CMD: mkdir -p /home/caio/Desktop/Bioinformatics/Phyluce/uce_tutorial/trinity_assemblies/alligator_mississippiensis_trinity/chrysalis

----------------------------------------------------------------------------------
-------------- Trinity Phase 1: Clustering of RNA-Seq Reads  ---------------------
----------------------------------------------------------------------------------

Converting input files. (in parallel)Tuesday, May 14, 2019: 09:20:21    CMD: gunzip -c /home/caio/Desktop/Bioinformatics/Phyluce/uce_tutorial/trinity_assemblies/alligator_mississippiensis_trinity/alligator_mississippiensis-READ1.fastq.gz | fastool --illumina-trinity --to-fasta >> left.fa 2> /home/caio/Desktop/Bioinformatics/Phyluce/uce_tutorial/trinity_assemblies/alligator_mississippiensis_trinity/alligator_mississippiensis-READ1.fastq.gz.readcount 
Tuesday, May 14, 2019: 09:20:21 CMD: gunzip -c /home/caio/Desktop/Bioinformatics/Phyluce/uce_tutorial/trinity_assemblies/alligator_mississippiensis_trinity/alligator_mississippiensis-READ2.fastq.gz | fastool --illumina-trinity --to-fasta >> right.fa 2> /home/caio/Desktop/Bioinformatics/Phyluce/uce_tutorial/trinity_assemblies/alligator_mississippiensis_trinity/alligator_mississippiensis-READ2.fastq.gz.readcount 

gzip: stdout: Broken pipe
Thread 1 terminated abnormally: Error, counts of reads in FQ: 1705959 (as per gunzip -c /home/caio/Desktop/Bioinformatics/Phyluce/uce_tutorial/trinity_assemblies/alligator_mississippiensis_trinity/alligator_mississippiensis-READ1.fastq.gz | wc -l) doesn't match fastool's report of FA records: 1573739  at /home/caio/miniconda3/envs/phyluce/bin/Trinity line 3060 thread 1.
    main::ensure_complete_FQtoFA_conversion("gunzip -c /home/caio/Desktop/Bioinformatics/Phyluce/uce_tutor"..., "/home/caio/Desktop/Bioinformatics/Phyluce/uce_tutorial/trinit"...) called at /home/caio/miniconda3/envs/phyluce/bin/Trinity line 2099 thread 1
    main::prep_seqs(ARRAY(0x5619c8ec9910), "fq", "left", undef) called at /home/caio/miniconda3/envs/phyluce/bin/Trinity line 1310 thread 1
    eval {...} called at /home/caio/miniconda3/envs/phyluce/bin/Trinity line 1310 thread 1
-conversion of 1573403 from FQ to FA format succeeded.
Trinity run failed. Must investigate error above.

According to the log, the conversion from fastq to fasta didn't occur correctly because of the difference in the number of lines between the two files.

brantfaircloth commented 5 years ago

This is sort of a bizarre error - at least in the past, Trinity lumped all the reads together, anyway, so whether or not there were the same counts for R1 and R2 was a moot point. It seems that's not the case now - either as an update to Trinity or an update to fastool.

Regardless, one way to fix this is to stop using Trinity - it constantly changes in ways that break everything else.

Another fix to problem, if you still need to use trinity, that should work is simply to delete the singleton reads from any folder of trimmed fastq files you are trying to assemble. Then, they can't be lumped in with R1 reads (which is how your R1 counts differ from your R2 counts).

caioraposo commented 5 years ago

Removing the singleton reads did the trick, thank you.

brantfaircloth commented 5 years ago

Cool. Apologies for the issue - Trinity is a never-ending source of problems... Also, I'm going to re-open this to remind myself at some point to make this change. Thanks for reporting 👍.

caioraposo commented 5 years ago

Oh I'm sorry for that, the real issue wasn't resolved yet, we did only a work-around. But thanks again :)