use of uk.ac.babraham.FastQC.Modules.OverRepresentedSeqs.OverrepresentedSeq in project irida by phac-nml.
the class FastqcFileProcessor method handleOverRepresentedSequences.
/**
* Handle getting over represented sequences from fastqc.
*
* @param seqs
* overrepresented sequences.
* @return a collection of {@link OverrepresentedSequence} corresponding to
* the FastQC {@link OverRepresentedSeqs}.
*/
private Set<OverrepresentedSequence> handleOverRepresentedSequences(OverRepresentedSeqs seqs) {
OverrepresentedSeq[] sequences = seqs.getOverrepresentedSequences();
if (sequences == null) {
return Collections.emptySet();
}
Set<OverrepresentedSequence> overrepresentedSequences = new HashSet<>(sequences.length);
for (OverrepresentedSeq s : sequences) {
String sequenceString = s.seq();
int count = s.count();
BigDecimal percent = BigDecimal.valueOf(s.percentage());
String possibleSource = s.contaminantHit();
overrepresentedSequences.add(new OverrepresentedSequence(sequenceString, count, percent, possibleSource));
}
return overrepresentedSequences;
}
Aggregations