@Override
	int trimIndex(Fastq fastq) {
		int qual[] = FastqTools.qualtityArray(fastq);

		for( int i = 0; i < qual.length; i++ ) {
			int median = median(qual, i); // Compute running median
			if( median < qualityThreshold ) return i; // Below threshold? => trim here
		}

		return qual.length;
	}