com.milaboratory.Mi.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mitcr-groovy Show documentation
Show all versions of mitcr-groovy Show documentation
MiTCR is an open source software package aimed at extraction of information
on repertoire of T-cell clones from Next Generation Sequencing (NGS) data.
It is designed with the knowledge of the critical challenges arising in
everyday processing of immunological data.
The newest version!
/*
* MiTCR
*
* Copyright (c) 2010-2013:
* Bolotin Dmitriy
* Chudakov Dmitriy
*
* MiTCR is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see .
*/
package com.milaboratory
import cc.redberry.pipe.CUtils
import cc.redberry.pipe.OutputPort
import com.milaboratory.core.segment.DefaultSegmentLibrary
import com.milaboratory.core.segment.Gene
import com.milaboratory.core.segment.Species
import com.milaboratory.core.sequence.nucleotide.NucleotideSequence
import com.milaboratory.core.sequencing.read.SSequencingRead
import com.milaboratory.mitcr.cdrextraction.CDR3ExtractionResult
import com.milaboratory.mitcr.cdrextraction.CDR3ExtractorFromSRead
import com.milaboratory.mitcr.cdrextraction.CDR3ExtractorParameters
import com.milaboratory.mitcr.pipeline.ParameterPresets
import com.milaboratory.mitcr.qualitystrategy.IlluminaQualityInterpretationStrategy
/**
* Created with IntelliJ IDEA.
* User: dbolotin
* Date: 30.01.13
* Time: 18:09
* To change this template use File | Settings | File Templates.
*/
class Mi {
static NucleotideSequence getN(String string) {
return new NucleotideSequence(string);
}
static void each(OutputPort port, Closure action) {
T object;
while ((object = port.take()) != null)
action(object);
}
static OutputPort cdr3(OutputPort reads, Species species = Species.HomoSapiens,
Gene gene = Gene.TRB, CDR3ExtractorParameters params = null) {
if (!params)
params = ParameterPresets.flex.CDR3ExtractorParameters;
return CUtils.wrap(reads, new CDR3ExtractorFromSRead(species, gene, params, DefaultSegmentLibrary.load(),
new IlluminaQualityInterpretationStrategy((byte) 25)));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy