|
| | __construct (array $configuration, $plugin_id, $plugin_definition, ChadoBuddyPluginManager $buddy_manager, ChadoConnection $connection, Messenger $messenger, TripalLogger $logger, TripalFileRetriever $fileretriever, TripalBackendPublishManager $publish_manager,) |
| |
| | form ($form, &$form_state) |
| |
| | formValidate ($form, &$form_state) |
| |
| | run () |
| |
| | formSubmit ($form, &$form_state) |
| |
| | __construct (array $configuration, $plugin_id, $plugin_definition, ChadoConnection $connection, ?Messenger $messenger=NULL, ?TripalLogger $logger=NULL, ?TripalFileRetriever $fileretriever=NULL, ?TripalBackendPublishManager $publish_manager=NULL,) |
| |
| | getChadoConnection () |
| |
| | startTransactions () |
| |
| | addAnalysis ($form, &$form_state) |
| |
| | postRun () |
| |
| | __construct (array $configuration, $plugin_id, $plugin_definition, ?Messenger $messenger=NULL, ?TripalLogger $logger=NULL, ?TripalFileRetriever $fileretriever=NULL, ?TripalBackendPublishManager $publish_manager=NULL,) |
| |
| | describeUploadFileFormat () |
| |
| | setJob ($job) |
| |
| | rollbackTransaction (string $stage) |
| |
| | createImportJob ($run_args, $file_details=[]) |
| |
| | load ($import_id) |
| |
| | submitJob () |
| |
| | prepareFiles () |
| |
| | cleanFile () |
| |
| | setArguments (array $arguments) |
| |
| | getArguments () |
| |
|
| | updateExisting ($root_taxon=NULL) |
| |
| | findOrganism ($taxid, $sci_name) |
| |
| | addOrganism ($sci_name, $rank) |
| |
| | importRecord ($taxid, $root_taxon=NULL, $organism=NULL) |
| |
| | addProperty ($organism_id, $term_name, $value, $rank=0) |
| |
| | addDbxref ($organism_id, $taxId) |
| |
| | addBundleTypeProperty (string $pkey, int $record_id, string $property_table, string $termIdSpace, string $termAccession, string $value='', ?int $rank=NULL) |
| |
| | setTotalItems ($total_items) |
| |
| | addItemsHandled ($num_handled) |
| |
| | setItemsHandled ($total_handled) |
| |
| | setInterval ($interval) |
| |
| | xmlIsValid (string $xml) |
| |
◆ __construct()
◆ addDbxref()
| Drupal\tripal_chado\Plugin\TripalImporter\TaxonomyImporter::addDbxref |
( |
|
$organism_id, |
|
|
|
$taxId |
|
) |
| |
|
protected |
- Parameters
-
| unknown | $organism_id | |
| unknown | $taxId | |
◆ addOrganism()
| Drupal\tripal_chado\Plugin\TripalImporter\TaxonomyImporter::addOrganism |
( |
|
$sci_name, |
|
|
|
$rank |
|
) |
| |
|
protected |
Adds a new organism record to Chado.
- Parameters
-
| sci_name | The scientific name as provied by NCBI Taxonomy. |
| $rank | The rank of the organism as provied by NCBI Taxonomy. |
◆ addProperty()
| Drupal\tripal_chado\Plugin\TripalImporter\TaxonomyImporter::addProperty |
( |
|
$organism_id, |
|
|
|
$term_name, |
|
|
|
$value, |
|
|
|
$rank = 0 |
|
) |
| |
|
protected |
Adds a property to an organism node.
- Parameters
-
| $organism_id | The organism ID to which the property is added. |
| $term_name | The name of the organism property term. This term must be present in the 'local' cv. |
| $value | The value of the property. |
| $rank | The order for this property. The first instance of this term for this organism should be zero. Defaults to zero. |
◆ create()
| static Drupal\tripal_chado\Plugin\TripalImporter\TaxonomyImporter::create |
( |
ContainerInterface |
$container, |
|
|
array |
$configuration, |
|
|
|
$plugin_id, |
|
|
|
$plugin_definition |
|
) |
| |
|
static |
Implements ContainerFactoryPluginInterface->create().
We are injecting an additional dependency here, the ChadoBuddyPluginManager.
Since we have implemented the ContainerFactoryPluginInterface this static function will be called behind the scenes when a Plugin Manager uses createInstance(). Specifically this method is used to determine the parameters to pass to the constructor.
- Parameters
-
| Symfony\Component\DependencyInjection\ContainerInterface | $container | The container. |
| array | $configuration | A configuration array containing information about the plugin instance. |
| string | $plugin_id | The plugin ID for the plugin instance. |
| mixed | $plugin_definition | The plugin implementation definition. |
- Returns
- static
Reimplemented from Drupal\tripal_chado\TripalImporter\ChadoImporterBase.
◆ findOrganism()
| Drupal\tripal_chado\Plugin\TripalImporter\TaxonomyImporter::findOrganism |
( |
|
$taxid, |
|
|
|
$sci_name |
|
) |
| |
|
protected |
Checks the Chado database to see if the organism already exists.
- Parameters
-
| $taxid | The taxonomic ID for the organism. |
| $sci_name | The scientific name for the organism as returned by NCBI |
◆ form()
| Drupal\tripal_chado\Plugin\TripalImporter\TaxonomyImporter::form |
( |
|
$form, |
|
|
& |
$form_state |
|
) |
| |
◆ formSubmit()
| Drupal\tripal_chado\Plugin\TripalImporter\TaxonomyImporter::formSubmit |
( |
|
$form, |
|
|
& |
$form_state |
|
) |
| |
{Handles submission of the form elements.The form elements provided in the implementation of the form() function can be used for special submit if needed.
- Parameters
-
| array | $form | The form array definition. |
| \Drupal\Core\Form\FormStateInterface | $form_state | The form state object. |
}
Implements Drupal\tripal\TripalImporter\Interfaces\TripalImporterInterface.
◆ formValidate()
| Drupal\tripal_chado\Plugin\TripalImporter\TaxonomyImporter::formValidate |
( |
|
$form, |
|
|
& |
$form_state |
|
) |
| |
◆ importRecord()
| Drupal\tripal_chado\Plugin\TripalImporter\TaxonomyImporter::importRecord |
( |
|
$taxid, |
|
|
|
$root_taxon = NULL, |
|
|
|
$organism = NULL |
|
) |
| |
|
protected |
Imports an organism from the NCBI taxonomy DB by its taxonomy ID
- Parameters
-
| $taxid | The NCBI Taxonomy ID. |
| $root_taxon | An optional taxon name for the root node if generating a sub-tree. |
| $organism | The organism object to which this taxonomy belongs. If the organism is NULL then it will be created. |
◆ run()
| Drupal\tripal_chado\Plugin\TripalImporter\TaxonomyImporter::run |
( |
| ) |
|
◆ tripal_taxon_importer_set_ncbi_api_key()
| static Drupal\tripal_chado\Plugin\TripalImporter\TaxonomyImporter::tripal_taxon_importer_set_ncbi_api_key |
( |
|
$form, |
|
|
& |
$form_state |
|
) |
| |
|
static |
Ajax callback for the TaxonomyImporter::form() function.
It is called when the user makes a change to the NCBI API key field and then moves their cursor out of the field.
- Parameters
-
| array | $form | The new form element. |
| \Drupal\Core\Form\FormStateInterface | $form_state | The state of the new form element. |
- Returns
- array The new api key field.
◆ updateExisting()
| Drupal\tripal_chado\Plugin\TripalImporter\TaxonomyImporter::updateExisting |
( |
|
$root_taxon = NULL | ) |
|
|
protected |
Imports details from NCBI Taxonomy for organisms that already exist.
◆ $all_orgs
| Drupal\tripal_chado\Plugin\TripalImporter\TaxonomyImporter::$all_orgs = [] |
|
protected |
Holds the list of all organisms currently in Chado. This list is needed when checking to see if an organism has already been loaded.
◆ $buddy_manager
| object Drupal\tripal_chado\Plugin\TripalImporter\TaxonomyImporter::$buddy_manager |
|
protected |
Used to store the manager so we can create various buddies
◆ $dbxref_buddy
| object Drupal\tripal_chado\Plugin\TripalImporter\TaxonomyImporter::$dbxref_buddy |
|
protected |
Provide the dbxref buddy instance
◆ $ncbitaxon_db_id
| Drupal\tripal_chado\Plugin\TripalImporter\TaxonomyImporter::$ncbitaxon_db_id = NULL |
|
protected |
ID of the NCBITaxon database in Chado
◆ $property_buddy
| object Drupal\tripal_chado\Plugin\TripalImporter\TaxonomyImporter::$property_buddy |
|
protected |
Provide the property buddy instance
◆ $retrieval_options
| array Drupal\tripal_chado\Plugin\TripalImporter\TaxonomyImporter::$retrieval_options |
|
protected |
Initial value:= [
'rate_limit' => 0.334,
'retry_delay' => 1.0,
]
The documentation for this class was generated from the following file:
- tripal_chado/src/Plugin/TripalImporter/TaxonomyImporter.php