All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nmdp.ngs.sra.LibrarySelection Maven / Gradle / Ivy

/*

    ngs-sra  Mapping for SRA submission XSDs.
    Copyright (c) 2014 National Marrow Donor Program (NMDP)

    This library is free software; you can redistribute it and/or modify it
    under the terms of the GNU Lesser General Public License as published
    by the Free Software Foundation; either version 3 of the License, or (at
    your option) any later version.

    This library is distributed in the hope that it will be useful, but WITHOUT
    ANY WARRANTY; with out even the implied warranty of MERCHANTABILITY or
    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
    License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with this library;  if not, write to the Free Software Foundation,
    Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA.

    > http://www.gnu.org/licenses/lgpl.html

*/
package org.nmdp.ngs.sra;

import java.util.Map;

import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;

/**
 * Library selection.
 */
public enum LibrarySelection {
    RANDOM("RANDOM", "Random selection by shearing or other method"),
    PCR("PCR", "Source material was selected by designed primers"),
    RANDOM_PCR("RANDOM PCR", "Source material was selected by randomly generated primers"),
    RT_PCR("RT-PCR", "Source material was selected by reverse transcription PCR"),
    HMPR("HMPR", "Hypo-methylated partial restriction digest"),
    MF("MF", "Methyl Filtrated"),
    REPEAT_FRACTIONATION("repeat fractionation", "Repeat fractionation (replaces: CF-S, CF-M, CF-H, CF-T)"),
    SIZE_FRACTIONATION("size fractionation", "Size fractionation"),
    MSLL("MSLL", "Methylation Spanning Linking Library"),
    CDNA("cDNA", "complementary DNA"),
    CHIP("ChIP", "Chromatin immunoprecipitation"),
    MNASE("MNase", "Micrococcal Nuclease (MNase) digestion"),
    DNASE("DNAse", "Deoxyribonuclease (MNase) digestion"),
    HYBRID_SELECTION("Hybrid Selection", "Selection by hybridization in array or solution"),
    REDUCED_REPRESENTATION("Reduced Representation", "Reproducible genomic subsets, often generated by restriction fragment size selection, containing a manageable number of loci to facilitate re-sampling"),
    RESTRICTION_DIGEST("Restriction Digest", "DNA fractionation using restriction enzymes"),
    FIVE_METHYLCYTIDINE_ANTIBODY("5-methylcytidine antibody", "Selection of methylated DNA fragments using an antibody raised against 5-methylcytosine or  5-methylcytidine (m5C)"),
    MBD2_PROTEIN_METHYL_CPG_BINDING_DOMAIN("MBD2 protein methyl-CpG binding domain", "Enrichment by methyl-CpG binding domain"),
    CAGE("CAGE", "Cap-analysis gene expression"),
    RACE("RACE", "Rapid Amplification of cDNA Ends"),
    MDA("MDA", "Multiple displacement amplification"),
    PADLOCK_PROBES_CAPTURE_METHOD("padlock probes capture method", "Used in conjuction with Bisulfite-Seq"),
    OTHER("other", "Other library enrichment, screening, or selection process"),
    UNSPECIFIED("unspecified", "Library enrichment, screening, or selection is not specified");

    private final String description;
    private final String definition;
    private static final Map BY_DESCRIPTION;

    static
    {
        Map byDescription = Maps.newHashMap();
        for (LibrarySelection studyType : values()) {
            byDescription.put(studyType.getDescription(), studyType);
        }
        BY_DESCRIPTION = ImmutableMap.copyOf(byDescription);
    }


    /**
     * Create a new library selection with the specified description and definition.
     *
     * @param description description
     * @param definition definition
     */
    private LibrarySelection(final String description, final String definition) {
        this.description = description;
        this.definition = definition;
    }


    /**
     * Return the description of this library selection.
     *
     * @return the description of this library selection
     */
    public String getDescription() {
        return description;
    }

    /**
     * Return the definition of this library selection.
     *
     * @return the definition of this library selection
     */
    public String getDefinition() {
        return definition;
    }

    /**
     * Return a map of library selections keyed by description.
     *
     * @return a map of library selections keyed by description
     */
    public static Map byDescription() {
        return BY_DESCRIPTION;
    }

    /**
     * Return the library selection with the specified description, or null if no such library selection exists.
     *
     * @param description description
     * @return the library selection with the specified description, or null if no such library selection exists
     */
    public static LibrarySelection fromDescription(final String description) {
        return BY_DESCRIPTION.get(description);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy