Changeset 6543


Ignore:
Timestamp:
Jan 18, 2022, 12:36:28 PM (7 months ago)
Author:
Nicklas Nordborg
Message:

References #1354: Search functionality for the OncoArray?-500K SNP chip

Added a file type for VCF files that are used to define an array design.

Location:
extensions/net.sf.basedb.varsearch/trunk/src/net/sf/basedb/varsearch
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.varsearch/trunk/src/net/sf/basedb/varsearch/dao/Datafiletype.java

    r6113 r6543  
    3737
    3838  /**
     39    Variant call file for array designs.
     40    @since 1.5
     41  */
     42  public static final Datafiletype VCF_DESIGN =
     43    new Datafiletype("VCF (design)", "net.sf.basedb.reggie.vcf-design",
     44      Item.ARRAYDESIGN);
     45
     46 
     47  /**
    3948    Get the file type by name of the static constant defined in this class.
    4049   
  • extensions/net.sf.basedb.varsearch/trunk/src/net/sf/basedb/varsearch/dao/Itemlist.java

    r6539 r6543  
    6060  public static final Itemlist GENOTYPING_ONCOARRAY_500K =
    6161    new Itemlist("Genotype index (OncoArray500K)", "net.sf.basedb.varsearch.oncoarray500K.need-index",
    62       Item.RAWBIOASSAY, null,
     62      Item.RAWBIOASSAY, Rawdatatype.ONCOARRAY500K,
    6363      "This list contains RawBioassay items that should have their " +
    6464      "OncoArray500K VCF indexed by the Variant Indexing Service.");
  • extensions/net.sf.basedb.varsearch/trunk/src/net/sf/basedb/varsearch/dao/Rawdatatype.java

    r6111 r6543  
    2626    The VariantCall raw data type.
    2727  */
    28   public static final Rawdatatype VARIANT_CALL = new Rawdatatype("VariantCall", "variant.sequencing.variant-call", Platform.SEQUENCING, "sequencing.variant-call");
     28  public static final Rawdatatype VARIANT_CALL = new Rawdatatype("VariantCall", "variant.sequencing.variant-call", "Sequencing", Platform.SEQUENCING, "sequencing.variant-call");
     29
     30  /**
     31    The OncoArray500K genotyping raw data type.
     32    @since 1.5
     33  */
     34  public static final Rawdatatype ONCOARRAY500K = new Rawdatatype("OncoArray500K", "variant.genotyping.oncoarray500K", "Genotyping", "genotyping", "genotyping.oncoarray500K");
    2935
    3036  private final String rawDataTypeId;
     
    3541 
    3642  private int platformId;
     43  private final String platformName;
    3744  private int variantId;
    3845 
    39   private Rawdatatype(String name, String id, String platformId, String variantId)
     46  private Rawdatatype(String name, String id, String platformName, String platformId, String variantId)
    4047  {
    4148    this.name = name;
    4249    this.rawDataTypeId = id;
     50    this.platformName = platformName;
    4351    this.platformExternalId = platformId;
    4452    this.variantExternalId = variantId;
     
    5058  }
    5159 
     60  public String getPlatformName()
     61  {
     62    return platformName;
     63  }
     64
    5265  public String getId()
    5366  {
  • extensions/net.sf.basedb.varsearch/trunk/src/net/sf/basedb/varsearch/servlet/InstallServlet.java

    r6539 r6543  
    2525import net.sf.basedb.core.ItemKey;
    2626import net.sf.basedb.core.ItemList;
     27import net.sf.basedb.core.ItemNotFoundException;
    2728import net.sf.basedb.core.MultiPermissions;
    2829import net.sf.basedb.core.Permission;
     
    101102        // Platform
    102103        jsonChecks.add(checkPlatform(dc, Rawdatatype.VARIANT_CALL, createIfMissing));
     104        jsonChecks.add(checkPlatform(dc, Rawdatatype.ONCOARRAY500K, createIfMissing));
    103105
    104106        // Data file types
    105107        jsonChecks.add(checkDataFileType(dc, Datafiletype.VCF, createIfMissing));
     108        jsonChecks.add(checkDataFileType(dc, Datafiletype.VCF_DESIGN, createIfMissing));
    106109
    107110        // Item lists
     
    471474  {
    472475    PlatformVariant pv = null;
     476    Platform p = null;
    473477    DbControl dc = sc.newDbControl();
    474478    try
    475479    {
    476       Platform p = rawType.getPlatform(dc);
     480      try
     481      {
     482        p = rawType.getPlatform(dc);
     483      }
     484      catch (ItemNotFoundException ex)
     485      {
     486        p = Platform.getNew(dc, rawType.getPlatformId(), 1);
     487        p.setName(rawType.getPlatformName());
     488        dc.saveItem(p);
     489      }
    477490      pv = PlatformVariant.getNew(dc, p, rawType.getVariantId(), 1);
    478491      pv.setName(rawType.getName());
    479492      dc.saveItem(pv);
    480 
    481493      dc.commit();
    482494    }
Note: See TracChangeset for help on using the changeset viewer.