use of io.repseq.core.GeneFeature in project mixcr by milaboratory.
the class IOUtil method registerGeneReferences.
public static void registerGeneReferences(PrimitivO output, List<VDJCGene> genes, HasFeatureToAlign featuresToAlign) {
// Putting genes references and feature sequences to be serialized/deserialized as references
for (VDJCGene gene : genes) {
output.putKnownReference(gene);
// Also put sequences of certain gene features of genes as known references if required
if (featuresToAlign != null) {
GeneFeature featureToAlign = featuresToAlign.getFeatureToAlign(gene.getGeneType());
if (featureToAlign == null)
continue;
NucleotideSequence featureSequence = gene.getFeature(featureToAlign);
if (featureSequence == null)
continue;
output.putKnownReference(gene.getFeature(featuresToAlign.getFeatureToAlign(gene.getGeneType())));
}
}
}
Aggregations