...
 
Commits (7)
......@@ -6,7 +6,7 @@
<groupId>ch.fhnw</groupId>
<artifactId>DNAAnalysis_Jalahub</artifactId>
<version>0.1-SNAPSHOT</version>
<version>1.1</version>
<packaging>war</packaging>
<name>DNA_Analysis_Jalahub</name>
......@@ -17,6 +17,11 @@
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
......@@ -26,26 +31,66 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.11.2</version>
<version>2.8.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.biojava/biojava-core -->
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<version>2.34.1</version>
<groupId>org.biojava</groupId>
<artifactId>biojava-core</artifactId>
<version>5.3.0</version>
</dependency>
</dependencies>
<build>
<finalName>DNAAnalysis_Jalahub</finalName>
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.7.12</version>
<configuration>
<container>
<containerId>tomcat9x</containerId>
<type>remote</type>
</container>
<configuration>
<type>runtime</type>
<properties>
<cargo.remote.username>admin</cargo.remote.username>
<cargo.remote.password>tomcat</cargo.remote.password>
<cargo.tomcat.manager.url>http://localhost:8080/manager/text</cargo.tomcat.manager.url>
</properties>
</configuration>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<excludeDefaults>true</excludeDefaults>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<reportSets>
<reportSet>
<reports>
<report>javadoc-no-fork</report>
<report>test-javadoc-no-fork</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.7</version>
</plugin>
</plugins>
</reporting>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
......
......@@ -3,8 +3,11 @@ package ch.fhnw;
import ch.fhnw.model.Information;
import ch.fhnw.model.Sequence;
import ch.fhnw.util.DNAUtil;
import ch.fhnw.util.SequenceValidator;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.biojava.nbio.core.sequence.DNASequence;
import org.biojava.nbio.core.sequence.ProteinSequence;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
......@@ -17,12 +20,8 @@ import java.util.ArrayList;
import java.util.List;
/**
*
* @author David Herzig
*/
@WebServlet(name = "analyzednaservlet", urlPatterns = { "/AnalyzeDNA", "/startApp" })
public class AnalyzeDNAServlet extends HttpServlet {
......@@ -35,30 +34,58 @@ public class AnalyzeDNAServlet extends HttpServlet {
String dna = req.getParameter("dnasequence");
String header = "";
if (dna != null) {
boolean isValidSequence = SequenceValidator.validateSequence(dna);
if (dna != null && dna.trim().startsWith(">")) {
header = dna.split("\\r?\\n")[0];
dna = dna.substring(header.length());
dna = dna.replace("\n", "").replace("\r", "");
}
Integer windowSize = 0;
Integer windowSize = 100;
try {
windowSize = Integer.parseInt(req.getParameter("windowsize"));
String str = req.getParameter("windowsize");
if (str != null) {
windowSize = Integer.parseInt(str);
}
} catch (Exception ex) {
ex.printStackTrace();
LOG.error("Error occured when converting window size", ex);
}
System.out.println(dna);
System.out.println(windowSize);
System.out.println(header);
LOG.debug(dna);
LOG.debug(windowSize);
LOG.debug(header);
// usage of the biojava library
String informationStr = "";
if (dna != null && !dna.isEmpty()) {
if(isValidSequence){
try {
DNASequence bjSeq = new DNASequence(dna);
DNASequence.DNAType type = bjSeq.getDNAType();
int gcCount = bjSeq.getGCCount();
int length = bjSeq.getLength();
informationStr = "Header: " + header + "<br/>";
informationStr += "DNA Type: " + type.name() + "<br/>";
informationStr += "Length: " + length + "<br/>";
informationStr += "GC Count: " + gcCount;
} catch (Exception ex) {
LOG.error("Issues on using biojava " + ex.getMessage(), ex);
}}
else {
informationStr = "Invalid Sequence";
}
}
req.setAttribute("informationStr", informationStr);
// create seqeunce object
// create sequence object
Sequence s = new Sequence(dna);
// perform analysis
List<Information> analyzeResult = new ArrayList<>();
if (dna != null && !dna.trim().isEmpty()) {
if (dna != null && !dna.trim().isEmpty() && isValidSequence) {
analyzeResult = DNAUtil.analyze(s, windowSize, 0.09f, 0.51f);
}
......@@ -68,4 +95,5 @@ public class AnalyzeDNAServlet extends HttpServlet {
RequestDispatcher view = req.getRequestDispatcher("result.jsp");
view.forward(req, resp);
}
}
package ch.fhnw.model;
public class Counter {
private int value;
public int getValue() {
return value;
}
public void setValue(int value) {
this.value = value;
}
public int getValueAndIncrease() {
value = value + 1;
return value;
}
}
......@@ -46,7 +46,7 @@ public class Sequence {
result.put(Sequence.A, count(Sequence.A));
result.put(Sequence.C, count(Sequence.C));
result.put(Sequence.G, count(Sequence.T));
result.put(Sequence.G, count(Sequence.G));
result.put(Sequence.T, count(Sequence.T));
return result;
......
......@@ -23,8 +23,9 @@ public class DNAUtil {
int lowerAmount = (int)(lowerLimit * windowSize);
int upperAmount = (int)(upperLimit * windowSize);
for (int i=0; i<seq.getRawData().length()-windowSize+1; i++) {
String dnaWindow = seq.getRawData().substring(i, i+100);
String rawSequence = seq.getRawData();
for (int i=0; i<rawSequence.length()-windowSize+1; i++) {
String dnaWindow = rawSequence.substring(i, i+windowSize);
Sequence windowSeq = new Sequence(dnaWindow);
Map<String, Integer> count = windowSeq.countAll();
......
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(">")) {
sequence = sequence.substring(sequence.split("\\r?\\n")[0].length());
sequence = sequence.replace("\n", "").replace("\r", "");
if (!sequence.isEmpty() && sequence.matches("[atgcATGC]+")){
validity = true;
}
} else if (sequence != null){
sequence = sequence.substring(sequence.split("\\r?\\n")[0].length());
sequence = sequence.replace("\n", "").replace("\r", "");
if(sequence.matches("[atgcATGC]+")) {
validity = true;
}
}
System.out.println("Sequence: " + sequence);
return validity;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<File name="MyDebugFile" fileName="dnaanalyze.log">
<File name="FileOutput" fileName="dnaanalyze.log">
<PatternLayout>
<Pattern>%d %p %c{1.} [%t] %m%n</Pattern>
</PatternLayout>
</File>
<Console name="ConsoleOutput" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
</Console>
</Appenders>
<Loggers>
<Root level="debug">
<AppenderRef ref="MyDebugFile"/>
<AppenderRef ref="FileOutput"/>
<AppenderRef ref="ConsoleOutput" />
</Root>
</Loggers>
</Configuration>
\ No newline at end of file
......@@ -3,17 +3,80 @@
<head>
<meta charset="UTF-8">
<title>DNA Analyzer Application</title>
<style>
body {
text-align:center;
}
</style>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" />
<script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
</head>
<body>
<!--
<h1>DNA Analysis</h1>
<form method="post" action="startApp" id="startApp" name="startApp">
<input type="submit" value="Start Application">
</form>
<h2>Resources</h2>
<button onclick="location.href='http://www.ncbi.nlm.nih.gov'" type="button">Visit NCBI page</button>
-->
<div class="container-md">
<div class="page-header">
<h1>
<img src = "images/fhnw_logo.png" class = "img-rounded" width="60">
MSC Medical Informatics
<br/><img src = "images/dna_icon.jpg" class = "img-rounded" width="60">
<small>DNA Analysis Application</small>
</h1>
</div>
<p class="text-justify">
This web application has been developed during the software engineering
lectures for the master medical informatics degree course.
</p>
<p class="h2">
<form method="post" action="startApp" id="startApp" name="startApp">
<button type="submit" class="btn btn-primary">Start Application</button>
</form>
</p>
<p class="h2">
Resources
</p>
<p class="text-justify">
<ul class="list-group">
<li class="list-group-item list-group-item-primary">National Center for Biotechnology Information (<a href="https://www.ncbi.nlm.nih.gov/" target="_new">https://www.ncbi.nlm.nih.gov/</a>)</li>
<li class="list-group-item list-group-item-secondary">Ensembl (<a href="https://www.ensembl.org/" target="_new">https://www.ensembl.org/</a>)</li>
</ul>
</p>
<p class="h2">
Technologies
</p>
<p class="text-justify">
<ul class="list-group">
<li class="list-group-item list-group-item-primary">Java (Programming Language) (<a href="https://www.oracle.com/java/" target="_new">https://www.oracle.com/java/</a>)</li>
<li class="list-group-item list-group-item-secondary">Apache ANT (Build Tool) (<a href="https://ant.apache.org/" target="_new">https://ant.apache.org/</a>)</li>
<li class="list-group-item list-group-item-primary">Apache Maven (Build Tool) (<a href="https://maven.apache.org/" target="_new">https://maven.apache.org/</a>)</li>
<li class="list-group-item list-group-item-secondary">Apache Tomcat (Application Server) (<a href="https://tomcat.apache.org/" target="_new">https://tomcat.apache.org/</a>)</li>
<li class="list-group-item list-group-item-primary">JUnit (Testing Tool) (<a href="https://junit.org/" target="_new">https://junit.org/</a>)</li>
<li class="list-group-item list-group-item-secondary">IntelliJ (Development Environment) (<a href="https://www.jetbrains.com/de-de/idea/" target="_new">https://www.jetbrains.com/de-de/idea/</a>)</li>
<li class="list-group-item list-group-item-primary">Eclipse (Development Environment) (<a href="https://www.eclipse.org/" target="_new">https://www.eclipse.org/</a>)</li>
<li class="list-group-item list-group-item-secondary">Git (Version Control) (<a href="https://git-scm.com/" target="_new">https://git-scm.com/</a>)</li>
<li class="list-group-item list-group-item-primary">Bootstrap (HTML Library) (<a href="https://getbootstrap.com/" target="_new">https://getbootstrap.com/</a>)</li>
<li class="list-group-item list-group-item-secondary">JQuery (Javascript Library) (<a href="https://jquery.com/" target="_new">https://jquery.com/</a>)</li>
<li class="list-group-item list-group-item-primary">Unified Modeling Language (UML) (<a href="https://www.uml.org/" target="_new">https://www.uml.org/</a>)</li>
<li class="list-group-item list-group-item-secondary">Apache Log4J 2 (Logging Library) (<a href="https://logging.apache.org/log4j/2.x/" target="_new">https://logging.apache.org/log4j/2.x/</a>)</li>
<li class="list-group-item list-group-item-primary">Jenkins (Continuous Integration) (<a href="https://www.jenkins.io/" target="_new">https://www.jenkins.io/</a>)</li>
<li class="list-group-item list-group-item-secondary">Apache JMeter (Testing Tool) (<a href="https://jmeter.apache.org/" target="_new">https://jmeter.apache.org/</a>)</li>
<li class="list-group-item list-group-item-primary">BioJava (<a href="https://biojava.org/" target="_new">https://biojava.org/</a>)</li>
</ul>
</p>
<p class="h2">
Source Code
</p>
<p class="text-justify">
The source code for this application is available on Git:<br/>
<a href="https://gitlab.fhnw.ch/david.herzig/dnaanalyzerwa" target="_new">https://gitlab.fhnw.ch/david.herzig/dnaanalyzerwa</a><br/>
<code>git clone https://gitlab.fhnw.ch/david.herzig/dnaanalyzerwa.git</code>
</p>
</div>
</body>
</html>
\ No newline at end of file
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ page import ="java.util.*,ch.fhnw.model.*,ch.fhnw.util.*" %>
<!DOCTYPE html>
<html>
<head>
<title>DNA Analyzer Application</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" />
<script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
<!--
<link rel="stylesheet" href='<c:url value="/scripts/bootstrap.min.css"/>' />
<script type="text/javascript" src='<c:url value="/scripts/jquery-3.5.1.min.js"/>'></script>
<script type="text/javascript" src='<c:url value="/scripts/bootstrap.min.js"/>'></script>
-->
<style>
body {
text-align:center;
}
.modal-body{
word-break: break-all;
}
</style>
</head>
<body>
<h1>
DNA Analysis
</h1>
Enter DNA Sequence<br/>
<textarea rows="20" cols="200" name="dnasequence" form="addform"></textarea><br/>
Window Size<br/>
<input type="text" value="100" name="windowsize" form="addform"></input>
<br/><br/>
<form method="post" action="AnalyzeDNA" id="addform">
<input type="submit" value="Analyse"><br/>
</form>
<div class="container-md">
<div class="page-header">
<h1>
<img src = "images/fhnw_logo.png" class = "img-rounded" width="60">
MSC Medical Informatics
<br/><img src = "images/dna_icon.jpg" class = "img-rounded" width="60">
<small>DNA Analysis Application</small>
</h1>
</div>
<p class="text-justify">
<textarea placeholder="Place DNA sequence here..." form="addform" name="dnasequence" class="form-control rounded-0" id="exampleFormControlTextarea1" rows="10"></textarea>
</p>
<p class="text-justify">
Window Size<br/>
<input class="form-control" name="windowsize" type="text" value="10" form="addform"></input>
</p>
<p class="text-justify">
<form method="post" action="AnalyzeDNA" id="addform">
<button type="submit" class="btn btn-primary">Analyse</button>
</form>
</p>
<br/><br/>
<br/>
<% if (!request.getAttribute("informationStr").toString().isEmpty()) { %>
<div class="alert alert-dark" role="alert">
<% out.println(request.getAttribute("informationStr")); %>
</div>
<% } %>
<br/>
<% out.println(request.getAttribute("header")); %>
<div>
<br/><br/>
<%
Object msg = request.getAttribute("errormessage");
if (msg != null){
String errormessage = msg.toString();
out.println("<b>" + errormessage + "<b>");
}
%>
<%
List result= (List) request.getAttribute("analyzeresult");
Iterator it = result.iterator();
%>
<table>
<jsp:useBean id="counter" class="ch.fhnw.model.Counter" />
<jsp:setProperty name="counter" property="value" value="1"/>
<% if (it.hasNext()) { %>
<table class="table">
<thead class="thead-dark">
<tr>
<th>Start Index</th>
<th>A</th>
<th>C</th>
<th>G</th>
<th>T</th>
<th>Sequence</th>
</tr>
<% if (it.hasNext()) { %>
<th scope="col">Start Index</th>
<th scope="col">A</th>
<th scope="col">C</th>
<th scope="col">G</th>
<th scope="col">T</th>
<th scope="col">Sequence</th>
<% } %>
</tr>
</thead>
<tbody>
<%
while(it.hasNext()){
Information obj = (Information)it.next();
out.println("<tr>");
out.println("<td>" + obj.getIndex() + "</th>");
out.println("<td>" + obj.getSeq().count("A") + "</th>");
out.println("<td>" + obj.getSeq().count("C") + "</th>");
out.println("<td>" + obj.getSeq().count("G") + "</th>");
out.println("<td>" + obj.getSeq().count("T") + "</th>");
out.println("<td>" + obj.getColoredDNA() + "</th>");
out.println("<th scope=\"row\">" + obj.getIndex() + "</th>");
out.println("<td>" + obj.getSeq().count("A") + "</td>");
out.println("<td>" + obj.getSeq().count("C") + "</td>");
out.println("<td>" + obj.getSeq().count("G") + "</td>");
out.println("<td>" + obj.getSeq().count("T") + "</td>");
%>
<td>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#sequenceDialog_${counter.valueAndIncrease}">Sequence</button>
<div class="modal fade" id="sequenceDialog_${counter.value}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Sequence</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<% out.println(obj.getColoredDNA()); %>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</td>
<%
out.println("</tr>");
}
%>
</tbody>
</table>
<!-- Modal -->
</body>
</html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
package ch.fhnw.util;
import org.junit.Assert;
import org.junit.Test;
public class SequenceValidatorTest {
@Test
public void testvalidateSequence () {
String positive = ">HSGLTH1 Human theta 1-globin gene\n" +
"CCACTGCACTCACCGCACCCGGCCAATTTTTGTGTTTTTAGTAGAGACTAAATACCATATAGTGAACACCTAAGA\n" +
"CGGGGGGCCTTGGATCCAGGGCGATTCAGAGGGCCCCGGTCGGAGCTGTCGGAGATTGAGCGCGCGCGGTCCCGG\n" +
"GATCTCCGACGAGGCCCTGGACCCCCGGGCGGCGAAGCTGCGGCGCGGCGCCCCCTGGAGGCCGCGGGACCCCTG\n" +
"GCCGGTCCGCGCAGGCGCAGCGGGGTCGCAGGGCGCGGCGGGTTCCAGCGCGGGGATGGCGCTGTCCGCGGAGGA\n" +
"CCGGGCGCTGGTGCGCGCCCTGTGGAAGAAGCTGGGCAGCAACGTCGGCGTCTACACGACAGAGGCCCTGGAAAG\n" +
"GTGCGGCAGGCTGGGCGCCCCCGCCCCCAGGGGCCCTCCCTCCCCAAGCCCCCCGGACGCGCCTCACCCACGTTC\n" +
"CTCTCGCAGGACCTTCCTGGCTTTCCCCGCCACGAAGACCTACTTCTCCCACCTGGACCTGAGCCCCGGCTCCTC\n" +
"ACAAGTCAGAGCCCACGGCCAGAAGGTGGCGGACGCGCTGAGCCTCGCCGTGGAGCGCCTGGACGACCTACCCCA\n" +
"CGCGCTGTCCGCGCTGAGCCACCTGCACGCGTGCCAGCTGCGAGTGGACCCGGCCAGCTTCCAGGTGAGCGGCTG\n" +
"CCGTGCTGGGCCCCTGTCCCCGGGAGGGCCCCGGCGGGGTGGGTGCGGGGGGCGTGCGGGGCGGGTGCAGGCGAG\n" +
"TGAGCCTTGAGCGCTCGCCGCAGCTCCTGGGCCACTGCCTGCTGGTAACCCTCGCCCGGCACTACCCCGGAGACT\n" +
"TCAGCCCCGCGCTGCAGGCGTCGCTGGACAAGTTCCTGAGCCACGTTATCTCGGCGCTGGTTTCCGAGTACCGCT\n" +
"GAACTGTGGGTGGGTGGCCGCGGGATCCCCAGGCGACCTTCCCCGTGTTTGAGTAAAGCCTCTCCCAGGAGCAGC\n" +
"CTTCTTGCCGTGCTCTCTCGAGGTCAGGACGCGAGAGGAAGGCGC";
String negative = ">HSGLTH1 Human theta 1-globin gene\n" +
"WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW" +
"WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW" +
"WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW";
String negativeStartCorrect = ">HSGLTH1 Human theta 1-globin gene\n" +
"ATGCatgcWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW" +
"WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW" +
"WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW";
String positiveNoHeader = "CCACTGCACTCACCGCACCCGGCCAATTTTTGTGTTTTTAGTAGAGACTAAATACCATATAGTGAACACCTAAGA\n" +
"CGGGGGGCCTTGGATCCAGGGCGATTCAGAGGGCCCCGGTCGGAGCTGTCGGAGATTGAGCGCGCGCGGTCCCGG\n" +
"GATCTCCGACGAGGCCCTGGACCCCCGGGCGGCGAAGCTGCGGCGCGGCGCCCCCTGGAGGCCGCGGGACCCCTG\n" +
"GCCGGTCCGCGCAGGCGCAGCGGGGTCGCAGGGCGCGGCGGGTTCCAGCGCGGGGATGGCGCTGTCCGCGGAGGA\n" +
"CCGGGCGCTGGTGCGCGCCCTGTGGAAGAAGCTGGGCAGCAACGTCGGCGTCTACACGACAGAGGCCCTGGAAAG\n" +
"GTGCGGCAGGCTGGGCGCCCCCGCCCCCAGGGGCCCTCCCTCCCCAAGCCCCCCGGACGCGCCTCACCCACGTTC\n" +
"CTCTCGCAGGACCTTCCTGGCTTTCCCCGCCACGAAGACCTACTTCTCCCACCTGGACCTGAGCCCCGGCTCCTC\n" +
"ACAAGTCAGAGCCCACGGCCAGAAGGTGGCGGACGCGCTGAGCCTCGCCGTGGAGCGCCTGGACGACCTACCCCA\n" +
"CGCGCTGTCCGCGCTGAGCCACCTGCACGCGTGCCAGCTGCGAGTGGACCCGGCCAGCTTCCAGGTGAGCGGCTG\n" +
"CCGTGCTGGGCCCCTGTCCCCGGGAGGGCCCCGGCGGGGTGGGTGCGGGGGGCGTGCGGGGCGGGTGCAGGCGAG\n" +
"TGAGCCTTGAGCGCTCGCCGCAGCTCCTGGGCCACTGCCTGCTGGTAACCCTCGCCCGGCACTACCCCGGAGACT\n" +
"TCAGCCCCGCGCTGCAGGCGTCGCTGGACAAGTTCCTGAGCCACGTTATCTCGGCGCTGGTTTCCGAGTACCGCT\n" +
"GAACTGTGGGTGGGTGGCCGCGGGATCCCCAGGCGACCTTCCCCGTGTTTGAGTAAAGCCTCTCCCAGGAGCAGC\n" +
"CTTCTTGCCGTGCTCTCTCGAGGTCAGGACGCGAGAGGAAGGCGC";
String negativeNoHeader = "WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW" +
"WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW" +
"WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW";
Assert.assertTrue(SequenceValidator.validateSequence(positive));
Assert.assertTrue(SequenceValidator.validateSequence(positiveNoHeader));
Assert.assertFalse(SequenceValidator.validateSequence(negative));
Assert.assertFalse(SequenceValidator.validateSequence(negativeNoHeader));
Assert.assertFalse(SequenceValidator.validateSequence(negativeStartCorrect));
Assert.assertFalse(SequenceValidator.validateSequence(""));
Assert.assertFalse(SequenceValidator.validateSequence(" "));
}
}