Answers.Body: <pre class="lang-bash prettyprint-override"><code>./stats.sh in=notExistingFile.fa
  Exception in thread &quot;main&quot; java.lang.RuntimeException: Input file does not appear to be valid: notExistingFile.fa
          at jgi.AssemblyStats2.process(AssemblyStats2.java:248)
          at jgi.AssemblyStats2.main(AssemblyStats2.java:40)
  
  </code></pre>
  <p>The error comes when the file does not exist. My best guess is that it is a typo on your side. Is the path really <code>/Home</code> with capital &quot;H&quot;? Most OS like Linux and macOS use lowercase. Anyway, make sure the file exists.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-08-02T07:38:26.680Z
Answers.LastActivityDate: 2023-08-02T07:38:26.680Z
Answers.UserDisplayName: ATpoint
Body: <p>I am trying to calculate the N50 value from the assembled FASTA file. I used stats.sh from the BBmap package. I executed the following command</p>
  <pre><code>./stats.sh  in=/Home/Downloads/BBMap_39.01/bbmap/resources/contig.fasta
  </code></pre>
  <p>I got the following error.</p>
  <pre><code>Exception in thread &quot;main&quot; java.lang.RuntimeException: Input file does not appear to be valid: /Home/Downloads/BBMap_39.01/bbmap/resources/contig.fasta
      at jgi.AssemblyStats2.process(AssemblyStats2.java:248)
      at jgi.AssemblyStats2.main(AssemblyStats2.java:40)
  </code></pre>
  <p>How to resolve this error?</p>
  <p>The sequences are shown below. My file also contains some lengthy sequences.</p>
  <pre><code>&gt;NODE_1_length_3013_cov_4.540906
  TGGGGGATCATGTAACTCGCCTTGATCGTTGGGAACCGGAGCTGAATGAAGCCATACCAA
  ACGACGAGCGTGACACCACGATGCCTGTAGCAATGGCAACAACGTTGCGCAAACTATTAA
  CTGGCGAACTACTTACTCTAGCTTCCCGGCAACAATTAATAGACTGGATGGAGGCGGATA
  AAGTTGCAGGACCACTTCTGCGCTCGGCCCTTCCGGCTGGCTGGTTTATTGCTGATAAAT
  CTGGAGCCGGTGAGCGTGGGTCTCGCGGTATCATTGCAGCACTGGGGCCAGATGGTAAGC
  CCTCCCGTATCGTAGTTATCTACACGACGGGGAGTCAGGCAACTATGGATGAACGAAATA
  GACAGATCGCTGAGATAGGTGCCTCACTGATTAAGCATTGGTAACTGTCAGACCAAGTTT
  &gt;NODE_2_length_2292_cov_16.637908
  CAAAGGAATAATAATTGACTGATGATTGGTTCATTAATTACTTCATTAGTTAATAGATTG
  CAGTCTTTATAAATAAGTTTATAGTTGTATTCCACAGAATTTCTGATCCTGTCTCTGCCC
  TACCCAATGTTTTATCATTAAACTTCATTTACATAAGATAGTATGTTCAACAAATATAAA
  GATTTGCTGGAATGGAAGGCACAGTAAGATATTTCACAGGATAAAATTAAAGTAGATGTC
  AACAGAGTAAATCAAAGTGAAATTTAATAGAGTTAAACAGTAAGTGTTTTAAATACCAGG
  ATTAAATTCCATGAAGCTGCAGCTTTTAAAAAAAGGCACAAAGTGGAATAAGAAAAAATG
  ACTTTCAGAAAGTTAATGTAAAGAAAGCTCACGGTTTTCATTGGCTGCCTGCTCAGTTTG
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-08-01T08:14:06.877Z
Comments.Text: Also, why you run this on a file provided by bbmap rather than your own?
Comments.UserDisplayName: ATpoint
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-08-02T01:49:11.667Z
Comments.Text: @ATpoint Thank you for your comment. contig.fasta is my file. I just copied to the resources directory.
Comments.UserDisplayName: seq
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-08-02T03:11:35.617Z
Comments.Text: Hmmm. Is this a permissions error? Can you type `ls -l /Home/Downloads/BBMap_39.01/bbmap/resources/contig.fasta` and report the output?
Comments.UserDisplayName: M__
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-08-02T05:16:59.513Z
Comments.Text: @M_. Thanks for your comment. ls -l shows the list of files. The first two lines are shown. -rwxrwxrwx  1 user user  2674 Jun 12  2020 addadapters.sh
  -rwxrwxrwx  1 user user  2674 Jun 12  2020 addadapters.sh
