0
$\begingroup$

My library is unstranded and the code I'm trying to use is this:

# Run alignment with unstranded method
hisat2 -q --rna-strandness none -x HISAT2/grch38/genome_index_grch38 -U hipsci/Kolf-1_R1_001.fastq | samtools sort -o HISAT2/Kolf-1_R1_001.bam

echo "HISAT2 finished running!"

However, I get this error:

(base) ~ % RNASeq_pipline/data/script/RNASeqpipline.sh

Error: should be one of F, R, FR, or RF 
Error: Encountered internal HISAT2 exception (#1)
Command: /usr/local/bin/hisat2-align-s --wrapper basic-0 -q --rna-strandness none -x 
HISAT2/grch38/genome_index_grch38 -U hipsci/Kolf-1_R1_001.fastq 
(ERR): hisat2-align exited with value 1
[W::hts_set_opt] Cannot change block size for this format
samtools sort: failed to read header from "-"
HISAT2 finished running!
0 minutes and 0 seconds elapsed.

Looking at the HISAT2 Manual:

For single-end reads:

Use 'F' if the read corresponds to a transcript.
Use 'R' if the read corresponds to the reverse complemented counterpart of a transcript.

For paired-end reads:

Use 'FR' if the first read in the pair corresponds to a transcript on the forward strand, and the second read corresponds to the reverse strand.
Use 'RF' if the first read in the pair corresponds to a transcript on the reverse strand, and the second read corresponds to the forward strand.

When you use the --rna-strandness option with either 'FR' or 'RF' for paired-end reads, HISAT2 will assign an XS attribute tag to each read alignment, indicating whether the read belongs to a transcript on the '+' (plus) or '-' (minus) strand of the genome.

It doesn't say what to input in the case of an unstranded library. Any help would be greatly appreciated!

$\endgroup$

1 Answer 1

2
$\begingroup$

According to the help produced when I type hisat2 --help, the default strandedness when running HISAT2 is unstranded:

  --rna-strandness <string>          specify strand-specific information (unstranded)

So taking out the rna-strandedness option should map the reads as if they were unstranded:

# Run alignment with unstranded method
hisat2 -q -x HISAT2/grch38/genome_index_grch38 -U hipsci/Kolf-1_R1_001.fastq | samtools sort -o HISAT2/Kolf-1_R1_001.bam

If this is a problem for you, I recommend you create an issue about it on the HISAT2 github page:

https://github.com/DaehwanKimLab/hisat2/issues/new

$\endgroup$
1
  • $\begingroup$ Kind of a bad move to not have a way of explicitly recreating the default behavior. There should be an option you can pass to rna-strandness that replicates not specifying that parameter at all. The usage reads like specifying --rna-strandness unstranded will work but it exits if the arg is not one of those 4 allowed values. $\endgroup$
    – Ram RS
    Commented Nov 3, 2023 at 18:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.