Hi, I tried to run below command as suggested by histat2 manual:
./hisat2-2.2.1-Linux_x86_64/hisat2-2.2.1/hisat2 --no-spliced-alignment --no-unal --rg-id ID:D10_S24_L001 --rg SM:D10_S24_L001 --rg PL:ILLUMINA --rg PM:HISEQ -p 2 -x reference.fasta -1 ./Data/D1.fastq.gz -2 ./Data/D2.fastq.gz -S D10.sam
It does not throw any error but still does not generate sam file. before using --rg-id and --rg tags it would be able to generate sam files but after editing like this it does not give any error. The logs in both cases are something similar to below:
33583125 reads; of these: 33583125 (100.00%) were paired; of these: 33565755 (99.95%) aligned concordantly 0 times 17370 (0.05%) aligned concordantly exactly 1 time
0 (0.00%) aligned concordantly >1 times ---- 33565755 pairs aligned concordantly 0 times; of these: 4324 (0.01%) aligned discordantly 1 time ---- 33561431 pairs aligned 0 times concordantly or discordantly; of these: 67122862 mates make up the pairs; of these: 67107582 (99.98%) aligned 0 times 15280 (0.02%) aligned exactly 1 time 0 (0.00%) aligned >1 times
0.09% overall alignment rate
I am not sure what is wrong in my command as it does not produce any error nor any sam output file.
I also tried to change --rg-id ID:D10_S24_L001 to --rg ID:D10_S24_L001 and run again but yet no error no output sam file and the log is the similiar to above.
I would be grateful if you can give me some ideas in this regard.
what does that mean ? what is the output of
samtools view -c D10.sam
?The hisat2 does not output any sam file. I used to run the below command:
and it gives me sam file as output. but after adding rg tags (as I show above) the command does not output any sam file. I hope this explanation is clear enough. (I want to run command with rg tags and so I need sam file resulted with this command. )
If you don't use the
-S
optionhisat2
should write the alignments tostdout
.yes it prints out the alignment information when I removed -S D10.sam part from my command. So how can I save these as sam file?
You can redirect the output to a file eg.
> D.sam
or pipe it to samtools to convert into a bam file.