public static HashMap<String,HitScores> getTopHitsFilteredByPercentIdentityAtMinLength(
			String filepath, int minLength) throws Exception
	{
		//Query id, Subject id, % identity, alignment length
		
		HashMap<String, HitScores> map= new HashMap<String, HitScores>();
		
		BufferedReader reader = new BufferedReader(new FileReader(filepath));
		
		String nextLine = reader.readLine();
		
		int index=0;
		while( nextLine != null)
		{
			String[] splits = nextLine.split("\t");
			
			if( splits.length != 12)
				throw new Exception("Parsing error");
			
			HitScores hs = new HitScores(nextLine);
			HitScores oldHit= map.get(hs.getQueryId());
			
			if( hs.getAlignmentLength() >= minLength)
			{
				if(oldHit== null || hs.getPercentIdentity() > oldHit.getPercentIdentity() )
				{
					map.put(hs.getQueryId(), hs);
				}
			}
				
			nextLine= reader.readLine();
			
			if( index % 100000==0)
				System.out.println(index + " " + map.size());
			
			index++;
		}
		
		reader.close();
		
		return map;
	}