Comments.UserDisplayName: seq
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-08-02T12:20:49.380Z
Comments.Text: I agree with @atpoint as best guess. `ls /home/Downloads/BBMap_39.01/bbmap/resources/contig.fasta` , i.e. lower case `h`.  It could be other things. Can you try their test data?
Comments.UserDisplayName: M__
Tags: <fasta><sequence-analysis><linux>
Title: stats.sh error in BBmap package
ThreadText: # stats.sh error in BBmap package
  
  (Asked by: username_0 on 2023-08-01)
  
  I am trying to calculate the N50 value from the assembled FASTA file. I used stats.sh from the BBmap package. I executed the following command
  
  ```
  ./stats.sh  in=/Home/Downloads/BBMap_39.01/bbmap/resources/contig.fasta
  
  ```
  
  I got the following error.
  
  ```
  Exception in thread "main" java.lang.RuntimeException: Input file does not appear to be valid: /Home/Downloads/BBMap_39.01/bbmap/resources/contig.fasta
      at jgi.AssemblyStats2.process(AssemblyStats2.java:248)
      at jgi.AssemblyStats2.main(AssemblyStats2.java:40)
  
  ```
  
  How to resolve this error?
  
  The sequences are shown below. My file also contains some lengthy sequences.
  
  ```
  >NODE_1_length_3013_cov_4.540906
  TGGGGGATCATGTAACTCGCCTTGATCGTTGGGAACCGGAGCTGAATGAAGCCATACCAA
  ACGACGAGCGTGACACCACGATGCCTGTAGCAATGGCAACAACGTTGCGCAAACTATTAA
  CTGGCGAACTACTTACTCTAGCTTCCCGGCAACAATTAATAGACTGGATGGAGGCGGATA
  AAGTTGCAGGACCACTTCTGCGCTCGGCCCTTCCGGCTGGCTGGTTTATTGCTGATAAAT
  CTGGAGCCGGTGAGCGTGGGTCTCGCGGTATCATTGCAGCACTGGGGCCAGATGGTAAGC
  CCTCCCGTATCGTAGTTATCTACACGACGGGGAGTCAGGCAACTATGGATGAACGAAATA
  GACAGATCGCTGAGATAGGTGCCTCACTGATTAAGCATTGGTAACTGTCAGACCAAGTTT
  >NODE_2_length_2292_cov_16.637908
  CAAAGGAATAATAATTGACTGATGATTGGTTCATTAATTACTTCATTAGTTAATAGATTG
  CAGTCTTTATAAATAAGTTTATAGTTGTATTCCACAGAATTTCTGATCCTGTCTCTGCCC
  TACCCAATGTTTTATCATTAAACTTCATTTACATAAGATAGTATGTTCAACAAATATAAA
  GATTTGCTGGAATGGAAGGCACAGTAAGATATTTCACAGGATAAAATTAAAGTAGATGTC
  AACAGAGTAAATCAAAGTGAAATTTAATAGAGTTAAACAGTAAGTGTTTTAAATACCAGG
  ATTAAATTCCATGAAGCTGCAGCTTTTAAAAAAAGGCACAAAGTGGAATAAGAAAAAATG
  ACTTTCAGAAAGTTAATGTAAAGAAAGCTCACGGTTTTCATTGGCTGCCTGCTCAGTTTG
  
  ```
  
  **Tags:** fasta, sequence-analysis, linux
  
  > **Comments:**
  > **username_1**: Also, why you run this on a file provided by bbmap rather than your own?  
  > **username_0**: @username_1 Thank you for your comment. contig.fasta is my file. I just copied to the resources directory.  
  > **username_2**: Hmmm. Is this a permissions error? Can you type `ls -l /Home/Downloads/BBMap_39.01/bbmap/resources/contig.fasta` and report the output?  
  > **username_0**: @M_. Thanks for your comment. ls -l shows the list of files. The first two lines are shown. -rwxrwxrwx  1 user user  2674 Jun 12  2020 addadapters.sh -rwxrwxrwx  1 user user  2674 Jun 12  2020 addadapters.sh  
  > **username_2**: I agree with @username_1 as best guess. `ls /home/Downloads/BBMap_39.01/bbmap/resources/contig.fasta` , i.e. lower case `h`.  It could be other things. Can you try their test data?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-08-02. Score: 1
  
  ```bash
  ./stats.sh in=notExistingFile.fa
  Exception in thread "main" java.lang.RuntimeException: Input file does not appear to be valid: notExistingFile.fa
          at jgi.AssemblyStats2.process(AssemblyStats2.java:248)
          at jgi.AssemblyStats2.main(AssemblyStats2.java:40)
  
  ```
  
  The error comes when the file does not exist. My best guess is that it is a typo on your side. Is the path really `/Home` with capital "H"? Most OS like Linux and macOS use lowercase. Anyway, make sure the file exists.
  
  
  ---
  
  