HISAT2 paired end multiple files loop error
0
0
Entering edit mode
14 months ago
SH • 0

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 • 787 views
ADD COMMENT
1
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

I'd tried several times, but,

enter image description here

ADD REPLY
1
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

Traffic: 2854 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6