-1
$\begingroup$

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
$\endgroup$
5
  • $\begingroup$ Also, why you run this on a file provided by bbmap rather than your own? $\endgroup$
    – ATpoint
    Aug 1 at 8:14
  • $\begingroup$ @ATpoint Thank you for your comment. contig.fasta is my file. I just copied to the resources directory. $\endgroup$
    – seq
    Aug 2 at 1:49
  • $\begingroup$ Hmmm. Is this a permissions error? Can you type ls -l /Home/Downloads/BBMap_39.01/bbmap/resources/contig.fasta and report the output? $\endgroup$
    – M__
    Aug 2 at 3:11
  • $\begingroup$ @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 $\endgroup$
    – seq
    Aug 2 at 5:16
  • $\begingroup$ 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? $\endgroup$
    – M__
    Aug 2 at 12:20

1 Answer 1

1
$\begingroup$
./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.

$\endgroup$

Your Answer

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

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