Changeset 6201


Ignore:
Timestamp:
Apr 9, 2021, 11:59:59 AM (14 months ago)
Author:
Nicklas Nordborg
Message:

References #1295: Registration of specimen handled by external lab

Added code for creating FlowCell and SequencingRun items.

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

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/plugins/FutureSpecimenImporter.java

    r6199 r6201  
    11package net.sf.basedb.reggie.plugins;
    22
     3import java.text.DateFormat;
     4import java.text.SimpleDateFormat;
    35import java.util.Date;
    46import java.util.HashMap;
     
    3537import net.sf.basedb.reggie.dao.SpecimenTube;
    3638import net.sf.basedb.reggie.dao.Subtype;
     39import net.sf.basedb.reggie.plugins.cmd.FlowCellInfo;
    3740import net.sf.basedb.reggie.plugins.cmd.JsonFile;
    3841import net.sf.basedb.reggie.plugins.cmd.JsonSection;
    3942import net.sf.basedb.reggie.plugins.cmd.LibraryInfo;
    4043import net.sf.basedb.reggie.plugins.cmd.PoolInfo;
     44import net.sf.basedb.reggie.plugins.cmd.SequencingRunInfo;
    4145import net.sf.basedb.util.Coordinate;
     46import net.sf.basedb.util.MD5;
    4247
    4348/**
     
    108113    LibraryInfo libInfo = jsonFile.getLibrary();
    109114    PoolInfo poolInfo = jsonFile.getPool();
    110    
    111     JSONObject jsonSeq = (JSONObject)json.get("sequencing");
     115    FlowCellInfo flowCellInfo = jsonFile.getFlowCell();
     116    SequencingRunInfo seqRunInfo = jsonFile.getSequencingRun();
     117   
    112118    JSONObject jsonDemux = (JSONObject)json.get("demux");
    113119
     
    128134    PooledLibrary pool = getOrCreatePool(dc, lib, poolInfo);
    129135   
    130     if (jsonSeq == null) return;   
    131     SequencingRun seqRun = getOrCreateSequencing(dc, pool, jsonSeq);
    132    
    133     if (jsonDemux == null) return;
    134     MergedSequences merged = createMergedSequences(dc, lib, seqRun, jsonDemux);
     136    if (pool == null || !flowCellInfo.valid || !seqRunInfo.valid) return;
     137    FlowCell flowCell = getOrCreateFlowCell(dc, pool, flowCellInfo, seqRunInfo);
     138   
     139    if (flowCell == null) return;
     140    SequencingRun seqRun = getOrCreateSequencingRun(dc, flowCell, flowCellInfo, seqRunInfo);
     141   
     142  //  if (jsonDemux == null) return;
     143  //  MergedSequences merged = createMergedSequences(dc, lib, seqRun, jsonDemux);
    135144  }
    136145 
     
    345354  }
    346355 
    347 
     356 
     357  private FlowCell getOrCreateFlowCell(DbControl dc, PooledLibrary pool, FlowCellInfo flowCellInfo, SequencingRunInfo seqRunInfo)
     358  {
     359    String flowCellId = flowCellInfo.flowCellId;
     360    if (flowCellId == null) return null;
     361
     362    PhysicalBioAssay flowCell = flowCellCache.get(flowCellId);
     363    if (flowCell == null)
     364    {
     365      ItemQuery<PhysicalBioAssay> query = PhysicalBioAssay.getQuery();
     366      query.setIncludes(Reggie.INCLUDE_IN_CURRENT_PROJECT);
     367      Subtype.FLOW_CELL.addFilter(dc, query);
     368      query.join(Annotations.innerJoin(null, Annotationtype.FLOWCELL_ID.load(dc), "ref"));
     369      query.restrict(Restrictions.eq(Hql.alias("ref"), Expressions.string(flowCellId)));
     370      List<PhysicalBioAssay> list = query.list(dc);
     371      if (list.size() > 1)
     372      {
     373        addErrorMessage("Found "+list.size()+" flow cells with FlowCellID="+flowCellId);
     374        return null;
     375      }
     376      else if (list.size() == 1)
     377      {
     378        flowCell = list.get(0);
     379        addDebugMessage("Found: "+flowCell.getName()+"[ref="+flowCellId+"]");
     380        // TODO -- it should be linked to pool already -- verify??
     381      }
     382      else
     383      {     
     384        flowCell = PhysicalBioAssay.getNew(dc);
     385        flowCell.setItemSubtype(Subtype.FLOW_CELL.get(dc));
     386        flowCell.setName(FlowCell.getNextNames(dc, 1).get(0));
     387        Pipeline.RNA_SEQ.setAnnotation(dc, flowCell);
     388        flowCell.setSize(flowCellInfo.size);
     389        Annotationtype.FLOWCELL_ID.setAnnotationValue(dc, flowCell, flowCellId);
     390        Annotationtype.SEQUENCING_CYCLES.setAnnotationValue(dc, flowCell, flowCellInfo.sequencingCycles);
     391        Annotationtype.FLOWCELL_TYPE.setAnnotationValue(dc, flowCell, seqRunInfo.sequencer.flowCellType);
     392        Annotationtype.CLUSTER_OPERATOR.setAnnotationValue(dc, flowCell, flowCellInfo.operator);
     393        Annotationtype.PLATE_PROCESS_RESULT.setAnnotationValue(dc, flowCell, ReactionPlate.PROCESS_SUCCESSFUL);
     394        dc.saveItem(flowCell);
     395       
     396        BioMaterialEvent createEvent = flowCell.getCreationEvent();
     397        createEvent.setProtocol(null); // To avoid that a 'project default' is used
     398        createEvent.setHardware(seqRunInfo.sequencer.sequencer);
     399       
     400        // Link with pool
     401        for (int laneNo = 1; laneNo <= flowCell.getSize(); laneNo++)
     402        {
     403          Extract poolA = Extract.getNew(dc);
     404          poolA.setItemSubtype(Subtype.POOLED_LIBRARY_ALIQUOT.get(dc));
     405          poolA.setName(pool.getNextAliquotName(dc));
     406          poolA.getCreationEvent().setSource(pool.getItem());
     407          createEvent.addSource(poolA).setPosition(laneNo);
     408          dc.saveItem(poolA);
     409          addDebugMessage("Created: "+ poolA.getName());
     410        }
     411       
     412        addDebugMessage("Created: "+flowCell.getName()+"[ref="+flowCellId+"]");
     413      }
     414      flowCellCache.put(flowCellId, flowCell);
     415    }
     416    else
     417    {
     418      addDebugMessage("Found: "+flowCell.getName()+"[ref="+flowCellId+"]");
     419    }
     420       
     421    return FlowCell.get(flowCell);
     422  }
     423
     424  private SequencingRun getOrCreateSequencingRun(DbControl dc, FlowCell flowCell, FlowCellInfo flowCellInfo, SequencingRunInfo seqRunInfo)
     425  {
     426    String flowCellId = flowCellInfo.flowCellId;
     427    if (flowCellId == null) return null;
     428
     429    DerivedBioAssay seqRun = seqRunCache.get(flowCellId);
     430    if (seqRun == null)
     431    {
     432      if (flowCell.getItem().isInDatabase())
     433      {
     434        ItemQuery<DerivedBioAssay> query = flowCell.getItem().getRootDerivedBioAssays();
     435        query.setIncludes(Reggie.INCLUDE_IN_CURRENT_PROJECT);
     436        Subtype.SEQUENCING_RUN.addFilter(dc, query);
     437        List<DerivedBioAssay> list = query.list(dc);
     438        if (list.size() > 1)
     439        {
     440          addErrorMessage("Found "+list.size()+" sequencing runs for FlowCellID="+flowCellId);
     441          return null;
     442        }
     443        else if (list.size() == 1)
     444        {
     445          seqRun = list.get(0);
     446          addDebugMessage("Found: "+seqRun.getName()+"[ref="+flowCellId+"]");
     447        }
     448      }
     449      if (seqRun == null)
     450      {
     451        seqRun = DerivedBioAssay.getNew(dc, flowCell.getItem(), null);
     452        seqRun.setItemSubtype(Subtype.SEQUENCING_RUN.get(dc));
     453        seqRun.setName(SequencingRun.getNextName(dc));
     454        Pipeline.RNA_SEQ.setAnnotation(dc, seqRun);
     455        seqRun.setHardware(seqRunInfo.sequencer.sequencer);
     456        seqRun.setSoftware(null);
     457        seqRun.setProtocol(null);
     458        Annotationtype.HISEQ_POSITION.setAnnotationValue(dc, seqRun, seqRunInfo.position);
     459        Annotationtype.SEQUENCING_RUN_NUMBER.setAnnotationValue(dc, seqRun, seqRunInfo.runNumber);
     460        Annotationtype.SEQUENCING_START.setAnnotationValue(dc, seqRun, seqRunInfo.startDate);
     461        Annotationtype.SEQUENCING_END.setAnnotationValue(dc, seqRun, seqRunInfo.endDate);
     462        Annotationtype.SEQUENCING_OPERATOR.setAnnotationValue(dc, seqRun, seqRunInfo.operator);
     463        Annotationtype.SEQUENCING_CYCLES.setAnnotationValue(dc, seqRun, flowCellInfo.sequencingCycles);
     464        Annotationtype.SEQUENCING_CONFIRMED.setAnnotationValue(dc, seqRun, true);
     465        Annotationtype.SEQUENCING_RESULT.setAnnotationValue(dc, seqRun, SequencingRun.SEQUENCING_SUCCESSFUL);
     466       
     467        DateFormat df = new SimpleDateFormat("yyyy/yyMMdd");
     468        String dataFilesFolder = df.format(seqRunInfo.startDate)+
     469          "_"+seqRunInfo.sequencer.serialNo+
     470          "_"+MD5.leftPad(Integer.toString(seqRunInfo.runNumber), '0', 4)+
     471          "_"+seqRunInfo.position+flowCellInfo.flowCellId;
     472        addDebugMessage(dataFilesFolder);
     473        Annotationtype.DATA_FILES_FOLDER.setAnnotationValue(dc, seqRun, dataFilesFolder);
     474        dc.saveItem(seqRun);
     475       
     476        addDebugMessage("Created: "+ seqRun.getName());
     477      }
     478      seqRunCache.put(flowCellId, seqRun);
     479     
     480    }
     481    return SequencingRun.get(seqRun);
     482  }
     483 
     484  /*
    348485  private SequencingRun getOrCreateSequencing(DbControl dc, PooledLibrary pool, JSONObject jsonSeq)
    349486  {
    350487    String flowCellId = (String)jsonSeq.get("flowCellId");
    351     PhysicalBioAssay flowCell = findFlowCellByRef(dc, flowCellId);
     488    PhysicalBioAssay flowCell = null; //findFlowCellByRef(dc, flowCellId);
    352489    if (flowCell == null)
    353490    {
     
    405542  }
    406543 
    407   private PhysicalBioAssay findFlowCellByRef(DbControl dc, String flowCellId)
    408   {
    409     PhysicalBioAssay flowCell = flowCellCache.get(flowCellId);
    410     if (flowCell == null)
    411     {
    412       ItemQuery<PhysicalBioAssay> query = PhysicalBioAssay.getQuery();
    413       query.setIncludes(Reggie.INCLUDE_IN_CURRENT_PROJECT);
    414       Subtype.FLOW_CELL.addFilter(dc, query);
    415       query.join(Annotations.innerJoin(null, Annotationtype.EXTERNAL_REF.load(dc), "eref"));
    416       query.restrict(Restrictions.eq(Hql.alias("eref"), Expressions.string(flowCellId)));
    417       List<PhysicalBioAssay> list = query.list(dc);
    418       if (list.size() > 1)
    419       {
    420         // ERROR
    421       }
    422       else if (list.size() == 1)
    423       {
    424         flowCell = list.get(0);
    425       }
    426     }
    427     return flowCell;
    428   }
     544  */
     545
     546 
    429547
    430548  private DerivedBioAssay findSeqRunByRef(DbControl dc, String flowCellId)
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/plugins/cmd/DateValidator.java

    r6200 r6201  
    44import java.text.SimpleDateFormat;
    55import java.util.Date;
     6
     7import net.sf.basedb.core.DbControl;
    68
    79
     
    2527  public static final DateValidator YYMMDD = new DateValidator("yyMMdd");
    2628
     29  /**
     30    Date+time validator for timestamps in 'yyMMdd HH:mm:ss' format.
     31  */
     32  public static final DateValidator YYMMDD_HH_MM_SS = new DateValidator("yyMMdd HH:mm:ss");
     33
     34 
    2735  private final String format;
    2836  private final DateFormat dateFormat;
     
    3543 
    3644  @Override
    37   public Date isValid(String value, JsonSection section, String entryKey)
     45  public Date isValid(DbControl dc, String value, JsonSection section, String entryKey)
    3846  {
    3947    try
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/plugins/cmd/FastqInfo.java

    r6200 r6201  
    66import org.json.simple.JSONObject;
    77
     8import net.sf.basedb.core.DbControl;
    89import net.sf.basedb.opengrid.RemoteSession;
    910import net.sf.basedb.opengrid.filetransfer.FileMetaData;
     
    8283    }
    8384    @Override
    84     public FastqFile isValid(String value, JsonSection section, String entryKey)
     85    public FastqFile isValid(DbControl dc, String value, JsonSection section, String entryKey)
    8586    {
    8687      this.name = value; // TODO -- implement validation
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/plugins/cmd/FloatValidator.java

    r6200 r6201  
    11package net.sf.basedb.reggie.plugins.cmd;
    22
     3import net.sf.basedb.core.DbControl;
    34
    45/**
     
    1718 
    1819  @Override
    19   public Float isValid(Object value, JsonSection section, String entryKey)
     20  public Float isValid(DbControl dc, Object value, JsonSection section, String entryKey)
    2021  {
    2122    if (value instanceof Number)
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/plugins/cmd/IntValidator.java

    r6200 r6201  
    11package net.sf.basedb.reggie.plugins.cmd;
    22
     3import java.util.Arrays;
     4import java.util.List;
     5
     6import net.sf.basedb.core.DbControl;
    37
    48/**
     
    1014  implements ValueValidator<Object, Integer>
    1115{
    12   public static final IntValidator INSTANCE = new IntValidator();
     16  /**
     17    Allow all integers.
     18  */
     19  public static final IntValidator ALL = new IntValidator();
    1320 
     21  /**
     22    All positive integers > 0.
     23  */
     24  public static final IntValidator POSITIVE = new IntValidator(1, null);
     25 
     26  /**
     27    Allow flow cells with size 2 or 4.
     28  */
     29  public static final IntValidator FLOWCELL_SIZE_2_OR_4 = new IntValidator(Arrays.asList(2, 4));
     30 
     31  private Integer maxValue;
     32  private Integer minValue;
     33  private List<Integer> allowed;
     34 
     35  /**
     36    Allow all integers.
     37  */
    1438  public IntValidator()
    1539  {}
    1640 
     41  /**
     42    Allow all integers between min and max (inclusive).
     43    Null values are allowed and mean no limit.
     44  */
     45  public IntValidator(Integer min, Integer max)
     46  {
     47    this.minValue = min;
     48    this.maxValue = max;
     49  }
     50 
     51  /**
     52    Only allow integers in the specified list of values.
     53  */
     54  public IntValidator(List<Integer> allowed)
     55  {
     56    this.allowed = allowed;
     57  }
     58 
    1759  @Override
    18   public Integer isValid(Object value, JsonSection section, String entryKey)
     60  public Integer isValid(DbControl dc, Object value, JsonSection section, String entryKey)
    1961  {
     62    Integer result = null;
    2063    if (value instanceof Number)
    2164    {
    22       return ((Number)value).intValue();
     65      result = ((Number)value).intValue();
    2366    }
    2467    else
     
    2669      try
    2770      {
    28         return Integer.parseInt(value.toString());
     71        result = Integer.parseInt(value.toString());
    2972      }
    3073      catch (Exception ex)
     
    3376      }
    3477    }
    35     return null;
     78    if (result != null)
     79    {
     80      if (minValue != null && result < minValue)
     81      {
     82        section.addErrorMessage("Invalid integer in JSON: "+entryKey+"="+value+" (expected >="+minValue+")");
     83        result = null;
     84      }
     85      if (maxValue != null && result > maxValue)
     86      {
     87        section.addErrorMessage("Invalid integer in JSON: "+entryKey+"="+value+" (expected <="+maxValue+")");
     88        result = null;
     89      }
     90      if (allowed != null)
     91      {
     92        if (allowed.indexOf(result) == -1)
     93        {
     94          section.addErrorMessage("Invalid integer in JSON: "+entryKey+"="+value+" (expected one of "+allowed+")");
     95          result = null;
     96        }
     97      }
     98    }
     99    return result;
    36100  }
    37101
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/plugins/cmd/JsonFile.java

    r6200 r6201  
    5252      for (String line : lines)
    5353      {
    54         JsonFile file = new JsonFile(line);
     54        JsonFile file = new JsonFile(dc, line);
    5555       
    5656        if (downloadAndParse)
    5757        {
    58           file.downloadAndParse(session, rootPath);
     58          file.downloadAndParse(dc, session, rootPath);
    5959        }
    6060       
     
    7171
    7272 
     73  private final DbControl dc;
    7374  private final String name;
    7475  private final List<String> errorMessages;
     
    8182  private LibraryInfo libInfo;
    8283  private PoolInfo poolInfo;
     84  private FlowCellInfo flowCellInfo;
     85  private SequencingRunInfo seqRunInfo;
    8386
    8487  /**
    8588    Creates a new file with the given name.
    8689  */
    87   public JsonFile(String name)
    88   {
     90  public JsonFile(DbControl dc, String name)
     91  {
     92    this.dc = dc;
    8993    this.name = name;
    9094    this.errorMessages = new ArrayList<String>();
     
    9397  }
    9498 
     99  public DbControl dc()
     100  {
     101    return dc;
     102  }
     103 
    95104  /**
    96105    Get the name of the file.
     
    186195    Download and parse the JSON file from the remote server.
    187196  */
    188   public void downloadAndParse(RemoteSession session, String rootDir)
     197  public void downloadAndParse(DbControl dc, RemoteSession session, String rootDir)
    189198  {
    190199    if (!rootDir.endsWith("/")) rootDir += "/";
     
    214223      if (fastqInfo.valid) fastqInfo.loadFileInfo(session, rootDir);
    215224
    216       //JsonSection jsonDemux = getRequiredSection("DemuxedSequences");
    217       //JsonSection jsonSeqRun = getRequiredSection("SequencingRun");
    218       //JsonSection jsonFlowCell = getRequiredSection("FlowCell");
    219 
     225      seqRunInfo = new SequencingRunInfo(getRequiredSection("SequencingRun"));
     226      flowCellInfo = new FlowCellInfo(getRequiredSection("FlowCell"));
    220227      poolInfo = new PoolInfo(getRequiredSection("Pool"));
    221228      libInfo = new LibraryInfo(getRequiredSection("Library"));
     
    249256  }
    250257 
     258  public FlowCellInfo getFlowCell()
     259  {
     260    return flowCellInfo;
     261  }
     262 
     263  public SequencingRunInfo getSequencingRun()
     264  {
     265    return seqRunInfo;
     266  }
     267 
    251268  public FastqInfo getFastq()
    252269  {
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/plugins/cmd/JsonSection.java

    r6200 r6201  
    123123      try
    124124      {
    125         result = validator.isValid((F)val, this, section+"."+key);
     125        result = validator.isValid(file.dc(), (F)val, this, section+"."+key);
    126126      }
    127127      catch (Exception ex)
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/plugins/cmd/LibraryInfo.java

    r6200 r6201  
    3535 
    3636      libDate = lib.getRequiredEntry("Date", DateValidator.YYYY_MM_DD);
    37       libSize = lib.getRequiredEntry("Library size", IntValidator.INSTANCE);
     37      libSize = lib.getRequiredEntry("Library size", IntValidator.ALL);
    3838      libMolarity = lib.getRequiredEntry("Library molarity", FloatValidator.INSTANCE);
    3939      qubitConc = lib.getRequiredEntry("Qubit concentration (ng/ul)", FloatValidator.INSTANCE);
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/plugins/cmd/PatternValidator.java

    r6200 r6201  
    33import java.util.regex.Matcher;
    44import java.util.regex.Pattern;
     5
     6import net.sf.basedb.core.DbControl;
    57
    68
     
    1820    A CMD ID is expected to be string with numbers and hyphen.
    1921  */
    20   public static final PatternValidator CMD_ID = new PatternValidator("[0-9]+[0-9\\-]+", "ID", "cmd:$0");
     22  public static final PatternValidator CMD_ID = new PatternValidator("[0-9]+[0-9\\-]+", "ID", "cmd:$0", null);
    2123
     24  /**
     25    A flow cell ID is uppercase letters and numbers. Typically
     26    they are 9 characaters, but we allow between 6 and 12.
     27  */
     28  public static final PatternValidator FLOWCELL_ID = new PatternValidator("[A-Z0-9]{6,12}", "flow cell ID", null, "6-12 characters A-Z or 0-9");
     29 
     30  /**
     31    The flow cell position is "A" or "B".
     32  */
     33  public static final PatternValidator SEQUENCER_POSITION = new PatternValidator("A|B", "flow cell position", null, "A or B");
     34 
     35  /**
     36    Serial numbers are uppercase letters and numbers. Typically
     37    5-10 characters but we allow between 2 and 20.
     38  */
     39  public static final PatternValidator SERIAL_NO = new PatternValidator("[A-Z0-9]{2,20}", "serial number", null, "2-20 characters A-Z or 0-9");
     40 
    2241  private final Pattern pattern;
    2342  private final String subject;
    2443  private final String replacement;
     44  private final String expected;
    2545 
    26   public PatternValidator(String pattern, String subject, String replacement)
     46  public PatternValidator(String pattern, String subject, String replacement, String expected)
    2747  {
    2848    this.pattern = Pattern.compile(pattern);
    2949    this.subject = subject;
    3050    this.replacement = replacement;
     51    this.expected = expected;
    3152  }
    3253 
    3354  @Override
    34   public String isValid(String value, JsonSection section, String entryKey)
     55  public String isValid(DbControl dc, String value, JsonSection section, String entryKey)
    3556  {
    3657    Matcher m = pattern.matcher(value);
    3758    if (!m.matches())
    3859    {
    39       section.addErrorMessage("Invalid "+subject+" in JSON: "+entryKey+"="+value);
     60      section.addErrorMessage("Invalid "+subject+" in JSON: "+entryKey+"="+value+(expected!=null?" (expected " +expected+")":""));
    4061      return null;
    4162    }
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/plugins/cmd/PlateWellValidator.java

    r6200 r6201  
    44import java.util.regex.Pattern;
    55
     6import net.sf.basedb.core.DbControl;
    67import net.sf.basedb.core.data.PlateCoordinate;
    78
     
    3637 
    3738  @Override
    38   public PlateCoordinate isValid(String value, JsonSection section, String entryKey)
     39  public PlateCoordinate isValid(DbControl dc, String value, JsonSection section, String entryKey)
    3940  {
    4041    Matcher m = pattern.matcher(value);
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/plugins/cmd/ValueValidator.java

    r6200 r6201  
    11package net.sf.basedb.reggie.plugins.cmd;
    22
     3import net.sf.basedb.core.DbControl;
    34
    45/**
     
    2324    is never null when this method is called.
    2425  */
    25   public T isValid(F value, JsonSection section, String entryKey);
     26  public T isValid(DbControl dc, F value, JsonSection section, String entryKey);
    2627 
    2728}
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/FutureSpecimenServlet.java

    r6199 r6201  
    175175            JSONObject jsonItem = (JSONObject)jsonItems.get(itemNo);
    176176            Number itemId = (Number)jsonItem.get("id");
    177             JsonFile jsonFile = new JsonFile((String)jsonItem.get("jsonFile"));
    178             jsonFile.downloadAndParse(session, rootPath);
     177            JsonFile jsonFile = new JsonFile(dc, (String)jsonItem.get("jsonFile"));
     178            jsonFile.downloadAndParse(dc, session, rootPath);
    179179           
    180180            Sample specimen = Sample.getById(dc, itemId.intValue());
Note: See TracChangeset for help on using the changeset viewer.