Answers.Body: <p>According to the help produced when I type <code>hisat2 --help</code>, the default strandedness when running HISAT2 is unstranded:</p>
  <pre><code>  --rna-strandness &lt;string&gt;          specify strand-specific information (unstranded)
  </code></pre>
  <p>So taking out the <code>rna-strandedness</code> option should map the reads as if they were unstranded:</p>
  <pre><code># 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
  </code></pre>
  <p>If this is a problem for you, I recommend you create an issue about it on the HISAT2 github page:</p>
  <p><a href="https://github.com/DaehwanKimLab/hisat2/issues/new" rel="nofollow noreferrer">https://github.com/DaehwanKimLab/hisat2/issues/new</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-03T18:13:43.403Z
Answers.Text: 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.
Answers.UserDisplayName: Ram RS
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-03T03:58:40.420Z
Answers.LastActivityDate: 2023-11-04T04:31:59.240Z
Answers.LastEditDate: 2023-11-04T04:31:59.240Z
Answers.UserDisplayName: gringer
Body: <p>My library is unstranded and the code I'm trying to use is this:</p>
  <pre><code># 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 &quot;HISAT2 finished running!&quot;
  </code></pre>
  <p>However, I get this error:</p>
  <pre><code>(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 &quot;-&quot;
  HISAT2 finished running!
  0 minutes and 0 seconds elapsed.
  </code></pre>
  <p>Looking at the HISAT2 Manual:</p>
  <p>For single-end reads:</p>
  <blockquote>
  <p>Use 'F' if the read corresponds to a transcript.<br />
  Use 'R' if the read corresponds to the reverse complemented counterpart of a transcript.</p>
  </blockquote>
  <p>For paired-end reads:</p>
  <blockquote>
  <p>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.<br />
  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.</p>
  <p>When you use the <code>--rna-strandness</code> 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.</p>
  </blockquote>
  <p>It doesn't say what to input in the case of an unstranded library. Any help would be greatly appreciated!</p>
  
Tags: <rna-seq><rna><rna-alignment><strandedness>
Title: HISAT2: RNA strandedness
ThreadText: # HISAT2: RNA strandedness
  
  (Asked by: username_0 on 2023-11-02)
  
  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!
  
  **Tags:** rna-seq, rna, rna-alignment, strandedness
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-11-03. Score: 2
  
  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>
  
  > **Comments:**
  > **username_2**: 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.  
  
  ---
  
  