public static PairedAlignment getAlignment(String s1, List<IndividualEdit> edits)
		throws Exception
	{
		final StringBuffer top = new StringBuffer();
		final StringBuffer bottom = new StringBuffer();
		
		int index=0;
		
		for( IndividualEdit ie : edits)
		{
			if( ie.getPostion() > index && index < s1.length() )
			{
				String s = s1.substring(index, Math.min(ie.getPostion(),s1.length()));
				top.append(s);
				bottom.append(s);
			}
			
			if(ie.getEditType().equals(IndividualEdit.EDIT_TYPE.SUBSTITUITION))
			{
				top.append(s1.charAt(ie.getPostion()));
				bottom.append(ie.getBase());
				index = ie.getPostion()+1;
			}
			else if( ie.getEditType().equals(IndividualEdit.EDIT_TYPE.DELETION))
			{
				top.append(s1.charAt(ie.getPostion()));
				bottom.append("-");
				index = ie.getPostion()+1;
			}
			else if ( ie.getEditType().equals(IndividualEdit.EDIT_TYPE.INSERTION))
			{
				bottom.append( ie.getBase());
				top.append("-");
				index = ie.getPostion();
			}
			else throw new Exception("Illegal type " + ie.getEditType());
			
			
		}
		
		if( index < s1.length())
		{
			String s= s1.substring(index, s1.length());
			top.append(s);
			bottom.append(s);
		}
			
		return new PairedAlignment()
		{
			
			@Override
			public String getSecondSequence()
			{
				return bottom.toString();
			}
			
			@Override
			public String getFirstSequence()
			{
				return top.toString();
			}
			
			@Override
			public float getAlignmentScore()
			{
				return Float.NaN;
			}
		};
	}