Problems with alignment in bash mode with hisat2
I'm trying to align paired-end sequences with the following loop:
for f in `ls *.fq.gz | sed 's/_0[12].fq.gz//g' | sort -u`
do
hisat2 -p 8 -x /home/referenceData/GRCh37_index -1 ${f}_1 -2 ${f}_2 -S ${f}.sam | samtools view -@ 8 ${f}.sam > ${f}.bam | samtools sort -@ 8 ${f}.bam -o ${f}.sorted.bam
done
However, this command is not running, because I am getting this error:
"SRR10042682_1_val_1.fq.gz_1: No such file in the directory"
"SRR10042682_2_val_2.fq.gz_2: No such file in the directory"
My samples are named as follows: SRR10042682_1_val_1.fq.gz and SRR10042682_2_val_2
can anybody help me?
Thanks!
• 1,012 views
•
link
0 answers
No answers yet.
Log in to answer this question.
What's the zero in the sed command supposed to do in your opinion?
You are not reconstituting input files. Try this and echo before you run the command:
I would prefer this way, in a shell in the absence of parallel: