Search in sources :

Example 41 with GeneFeature

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())));
        }
    }
}
Also used : GeneFeature(io.repseq.core.GeneFeature) NucleotideSequence(com.milaboratory.core.sequence.NucleotideSequence) VDJCGene(io.repseq.core.VDJCGene)

Aggregations

GeneFeature (io.repseq.core.GeneFeature)41 Test (org.junit.Test)23 NucleotideSequence (com.milaboratory.core.sequence.NucleotideSequence)10 GeneType (io.repseq.core.GeneType)9 VDJCGene (io.repseq.core.VDJCGene)6 NSequenceWithQuality (com.milaboratory.core.sequence.NSequenceWithQuality)3 VDJCAlignments (com.milaboratory.mixcr.basictypes.VDJCAlignments)3 ReferencePoint (io.repseq.core.ReferencePoint)3 VDJCLibrary (io.repseq.core.VDJCLibrary)3 VDJCLibraryRegistry (io.repseq.core.VDJCLibraryRegistry)3 Pattern (java.util.regex.Pattern)3 SequenceRead (com.milaboratory.core.io.sequence.SequenceRead)2 AminoAcidSequence (com.milaboratory.core.sequence.AminoAcidSequence)2 Clone (com.milaboratory.mixcr.basictypes.Clone)2 VDJCHit (com.milaboratory.mixcr.basictypes.VDJCHit)2 VDJCAlignerParameters (com.milaboratory.mixcr.vdjaligners.VDJCAlignerParameters)2 IntArrayList (com.milaboratory.util.IntArrayList)2 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 Well19937c (org.apache.commons.math3.random.Well19937c)2