- First-line cutoff handled

parent 501f5a65
package ch.fhnw.util;
import java.util.Random;
public class SequenceValidator {
public static boolean validateSequence (String sequence){
/*String header = "";
if (dna != null && dna.trim().startsWith(">")) {
header = dna.split("\\r?\\n")[0];
dna = dna.substring(header.length());
dna = dna.replace("\n", "").replace("\r", "");
}*/
boolean validity = false;
if (sequence != null && sequence.trim().startsWith(">")) {
......@@ -23,7 +14,7 @@ public class SequenceValidator {
validity = true;
}
} else if (sequence != null){
sequence = sequence.substring(sequence.split("\\r?\\n")[0].length());
// sequence = sequence.substring(sequence.split("\\r?\\n")[0].length());
sequence = sequence.replace("\n", "").replace("\r", "");
if(sequence.matches("[atgcATGC]+")) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment