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

I am trying to run hisat 2 and am getting an error. Here is my script:

for i in $(<samples.txt)
do
hisat2 -p 10 -x /Users/smithd/RNAAqSeq/outputRNAAqSeq/genome.index/Phytozome/PhytozomeV12_unrestricted/Acoerulea/annotation/Acoerulea_322_v3.1.transcript_primaryTranscriptOnly \
-1 ${i}R1.cutadapt.fastq.bz2 -2 ${i}R2.cutadapt.fastq.bz2
done

This is the error:

Error, fewer reads in file specified with -1 than in file specified with -2
terminate called after throwing an instance of 'int'
(ERR): hisat2-align died with signal 6 (ABRT) (core dumped)

Can someone please correct my script?

hisat2

1 answer

Your script is not the problem. It is your data files which must have been independently trimmed or otherwise mangled.

Error, fewer reads in file specified with -1 than in file specified with -2

You can try to re-sync the data in R1/R2 files using repair.sh tool from BBMap suite. Search for threads here on how to use the tool.

Hi Geno,

Thanks for the help. Is it possible that the issue is in my samples.txt files. For example, the full name of my file is: JRMM_RNAseq_ML_1_CCGCGGTT_Aquilegia_I1187_L1.R1.cutadapt.fastq.bz2

and in samples.txt I just copied the first part of the file..left out the .R1.cutadapt.fastq.bz2. So in samples text it's: JRMM_RNAseq_ML_1_CCGCGGTT_Aquilegia_I1187_L1.

Would this be the problem? I will read on repair.sh in the meantime.

Add echo before hisat2 in your script. This will simply print the actual command lines being submitted to screen. Make sure everything there looks good. If not make changes as needed. Then remove echo to actually run the commands.

Perhaps the error we saw above is spurious. Your data files may be ok. If not repair.sh to fix them and remove singletons.

Log in to answer this question.