|
9 | 9 | import gov.doe.jgi.boost.client.constants.BOOSTResources; |
10 | 10 | import gov.doe.jgi.boost.client.constants.JSONKeys; |
11 | 11 | import gov.doe.jgi.boost.enums.FileFormat; |
| 12 | +import gov.doe.jgi.boost.enums.SequenceType; |
12 | 13 | import gov.doe.jgi.boost.enums.Strategy; |
| 14 | +import gov.doe.jgi.boost.enums.Vendor; |
13 | 15 | import gov.doe.jgi.boost.exception.BOOSTBackEndException; |
14 | 16 | import gov.doe.jgi.boost.exception.BOOSTClientException; |
15 | 17 |
|
@@ -383,33 +385,48 @@ public JSONObject getJobReport(final String jobUUID) |
383 | 385 | // throw new BOOSTClientException(e.getLocalizedMessage()); |
384 | 386 | // } |
385 | 387 | // } |
386 | | -// |
387 | | -// |
388 | | -// /** |
389 | | -// * The polish() method verifies the sequences in a given file against the |
390 | | -// * gene synthesis constraints of a commercial synthesis vendor. |
391 | | -// * In case of violations, the polish() method modifies the coding regions |
392 | | -// * of the sequence using the specified codon replacement strategy. |
393 | | -// * |
394 | | -// * @param sequencesFilename ... the name of the file that contains the sequences |
395 | | -// * @param type ... the type of the sequences, i.e. DNA, RNA, Protein |
396 | | -// * @param bCodingSequences ... if the sequences are encoded in a format that does not |
397 | | -// * support sequence feature annotations and if bCoding sequences is set to true, |
398 | | -// * then are all sequences are treated as coding sequences. If the sequences are |
399 | | -// * encoded in a format that does support sequence feature annotations, then the |
400 | | -// * bCodingSequences flag is ignored. |
401 | | -// * @param vendor ... the name of commercial synthesis provider |
402 | | -// * @param strategy ... the codon replacement strategy |
403 | | -// * @param codonUsageTableFilename ... the name of the file that contains the codon |
404 | | -// * usage table |
405 | | -// * |
406 | | -// * @throws BOOSTClientException |
407 | | -// */ |
408 | | -// public void polish(final String sequencesFilename, SequenceType type, boolean bCodingSequences, |
409 | | -// Vendor vendor, Strategy strategy, final String codonUsageTableFilename) |
410 | | -// throws BOOSTClientException { |
411 | | -// |
412 | | -// // check if the user did a login previously |
| 388 | + |
| 389 | + |
| 390 | + /** |
| 391 | + * The polish() method verifies the sequences in a given file against the |
| 392 | + * gene synthesis constraints of a commercial synthesis vendor. |
| 393 | + * In case of violations, the polish() method modifies the coding regions |
| 394 | + * of the sequence using the specified codon replacement strategy. |
| 395 | + * |
| 396 | + * @param sequencesFilename ... the name of the file that contains the sequences |
| 397 | + * @param type ... the type of the sequences, i.e. DNA, RNA, Protein |
| 398 | + * @param bCodingSequences ... if the sequences are encoded in a format that does not |
| 399 | + * support sequence feature annotations and if bCoding sequences is set to true, |
| 400 | + * then are all sequences are treated as coding sequences. If the sequences are |
| 401 | + * encoded in a format that does support sequence feature annotations, then the |
| 402 | + * bCodingSequences flag is ignored. |
| 403 | + * @param vendor ... the name of commercial synthesis provider |
| 404 | + * @param strategy ... the codon replacement strategy |
| 405 | + * @param codonUsageTableFilename ... the name of the file that contains the codon |
| 406 | + * usage table |
| 407 | + * |
| 408 | + * @throws BOOSTClientException |
| 409 | + * @throws BOOSTBackEndException |
| 410 | + */ |
| 411 | + public String polish( |
| 412 | + final String sequencesFilename, |
| 413 | + boolean bCodingSequences, |
| 414 | + Vendor vendor, |
| 415 | + Strategy strategy, |
| 416 | + final FileFormat outputFormat, |
| 417 | + final String codonUsageTable) |
| 418 | + throws BOOSTClientException, BOOSTBackEndException { |
| 419 | + |
| 420 | + // construct the request's JSON object |
| 421 | + JSONObject requestData = RequestBuilder.buildPolish( sequencesFilename, |
| 422 | + bCodingSequences, vendor, strategy, outputFormat, codonUsageTable); |
| 423 | + |
| 424 | + return submitJob(requestData); |
| 425 | + |
| 426 | + } |
| 427 | + |
| 428 | + |
| 429 | + // check if the user did a login previously |
413 | 430 | // if(null == token) { |
414 | 431 | // throw new BOOSTClientException("You must authenticate first!"); |
415 | 432 | // } |
|
0 commit comments