This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to align multiple fastq files with Hisat2 ?

Hi everyone! I'm trying to align nine fastq.gz files (3 samples in triplicate) with a mouse index using Hisat2. I am using the following loop but it seem that nothing happens when I hit run. Can someone check and correct the commands I'm using? Thanks in advance.

for sample in `ls *.fastq.gz | sed 's/.fastq.gz//g'`
do 
    filename=$(basename $sample)
    echo "file path:" $sample
    echo "file name:" $filename
    ~/tools/hisat2-2.2.1/hisat2 \
    -x Hisat2Index/Mus_musculus.GRCm38.dna.primary_assembly.hisat2index \
    -U $sample.fastq.gz \
    --no-unal \
    --summary-file hisat2_output/$filename.log \
    | samtools view -bS | samtools sort -o hisat2_output/$filename.bam 
done
rna-seq

0 answers

No answers yet.

Log in to answer this question.