Tripal Plant PopGen Submit
|
Go to the source code of this file.
Functions | |
tpps_check_organisms ($row, array &$options=array()) | |
tpps_clean_state (array &$form_state) | |
tpps_generate_popstruct ($study_accession, $vcf_location) | |
tpps_get_code_parts ($part) | |
tpps_get_env_response ($layer_id, $lat, $long) | |
tpps_get_environmental_layer_data ($layer_id, $lat, $long, $param) | |
tpps_get_species_codes ($genus, $species) | |
tpps_job_logger_write ($string, $replacements=[]) | |
tpps_other_marker_headers ($fid, array $cols) | |
tpps_process_accession ($row, array &$options, $job=NULL) | |
tpps_process_environment_layers ($row, array &$options=array()) | |
tpps_process_genotype_spreadsheet ($row, array &$options=array()) | |
tpps_process_phenotype_data ($row, array &$options=array()) | |
tpps_process_phenotype_meta ($row, array &$options=array()) | |
tpps_process_snp_association ($row, array &$options=array()) | |
tpps_refine_phenotype_meta (array &$meta, array $time_options=array(), TripalJob &$job=NULL) | |
tpps_ssrs_headers ($fid, $ploidy) | |
tpps_submit_all ($accession, TripalJob $job=NULL) | |
tpps_submit_environment (array &$form_state, $i, TripalJob &$job=NULL) | |
tpps_submit_genotype (array &$form_state, array $species_codes, $i, TripalJob &$job=NULL) | |
tpps_submit_page_1 (array &$form_state, TripalJob &$job=NULL) | |
tpps_submit_page_2 (array &$form_state, TripalJob &$job=NULL) | |
tpps_submit_page_3 (array &$form_state, TripalJob &$job=NULL) | |
tpps_submit_page_4 (array &$form_state, TripalJob &$job=NULL) | |
tpps_submit_phenotype (array &$form_state, $i, TripalJob &$job=NULL) | |
tpps_submit_summary (array &$form_state) | |
tpps_submit_vcf_render_genotype_combination ($raw_value, $ref, $alt) | |
Variables | |
$tpps_job = NULL | |
$tpps_job_logger = NULL | |
Defines function tpps_submit_all and its helper functions.
The functions defined in this file do not actually submit the genotype, phenotype, or environmental data collected from page 4. That data is instead submitted through a Tripal job due to the size of the data.
Definition in file submit_all.php.
tpps_check_organisms | ( | $row, | |
array & | $options = array() |
||
) |
This function will process a row from an accession file.
mixed | $row | The item yielded by the TPPS file generator. |
array | $options | Additional options set when calling tpps_file_iterator(). |
Definition at line 2206 of file submit_all.php.
tpps_clean_state | ( | array & | $form_state | ) |
Cleans unnecessary information from the form state.
Uses tpps_form_state_info() as a helper function.
array | $form_state | The form state to be cleaned. |
Definition at line 3471 of file submit_all.php.
tpps_generate_popstruct | ( | $study_accession, | |
$vcf_location | |||
) |
TPPS Generate Population Structure FastStructure requires pip install pip==9.0.1 to install dependencies
Definition at line 1821 of file submit_all.php.
tpps_get_code_parts | ( | $part | ) |
Helper function for tpps_get_species_codes().
Generate all possible 2-letter organism code parts.
string | $part | The part of the organism name, either genus or species. |
Definition at line 3514 of file submit_all.php.
tpps_get_env_response | ( | $layer_id, | |
$lat, | |||
$long | |||
) |
This function loads data for a CartograPlant layer at a lat/long coordinate.
int | $layer_id | The identifier of the CartograPlant environmental layer. |
float | $lat | The latitude coordinate being queried. |
float | $long | The longitude coordinate being queried. |
Definition at line 3122 of file submit_all.php.
tpps_get_environmental_layer_data | ( | $layer_id, | |
$lat, | |||
$long, | |||
$param | |||
) |
This function parses and returns a data point from a CartograPlant layer.
The data point for the layer at the specified location is obtained by calling tpps_get_env_response, and the resulting response string is parsed to return the specified parameter.
int | $layer_id | The identifier of the CartograPlant environmental layer. |
float | $lat | The latitude coordinate being queried. |
float | $long | The longitude coordinate being queried. |
string | $param | The name of the parameter type. |
Definition at line 3093 of file submit_all.php.
tpps_get_species_codes | ( | $genus, | |
$species | |||
) |
Generate all possible 4-letter TreeGenes organism codes.
string | $genus | The genus of the organism. |
string | $species | The species of the organism. |
Definition at line 3489 of file submit_all.php.
tpps_job_logger_write | ( | $string, | |
$replacements = [] |
|||
) |
Writes data to the tpps_job_logger_handle
string | $string | Write string to the job log file using the tpps_job_logger object |
Definition at line 160 of file submit_all.php.
tpps_other_marker_headers | ( | $fid, | |
array | $cols | ||
) |
This function formats headers for the "other" type genotype markers.
The headers for the "other" genotype marker types are set by the users, so we need to return the names of the headers they have indicated, rather than the values provided in the file-groups array.
int | $fid | The Drupal managed file id of the file. |
array | $cols | An array of columns indicating which of the columns contain genotype data. |
Definition at line 2957 of file submit_all.php.
tpps_process_accession | ( | $row, | |
array & | $options, | ||
$job = NULL |
|||
) |
This function processes a single row of an accession file.
This function is meant to be used with tpps_file_iterator().
mixed | $row | The item yielded by the TPPS file generator. |
array | $options | Additional options set when calling tpps_file_iterator(). |
Definition at line 3218 of file submit_all.php.
tpps_process_environment_layers | ( | $row, | |
array & | $options = array() |
||
) |
This function processes a single row of a plant accession file.
This function populates the db with environmental data provided through CartograPlant layers. This function is meant to be used with tpps_file_iterator().
mixed | $row | The item yielded by the TPPS file generator. |
array | $options | Additional options set when calling tpps_file_iterator(). |
Definition at line 2978 of file submit_all.php.
tpps_process_genotype_spreadsheet | ( | $row, | |
array & | $options = array() |
||
) |
This function processes a single row of a genotype spreadsheet.
This function is used for SNP assay files, SSR spreadsheets, and other marker type spreadsheets. The functionality is slightly different based on the type of marker being processed (this is set in the options array). This function is meant to be used with tpps_file_iterator().
mixed | $row | The item yielded by the TPPS file generator. |
array | $options | Additional options set when calling tpps_file_iterator(). |
Definition at line 2625 of file submit_all.php.
tpps_process_phenotype_data | ( | $row, | |
array & | $options = array() |
||
) |
This function will process a row from a phenotype data file.
This function is used for standard phenotypes of both phenotype formats, as well as phenotype isotope files. The functionality is slightly different based on the type of phenotype file being processed (set in the options array). This function is meant to be used with tpps_file_iterator().
mixed | $row | The item yielded by the TPPS file generator. |
array | $options | Additional options set when calling tpps_file_iterator(). |
Definition at line 2342 of file submit_all.php.
tpps_process_phenotype_meta | ( | $row, | |
array & | $options = array() |
||
) |
This function will process a row from a phenotype metadata file.
mixed | $row | The item yielded by the TPPS file generator. |
array | $options | Additional options set when calling tpps_file_iterator(). |
Definition at line 2223 of file submit_all.php.
tpps_process_snp_association | ( | $row, | |
array & | $options = array() |
||
) |
This function processes a single row of a genotype association file.
This function is used for SNP association files. This function is meant to be used with tpps_file_iterator().
mixed | $row | The item yielded by the TPPS file generator. |
array | $options | Additional options set when calling tpps_file_iterator(). |
Definition at line 2808 of file submit_all.php.
tpps_refine_phenotype_meta | ( | array & | $meta, |
array | $time_options = array() , |
||
TripalJob & | $job = NULL |
||
) |
This function will further refine existing phenotype metadata.
The function mostly just adds cvterm ids where applicable.
array | $meta | The existing metadata array. |
array | $time_options | The array of options for time-based phenotypes. |
TripalJob | $job | The TripalJob object for the submission job. |
Definition at line 2260 of file submit_all.php.
tpps_ssrs_headers | ( | $fid, | |
$ploidy | |||
) |
This function formats headers for a microsatellite spreadsheet.
SSR/cpSSR spreadsheets will often have blank or duplicate headers, depending on the ploidy of the organism they are meant for. This file standardizes the headers for the spreadsheet so that they can be used with the tpps_process_genotype_spreadsheet() function.
int | $fid | The Drupal managed file id of the file. |
string | $ploidy | The ploidy of the organism, as indicated by the user. |
Definition at line 2856 of file submit_all.php.
tpps_submit_all | ( | $accession, | |
TripalJob | $job = NULL |
||
) |
Creates a record for the project and calls the submission helper functions.
string | $accession | The accession number of the form being submitted. |
TripalJob | $job | The TripalJob object for the submission job. |
Definition at line 25 of file submit_all.php.
tpps_submit_environment | ( | array & | $form_state, |
$i, | |||
TripalJob & | $job = NULL |
||
) |
Submits environmental information for one species.
array | $form_state | The TPPS submission object. |
int | $i | The organism number we are submitting. |
TripalJob | $job | The TripalJob object for the submission job. |
Definition at line 2105 of file submit_all.php.
tpps_submit_genotype | ( | array & | $form_state, |
array | $species_codes, | ||
$i, | |||
TripalJob & | $job = NULL |
||
) |
Submits genotype information for one species.
array | $form_state | The TPPS submission object. |
array | $species_codes | An array of 4-letter species codes associated with the submission. |
int | $i | The organism number we are submitting. |
TripalJob | $job | The TripalJob object for the submission job. |
Definition at line 1206 of file submit_all.php.
tpps_submit_page_1 | ( | array & | $form_state, |
TripalJob & | $job = NULL |
||
) |
Submits Publication and Species data to the database.
array | $form_state | The state of the form being submitted. |
TripalJob | $job | The TripalJob object for the submission job. |
Definition at line 189 of file submit_all.php.
tpps_submit_page_2 | ( | array & | $form_state, |
TripalJob & | $job = NULL |
||
) |
Submits Study Design data to the database.
array | $form_state | The state of the form being submitted. |
TripalJob | $job | The TripalJob object for the submission job. |
Definition at line 447 of file submit_all.php.
tpps_submit_page_3 | ( | array & | $form_state, |
TripalJob & | $job = NULL |
||
) |
Submits Plant Accession data to the database.
array | $form_state | The state of the form being submitted. |
TripalJob | $job | The TripalJob object for the submission job. |
Definition at line 630 of file submit_all.php.
tpps_submit_page_4 | ( | array & | $form_state, |
TripalJob & | $job = NULL |
||
) |
Submits Tripal FASTAImporter job for reference genome.
The remaining data for the fourth page is submitted during the TPPS File Parsing Tripal Job due to its size.
array | $form_state | The state of the form being submitted. |
TripalJob | $job | The TripalJob object for the submission job. |
Definition at line 854 of file submit_all.php.
tpps_submit_phenotype | ( | array & | $form_state, |
$i, | |||
TripalJob & | $job = NULL |
||
) |
Submits phenotype information for one species.
array | $form_state | The TPPS submission object. |
int | $i | The organism number we are submitting. |
TripalJob | $job | The TripalJob object for the submission job. |
Definition at line 976 of file submit_all.php.
tpps_submit_summary | ( | array & | $form_state | ) |
Submits additional data provided in the summary page to the database.
array | $form_state | The state of the form being submitted. |
Definition at line 3155 of file submit_all.php.
tpps_submit_vcf_render_genotype_combination | ( | $raw_value, | |
$ref, | |||
$alt | |||
) |
Render genotype combination
string | $raw_value | Tree ID genotype value from VCF file |
string | $ref | REF value |
string | $alt | ALT value |
Definition at line 2073 of file submit_all.php.
$tpps_job = NULL |
Definition at line 14 of file submit_all.php.
$tpps_job_logger = NULL |
Definition at line 13 of file submit_all.php.