You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to use this FASTA file (genome_no_index.fasta.txt, remove the .txt extension before use. github didn't allow me to upload it otherwise) in the following function:
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:48)
at java.base/java.lang.String.charAt(String.java:1515)
at htsjdk.samtools.reference.FastaSequenceIndexCreator.buildFromFasta(FastaSequenceIndexCreator.java:130)
at htsjdk.samtools.reference.FastaSequenceIndexCreator.create(FastaSequenceIndexCreator.java:67)
After some debugging, I found that the issue is the two empty lines at the end of the file. It all works fine if I remove the second empty line, but it would be better if the function could work with these files instead of having to manually check every FASTA file.