This is a test version of Biostars. For the public version, visit https://www.biostars.org.
HISAT2 paired end multiple files loop error

Hi, I got stuck with running hisat2 with a loop.

my input files are here,

enter image description here

here is my loop code,

for f in `ls -1 *_1_fp.fastq.gz | sed 's/_1_fp.fastq.gz//' `
do
hisat2 -rna-strandness RF -x GRCm39 -1 ${f}_1_fp.fastq.gz -2 ${f}_2_rp.fastq.gz 2> ${f}.log| samtools view -@ 8 -Sbo ${f}.bam
done

the error message is,

enter image description here

help me, please.

hisat2 rna-seq

The back-tick is in the wrong place.

First line should be

for f in `ls -1 *_1_fp.fastq.gz` | sed 's/_1_fp.fastq.gz//' 

Always add an echo command to your loops to make sure the output looks reasonable before removing it to actually execute the commands.

I'd tried several times, but,

enter image description here

Are you using a mac? If so, make sure you are typing the - symbols by hand. If you are copying pasting this command from someplace then those may be getting turned into smart hyphens.

0 answers

No answers yet.

Log in to answer this question.