Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,30 @@
// version 1.1.2
import java.util.Scanner
import java.io.File
fun checkNoSpaces(s: String) = ' ' !in s && '\t' !in s
fun main(args: Array<String>) {
var first = true
val sc = Scanner(File("input.fasta"))
while (sc.hasNextLine()) {
val line = sc.nextLine()
if (line[0] == '>') {
if (!first) println()
print("${line.substring(1)}: ")
if (first) first = false
}
else if (first) {
println("Error : File does not begin with '>'")
break
}
else if (checkNoSpaces(line))
print(line)
else {
println("\nError : Sequence contains space(s)")
break
}
}
sc.close()
}