use of com.milaboratory.core.sequence.SequenceQuality in project mixcr by milaboratory.
the class CloneAccumulator method rebuildClonalSequence.
public void rebuildClonalSequence() {
SequenceQuality newQuality = aggregator.getQuality();
final NSequenceWithQuality[] updated = new NSequenceWithQuality[sequence.size()];
int pointer = 0;
for (int i = 0; i < updated.length; i++) {
final NucleotideSequence s = this.sequence.get(i).getSequence();
updated[i] = new NSequenceWithQuality(s, newQuality.getRange(pointer, pointer + s.size()));
pointer += s.size();
}
sequence = new ClonalSequence(updated);
return;
}
use of com.milaboratory.core.sequence.SequenceQuality in project mixcr by milaboratory.
the class ClonalSequenceTest method createRandom.
private ClonalSequence createRandom(int size, RandomGenerator generator) {
NSequenceWithQuality[] data = new NSequenceWithQuality[size];
for (int i = 0; i < size; ++i) {
NucleotideSequence s = TestUtil.randomSequence(NucleotideSequence.ALPHABET, generator, 2, 10);
SequenceQuality q = SequenceQuality.getUniformQuality((byte) 0, s.size());
data[i] = new NSequenceWithQuality(s, q);
}
return new ClonalSequence(data);
}
use of com.milaboratory.core.sequence.SequenceQuality in project mixcr by milaboratory.
the class ClonalSequenceTest method create.
private ClonalSequence create(String... strings) {
NSequenceWithQuality[] data = new NSequenceWithQuality[strings.length];
for (int i = 0; i < strings.length; ++i) {
NucleotideSequence s = new NucleotideSequence(strings[i]);
SequenceQuality q = SequenceQuality.getUniformQuality((byte) 0, s.size());
data[i] = new NSequenceWithQuality(s, q);
}
return new ClonalSequence(data);
}
Aggregations