Changeset 5723


Ignore:
Timestamp:
Nov 13, 2019, 9:07:07 AM (3 years ago)
Author:
Nicklas Nordborg
Message:

References #1199: Implement Variant calling pipeline

Auto-confirmation need to be handled differently if the variant calling is raw-only mode or full mode. The current implementation can be used for the raw-only mode which simply put the alignment back into the variant calling pipeline list.

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

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/autoconfirm/AutoConfirmService.java

    r5721 r5723  
    207207      RawDataType cufflinksType = Rawdatatype.CUFFLINKS.getRawDataType();
    208208      RawDataType stringTieType = Rawdatatype.STRINGTIE.getRawDataType();
     209      RawDataType variantCallType = Rawdatatype.VARIANT_CALL.getRawDataType();
    209210     
    210211      // Collection AutoConfirm actions
     
    277278          ac = new StringTieAutoConfirmer(raw);
    278279        }
     280        else if (variantCallType.equals(rawType))
     281        {
     282          //ac = new VariantCallAutoConfirmer(raw);
     283        }
    279284     
    280285        manager.checkRulesAndAdd(dc, ac);
     
    291296      // Check if there are any failed mBAF analysis or variant calling jobs
    292297      numItems += confirmMBafAnalysis(dc, manager, "mbaf_genotype.vcf");
    293       numItems += confirmVariantCalling(dc, manager, "variants-raw.vcf.gz");
     298      numItems += confirmRawOnlyVariantCalling(dc, manager, "variants-raw.vcf.gz");
    294299     
    295300      // Commit now so that all items are reverted to manual flow just in case
     
    382387    @since 4.24
    383388  */
    384   private int confirmVariantCalling(DbControl dc, AutoConfirmManager manager, String vcfName)
     389  private int confirmRawOnlyVariantCalling(DbControl dc, AutoConfirmManager manager, String vcfName)
    385390  {
    386391    ItemQuery<DerivedBioAssay> query = DerivedBioAssay.getQuery();
     
    399404      numItems++;
    400405      DerivedBioAssay alignment = it.next();
    401       AutoConfirmer<?> ac = new VariantCallAutoConfirmer(alignment, vcfName);
     406      AutoConfirmer<?> ac = new RawOnlyVariantCallAutoConfirmer(alignment, vcfName);
    402407      manager.checkRulesAndAdd(dc, ac);
    403408    }
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/autoconfirm/RawOnlyVariantCallAutoConfirmer.java

    r5721 r5723  
    1010
    1111/**
    12   Auto-confirm implementation for alignments after running variant calling.
     12  Auto-confirm implementation for alignments after running raw-only variant calling.
    1313  This auto-confirmer is needed to handle the case when the analysis fails.
    1414  In this case the 'variants-raw.vcf.gz' will be linked to the failed JOB instead
     
    2222  @since 4.24
    2323*/
    24 public class VariantCallAutoConfirmer
     24public class RawOnlyVariantCallAutoConfirmer
    2525  extends AutoConfirmer<DerivedBioAssay>
    2626{
     
    2828  private AnyToAny link;
    2929 
    30   public VariantCallAutoConfirmer(DerivedBioAssay alignment, String vcfName)
     30  public RawOnlyVariantCallAutoConfirmer(DerivedBioAssay alignment, String vcfName)
    3131  {
    3232    super(alignment, null);
     
    8181  {
    8282    if (!super.equals(o)) return false;
    83     VariantCallAutoConfirmer other = (VariantCallAutoConfirmer)o;
     83    RawOnlyVariantCallAutoConfirmer other = (RawOnlyVariantCallAutoConfirmer)o;
    8484    return other.vcfName.equals(vcfName);
    8585  }
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/grid/VariantCallingJobCreator.java

    r5721 r5723  
    287287        if (autoConfirm)
    288288        {
    289           // TODO -- what about raw-only mode??
    290289          Annotationtype.AUTO_PROCESSING.setAnnotationValue(dc, raw, "AutoConfirm");
    291290        }
     
    295294        ScriptUtil.checkValidScriptParameter(raw.getName());
    296295      }
    297      
    298       // Temporary link to the job so that it is possible to handle failed jobs in the VariantCallingAutoConfirmer
    299       if (autoConfirm)
    300       {
    301         // TODO -- what about filtering mode??
    302         AnyToAny link = AnyToAny.getNewOrExisting(dc, aligned, "variants-raw.vcf.gz", vCallJob, false);
    303         if (!link.isInDatabase()) dc.saveItem(link);
     296      else
     297      {
     298        // Temporary link to the job so that it is possible to handle failed jobs in the RawOnlyVariantCallingAutoConfirmer
     299        if (autoConfirm)
     300        {
     301          AnyToAny link = AnyToAny.getNewOrExisting(dc, aligned, "variants-raw.vcf.gz", vCallJob, false);
     302          if (!link.isInDatabase()) dc.saveItem(link);
     303        }
    304304      }
    305305     
Note: See TracChangeset for help on using the changeset viewer.