MikkelSchubert / adapterremoval

AdapterRemoval v2 - rapid adapter trimming, identification, and read merging
http://adapterremoval.readthedocs.io/
GNU General Public License v3.0
102 stars 23 forks source link

basic_ios::clear: iostream error #42

Closed aemmons90 closed 4 years ago

aemmons90 commented 4 years ago

I have tried to run AdapterRemoval on two operating systems, and have received the following error on both:

Trimming paired end reads ... Opening FASTQ file 'PCS_S21_L001_R1_001.fastq', line numbers start at 1 Opening FASTQ file 'PCS_S21_L001_R2_001.fastq', line numbers start at 1 ERROR: Unhandled exception in thread: basic_ios::clear: iostream error ERROR: AdapterRemoval did not run to completion; do NOT make use of resulting trimmed reads!

The first os was macOS Catalina v10.15.1, while the second was on a server and was CentOS Linux v7. I'm not sure how to handle the error?

MikkelSchubert commented 4 years ago

Hi,

What version of AdapterRemoval are you using and what command-line arguments did you use when running it?

aemmons90 commented 4 years ago

Hi, Thanks for the quick response.

This was a conda install: AdapterRemoval v.2.3.0

Command: AdapterRemoval --threads 2 --file1 PCS1_S1_L001_R1_001.fastq --file2 PCS1_S1_L001_R2_001.fastq --minalignmentlength 10 --trimns --trimqualities --minquality 20 --collapse --minlength 30 --output1 ./analyis_ready/PCS1.trimmed.R1.fastq --output2 ./analysis_ready/PCS1.trimmed.R2.fastq --outputcollapsed ./analysis_ready/PCS1.trimmed.merged.fastq --settings PCS1_AdapterRemoval.txt --adapter1 AGATCGGAAGAGCACACGTCTGAACTCCAGTCACNNNNNNGCATCTCGTATGCCGTCTTCTGCT --adapter2 AGATCGGAAGAGCGTCGGTAGGGAAAGAGTGTAGTCTGTGGTGTAGATCTCGGTGGTC

MikkelSchubert commented 4 years ago

I am not sure why the error message is so uninformative, and I am currently exploring how to fix that, but the cause is most likely that AdapterRemoval cannot create the output file, possibly because the directory "analysis_ready" does not exist or because you do not have sufficient permissions to write to it.

Can you check if "analysis_ready" exists and that you have permission to write to it? I.e. what is the output of running the following command in the same folder where you are running AdapterRemoval:

    touch ./analyis_ready/PCS1.trimmed.R1.fastq
aemmons90 commented 4 years ago

Actually, this is silly, but apparently this is a simple typo error. I have "analysis_ready" in one spot and "analyis_ready" in another. It is now working. Sorry about that. I should have caught that.

aemmons90 commented 4 years ago

Also, thank you for your time.

MikkelSchubert commented 4 years ago

You're welcome. I'll release a small update to AdapterRemoval sometime this week to improve the error message; it's easy to make a typo like that, so the error message should at least point in the right direction and not be this uninformative.