-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing services for blast programs.
- Loading branch information
1 parent
a8480a9
commit cc58946
Showing
4 changed files
with
197 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?php | ||
/** | ||
* @file | ||
* Form definition of BLASTp program. | ||
*/ | ||
|
||
namespace Drupal\tripal_blast\Services; | ||
|
||
use Drupal\tripal_blast\Services\TripalBlastProgramHelper; | ||
|
||
/** | ||
* BLASTp program class. | ||
*/ | ||
class TripalBlastProgramBlastp { | ||
const BLASTp = 'blastp'; | ||
|
||
/** | ||
* Advanced field names used - refer to this value when | ||
* validating and submitting fields under advanced options. | ||
*/ | ||
public function formFieldNames() { | ||
// Keys match field names used in form definition below. | ||
$field_name_validator = []; | ||
return $field_name_validator; | ||
} | ||
|
||
/** | ||
* Adds the BLASTp Advanced Options to the passed in form. | ||
* This form function is meant to be called within another form definition. | ||
* | ||
* @param $blast_cache | ||
* BLAST job history to reference information information contained. | ||
* | ||
* @return array | ||
* Additional form field definitions. | ||
*/ | ||
public function formOptions($blast_cache) { | ||
$blast = self::BLASTp; | ||
|
||
// Edit and Resubmit functionality. | ||
// We want to pull up the details from a previous blast and fill them in as defaults | ||
// for this blast. | ||
$options = (isset($blast_cache)) ? $blast_cache : []; | ||
$defaults = TripalBlastProgramHelper::programGetDefaultValues($options, $blast); | ||
|
||
$form_alter = []; | ||
|
||
return $form_alter; | ||
} | ||
|
||
/** | ||
* Map advanced options specific to this program to BLAST keywords. | ||
* | ||
* @param $advanced_field_names | ||
* Values set from form ($form_state). | ||
* | ||
* @return array | ||
* Form values mapped to BLAST keywords. | ||
*/ | ||
public function formFieldBlastKey($advanced_field_values) { | ||
return []; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?php | ||
/** | ||
* @file | ||
* Form definition of BLASTx program. | ||
*/ | ||
|
||
namespace Drupal\tripal_blast\Services; | ||
|
||
use Drupal\tripal_blast\Services\TripalBlastProgramHelper; | ||
|
||
/** | ||
* BLASTx program class. | ||
*/ | ||
class TripalBlastProgramBlastx { | ||
const BLASTx = 'blastx'; | ||
|
||
/** | ||
* Advanced field names used - refer to this value when | ||
* validating and submitting fields under advanced options. | ||
*/ | ||
public function formFieldNames() { | ||
// Keys match field names used in form definition below. | ||
$field_name_validator = []; | ||
return $field_name_validator; | ||
} | ||
|
||
/** | ||
* Adds the BLASTx Advanced Options to the passed in form. | ||
* This form function is meant to be called within another form definition. | ||
* | ||
* @param $blast_cache | ||
* BLAST job history to reference information information contained. | ||
* | ||
* @return array | ||
* Additional form field definitions. | ||
*/ | ||
public function formOptions($blast_cache) { | ||
$blast = self::BLASTx; | ||
|
||
// Edit and Resubmit functionality. | ||
// We want to pull up the details from a previous blast and fill them in as defaults | ||
// for this blast. | ||
$options = (isset($blast_cache)) ? $blast_cache : []; | ||
$defaults = TripalBlastProgramHelper::programGetDefaultValues($options, $blast); | ||
|
||
$form_alter = []; | ||
return $form_alter; | ||
} | ||
|
||
/** | ||
* Map advanced options specific to this program to BLAST keywords. | ||
* | ||
* @param $advanced_field_names | ||
* Values set from form ($form_state). | ||
* | ||
* @return array | ||
* Form values mapped to BLAST keywords. | ||
*/ | ||
public function formFieldBlastKey($advanced_field_values) { | ||
return []; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?php | ||
/** | ||
* @file | ||
* Form definition of tBLASTn program. | ||
*/ | ||
|
||
namespace Drupal\tripal_blast\Services; | ||
|
||
use Drupal\tripal_blast\Services\TripalBlastProgramHelper; | ||
|
||
/** | ||
* tBLASTn program class. | ||
*/ | ||
class TripalBlastProgramTblastn { | ||
const tBLASTn = 'tblastn'; | ||
|
||
/** | ||
* Advanced field names used - refer to this value when | ||
* validating and submitting fields under advanced options. | ||
*/ | ||
public function formFieldNames() { | ||
// Keys match field names used in form definition below. | ||
$field_name_validator = []; | ||
return $field_name_validator; | ||
} | ||
|
||
/** | ||
* Adds the tBLASTn Advanced Options to the passed in form. | ||
* This form function is meant to be called within another form definition. | ||
* | ||
* @param $blast_cache | ||
* BLAST job history to reference information information contained. | ||
* | ||
* @return array | ||
* Additional form field definitions. | ||
*/ | ||
public function formOptions($blast_cache) { | ||
$blast = self::tBLASTn; | ||
|
||
// Edit and Resubmit functionality. | ||
// We want to pull up the details from a previous blast and fill them in as defaults | ||
// for this blast. | ||
$options = (isset($blast_cache)) ? $blast_cache : []; | ||
$defaults = TripalBlastProgramHelper::programGetDefaultValues($options, $blast); | ||
|
||
$form_alter = []; | ||
|
||
return $form_alter; | ||
} | ||
|
||
/** | ||
* Map advanced options specific to this program to BLAST keywords. | ||
* | ||
* @param $advanced_field_names | ||
* Values set from form ($form_state). | ||
* | ||
* @return array | ||
* Form values mapped to BLAST keywords. | ||
*/ | ||
public function formFieldBlastKey($advanced_field_values) { | ||
return []; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters