How to obtain unmapped reads from the paired end samples using hisat2
0
0
Entering edit mode
16 months ago
otieno43 ▴ 30

Am having trouble extracting unmapped reads using hisat2. I have 15 samples that I need to keep unmapped reads for a different analysis.

When I use:

hisat2 -x ./HISAT2/Index/Gff-Ind -p 8 -1 ./data/SN1_R1_trimmed.fastq.gz -2 ./data/SN1_R2_trimmed.fastq.gz -S ./data/HISAT2_unmapped_keep/SN1.sam --un-conc ./data/HISAT2_unmapped_keep/unmapp

It works okay but I get a big SN1.sam files and two unmapped reads (unmapped.1 and umapped.2)

When I try to modify the script for obtain the small SN1.bam file from sam file and rename unmapped.1 & .2 file to SN1_unmapped.fastq I get exit code 1 error which have tried to solve in vain.

hisat2 -x ./HISAT2/Index/Gff-Ind -p 8 -1 ./data/SN1_R1_trimmed.fastq.gz -2 ./data/SN1_R2_trimmed.fastq.gz -S ./data/HISAT2_unmapped_keep/SN1.sam -> SN1.bam --un-conc ./data/HISAT2_unmapped_keep/SN1_unmapped.fastq

I'd like some help please.

fastq hisat2 • 514 views
ADD COMMENT
0
Entering edit mode

-S ./data/HISAT2_unmapped_keep/SN1.sam -> SN1.bam

You can't can do this sort of thing on a program command line (unless you were trying to conceptually show what you wanted to do). You will need to pipe the SAM file to samtools to do the conversion. See HISAT2 output direct to bam

ADD REPLY

Login before adding your answer.

Traffic: 1245 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