Changeset 5792


Ignore:
Timestamp:
Dec 16, 2019, 9:03:23 AM (3 years ago)
Author:
Nicklas Nordborg
Message:

References #1215: Include mutation signature analysis in the variant calling pipeline

Adding annotation types MutationSignature1, ..., MutationSignature30 to the installation wizard.

Location:
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/dao/Annotationtype.java

    r5789 r5792  
    44import java.util.ArrayList;
    55import java.util.Collections;
     6import java.util.HashMap;
    67import java.util.List;
     8import java.util.Map;
    79import java.util.Set;
    810
     
    18701872    new Annotationtype("VariantsPassedFilter", Type.INT, false, Item.RAWBIOASSAY);
    18711873
     1874 
     1875  /**
     1876    Number of mutation signatures.
     1877  */
     1878  public static final int NUM_MUTATION_SIGNATURES = 30;
     1879 
     1880  private static Map<Integer, Annotationtype> mutationSignatures = new HashMap<>();
     1881  /**
     1882    Get the "MutationSignatureNN" annotation type. The value is a score
     1883    belonging to a variant call raw bioassay.
     1884    @since 4.25
     1885  */
     1886  public static final Annotationtype mutationSignature(int index)
     1887  {
     1888    Annotationtype signature = mutationSignatures.get(index);
     1889    if (signature == null)
     1890    {
     1891      if (index < 1 || index > NUM_MUTATION_SIGNATURES)
     1892      {
     1893        throw new InvalidDataException("Index must be between 1 and " + NUM_MUTATION_SIGNATURES);
     1894      }
     1895      synchronized(mutationSignatures)
     1896      {
     1897        signature = new Annotationtype("MutationSignature" + index, Type.FLOAT, false, Item.RAWBIOASSAY);
     1898        mutationSignatures.put(index, signature);
     1899      }
     1900    }
     1901    return signature;
     1902  }
     1903 
    18721904  /**
    18731905    Get the annotation type by name of the static constant defined in this class.
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/InstallServlet.java

    r5787 r5792  
    702702        jsonChecks.add(checkAnnotationType(dc, Annotationtype.PILOT_SCORE_NORMAL, 1, null, createIfMissing, effectivePermissionsUse));
    703703
     704        // Mutation signatures -- save in array for later AnnotationTypeCategory check
     705        Annotationtype[] mutationSignatures = new Annotationtype[Annotationtype.NUM_MUTATION_SIGNATURES];
     706        for (int index = 0; index < Annotationtype.NUM_MUTATION_SIGNATURES; index++)
     707        {
     708          mutationSignatures[index] = Annotationtype.mutationSignature(index+1);
     709          jsonChecks.add(checkAnnotationType(dc, mutationSignatures[index], 1, null, createIfMissing, effectivePermissionsUse));
     710        }
     711       
    704712        // Annotation type categories
    705713        jsonChecks.add(checkAnnotationTypeCategory(dc, Subtype.PATIENT, createIfMissing,
     
    10211029            Annotationtype.DO_NOT_USE, Annotationtype.DO_NOT_USE_COMMENT,
    10221030            Annotationtype.ANALYSIS_RESULT, Annotationtype.AUTO_PROCESSING 
     1031          ));
     1032        jsonChecks.add(checkAnnotationTypeCategory(dc, Rawdatatype.VARIANT_CALL, createIfMissing,
     1033            mutationSignatures
    10231034          ));
    10241035       
Note: See TracChangeset for help on using the changeset viewer.