add_id_date_repeated()
|
Returns a dataframe with the Id, Date, and Repeated column added, which
are derived from the Animal.ID column. |
add_sqlmed_codes()
|
Returns df dataframe with the SqlMed procedure_name, procedure_id,
test_id, and test_name values added to the df. |
apply_divisor()
|
Returns mfi_df with each value divided by the appropriate divisors |
blank_fill_ids()
|
Returns the Ids in right blank filled and upper case animal Ids. |
combine_lines()
|
Returns character vector of length 1 made up of text found in two character
vector elements as subsetted according to start and end locations. |
create_luminex_screen_results_tbl()
|
Returns TRUE if the creation of the pdl_result table was successful. |
create_pdl_results_tbl()
|
Returns TRUE if the creation of the pdl_results table was successful. |
create_spf_samples_tbl()
|
Returns TRUE if the creation of the spf_samples table was successful. |
divisors_match()
|
Returns a logical value indicating whether or not the list of divisor
names in
the file ``cutoff.xlsx'' is the same as the list within the .lxd file. |
fix_pdl_csv_columns()
|
Returns pdl_df with columns renamed, added and ordered to prepare the
dataframe for inserting into the pdl_result table. |
fmt_luminex_results()
|
Conditionally formats a worksheet based on data within the dataframe as a
side effect. |
get_agents_and_antigen_pairs()
|
Returns dataframe of possible antigen pairs and agents |
get_all_combined()
|
Returns dataframe with multiple combined results from antigen results |
get_all_df()
|
Returns a dataframe with all bead or all summary results combined
depending on which function and column names are passed in. |
get_all_files()
|
Returns the list of pathology report files with an extension of ".pdf"
found in folders indicated by the years between start_year and end_year
inclusive. |
get_all_regions()
|
Returns a dataframe with the files, order, and Region[@name]s
for a specific Setup, for example 'DefaultSetup'. |
get_all_summary_df()
|
Returns a dataframe with all summary results combined. |
get_antigen_pairs()
|
Returns a dataframe with the agent and two antigens used to assay for it. |
get_assay_pairs()
|
Returns a dataframe, with sets of assays with an antibody assay (ab_assay)
and a PCR based assay (pcr_assay) for each agent. |
get_bad_date_ids_and_id_ids()
|
Returns a list with two character vectors containing the items in the
vector dates that are not Ids and the items in ids that are not Ids. |
get_bead_df()
|
Get bead call multipliers from results section of Excel SPF Report file. |
get_bead_headers()
|
Returns a dataframe with all headers found in the bead results as seen by
get_bead_df() |
get_col_boundaries()
|
Returns an integer vector with the the positions in the line that begin
each column label. |
get_col_names()
|
Returns character vector of column names base on type requested. |
get_combined()
|
Returns dataframe with combined results from antigen results |
get_date_from_sample()
|
Returns the date from a sample column if it exist else NA. |
get_divisor_mismatch()
|
Returns a charcter vector with the file names of files that have region
names that do not
match those found in ``cutoff.xlsx'' |
get_divisors()
|
Returns a named numeric vector with the divisors originally provided by the
vendor and copied into the Excel sheet "../inst/extdata/cutoff.xlsx" |
get_empty_pdl_df()
|
Returns empty pdl_df |
get_excel_divisors()
|
Returns a named numeric vector with the divisors originally provided by the
vendor and copied into the Excel sheet "../inst/extdata/cutoff.xlsx" |
get_file_ids()
|
Returns integer vector with plate numbers |
get_followup_pool_samples()
|
Returns assay results for individual animals based on assay results of pooled
samples. |
get_followup()
|
Returns ``followup'' assay results, which are groups of assay results for an
animal beginning with the first non-negative result and all subsequent
results. |
get_id_date_repeated()
|
Returns dataframe with true animal Ids (Id) and date strings (Date) from
Animal.ID column. |
get_id_from_sample()
|
Returns the first integer value from a sample column if it exist else NA. |
get_low_positive_controls()
|
Finds any wells with low positive controls |
get_luminex_species()
|
Returns species desination of "CYNO", "MACAQUE" or "PAPIO" at this time.
If the Id does not belong to a cyno, baboon, or rhesus, the arc_species_code
is used. |
get_Machine_info()
|
Returns Machine serialNumber, name, sftwareVersion, firmwareVersion, and
DSPVersion |
get_mean_raw_mfi_from_lxd()
|
Returns the mean_raw_mfi_df from an XML file (.lxd extension) from the
Luminex machine. |
get_mean_raw_mfi_from_xlsx()
|
Returns the mean_raw_mfi_df from an Excel file (.xlsx extension) |
get_mean_raw_mfi()
|
Returns dataframe with means of replicated samples |
get_melted_bead_2_wide()
|
Returns bead based wide dataframe from bead based melted dataframe. |
get_most_recent_file()
|
Returns the most recent assay file name for each plate number |
get_most_recent_files()
|
Returns the most recent assay file name for each plate number |
get_one_record_df()
|
Returns a one record dataframe with the data from one assay record. |
get_pdl_csv_data()
|
Returns pdl data from their CSV files given a list of filenames and the
relative or absolute path. |
get_pdl_meta_data_from_content()
|
Returns specified value from a pdl_report$content object |
get_pdl_nonnegative_reports()
|
Returns non-negative results from PDL reports results |
get_pdl_report_date()
|
Returns report date from a pdl_report object |
get_pdl_report_file_name()
|
Returns report file name from a pdl_report object |
get_pdl_reports()
|
Returns a list of lists of length two containing $content and $meta lists
derived from each PDL report. |
get_pdl_results_test_comment()
|
Returns a character vector of length 2 with the result and comment |
get_pdl_results()
|
Get PDL results |
get_plateID()
|
Returns Plate[@plateID] (plateID attribute of the Plate node.) |
get_pooled_sample_df()
|
Returns dataframe with animal Ids, cage location, bleed date, whether not a
blood sample was expected, whether or not a sample was received, and the
Pool Id number. |
get_positive_antigens()
|
Returns positive antigens based on low control value and a multiplier |
get_possible_ids_dates()
|
Returns a list of length 2 with possible$ids and possible$dates |
get_raw_mfi_df()
|
Returns dataframe with raw mfi values from the raw section of the Excel
file. |
get_raw_mfi_tables()
|
Returns character vector with the raw data (raw mfi) table |
get_raw_mfi()
|
Returns dataframe of original values |
get_region_df()
|
Returns a dataframe with region order, region name, and region id |
get_repeated_from_sample()
|
Returns a character vector of 'Y' if the sample indicates it is a
repeat else 'N' |
get_report_date_from_filename()
|
Returns report date in yyyy-mm-dd format as derived from the file names. |
get_result_tables()
|
Returns character vector with the result tables |
get_sample_df()
|
Returns dataframe with animal Ids, cage location, bleed date, whether not a
blood sample was expected, whether or not a sample was received, and the
Pool Id number if present. |
get_sample_type_trans()
|
Returns the corrected sample type given slightly malformed or incomplete
sample types. |
get_session_date_tm()
|
Returns date and time of assay based on '//Plate[@name]. |
get_setup_name()
|
Returns the Setup[@name]s for a lum |
get_snprc_id()
|
Returns an SNPRC animal Id of the pdl_animal_id represents an individual
animal |
get_start_end_dates()
|
Returns data frame with file and start_date as the two columns give
a list of luminex data file names |
get_still_pos()
|
Get dataframe of animals where the most recent assay was not negative. |
get_summary_df()
|
Returns dataframe with summary results from the results section of the Excel
file. |
get_test_antigens()
|
Returns the list of test antigens |
get_usable_files()
|
Returns a character vector of names of usable files. |
get_version()
|
getVersion Get the version number of snprcspf |
get_wide_df()
|
Returns a list of dataframes that have been converted to wide format using
dcast |
get_workset_desc()
|
Returns /WorkSet/Description from XML |
get_yyyymmdd_from_possible_dates()
|
Returns yyyymmdd in with optional separator between date units if
string looks like a date. |
getRunPropertyValue()
|
Returns value of run property if one is available else NA is provided. |
getTransformedOutputFile()
|
Returns full name with path of transformed output file. |
handleErrorsAndWarnings()
|
Returns NULL: does not return -- writes the maximumSeverity level to the
transformRunProperties file and the error message to the error.html file. |
insert_combined_assay_results()
|
Returns the number of saved records |
insert_missing_lines()
|
Returns character vector representing the contents of the pdl_report$content
with the missing second lines of data replaced. |
insert_pdl_results()
|
Returns the number of records inserted into pdl_results |
insert_spf_samples()
|
Returns the number of records inserted into spf_samples |
is_column_labels()
|
Returns TRUE if a line is an expected set of column labels |
luminex_agent_to_sqlmed_test_id()
|
Returns a numeric vector of SqlMed test_id given a character
vector of luminex_agent. |
luminex_agent_to_sqlmed_test_name()
|
Returns a character vector of SqlMed test_name given a character
vector of luminex_agent. |
luminex_to_sqlmed_procedure_id()
|
Returns a numeric vector of SqlMed procedure_id given a character
vector of luminex_species and luminex_repeatedy. |
luminex_to_sqlmed_procedure_name()
|
Returns a character vector of SqlMed procedure_names given a character
vector of Luminex_assay. |
make_excel_wkbk()
|
Form an Excel workbook and worksheet similar in format to those being
made by Luis Giavedoni's laboratory. |
mdy_to_yyyymmdd()
|
Returns character vector of dates where entities of mm/dd/yy or
mm-dd-yy are converted to yyyymmdd. |
merge_pooled_and_pdl()
|
Returns a dataframe with pooled_df merged with pdl_df by pooled_id with
pdl_animal_id. All pooled records are retained. |
na_to_char()
|
Replaces an NA value with a character string |
pdl_assay_to_sqlmed_procedure_id()
|
Returns a character vector of SqlMed procedure_id given a character
vector of pdl_assay. |
pdl_assay_to_sqlmed_procedure_name()
|
Returns a character vector of SqlMed procedure_names given a character
vector of pdl_assay. |
pdl_assay_to_sqlmed_test_id()
|
Returns a character vector of SqlMed test_id given a character
vector of pdl_assay. |
pdl_assay_to_sqlmed_test_name()
|
Returns a character vector of SqlMed test_name given a character
vector of pdl_assay. |
pdl_report_to_df()
|
Returns dataframe with parsed content of pdl_report |
pdl_reports_to_df()
|
Returns dataframe with results from all report files in directory. |
pooled_bleed_date_to_sample_date()
|
Returns pooled_df dataframe with bleed_date replaced by sample_date. |
pooled_Y_or_N()
|
Returns "Y" if a sample is pooled and "N" if it is an individual sample. |
print_bad_animal_ids()
|
Returns a dataframe of file names, sample, snprc_id, and sample_date and
has the side effect
of printing out the bad Ids in a table with file name LocName |
print_bad_sample_dates()
|
Returns a dataframe of file names, LocName, animal Id, and sample date and
has the side effect
of printing out the bad sample dates in a table with file name LocName |
read_sample_file()
|
Read blood or dna sample file |
readRunPropertiesFile()
|
Returns a dataframe with four columns ("name", "value",
"java_data_type", and "location"), which is defined when a Run Properties
File provided by the system is read. |
remove_bad_animal_ids()
|
Returns only good SNPRC animal Ids given a character vector of potential Ids |
remove_bn_and_dash_R()
|
Returns samples with "Bn" and "-R" trimmed off of each end |
remove_pdl_report_headers()
|
Returns content for PDL reports without introductory material and end of
page material |
replace_bad_csv_files()
|
Returns a dataframe with a row for each bad CSV file with the original
name and the renamed file |
report_missing_samples()
|
Creates an Excel file with a list of samples that were expected but not
received. |
report_unexpected_samples()
|
Returns a list of samples that were expected but not
received. |
save_excel_sheet()
|
Returns the file name of the Excel file created which contains the
dataframes provided as an arguments to the function. |
setMaxSeverity()
|
Returns integer value of error level (0:NONE, 1:WARN, 2:ERROR) used to set
run_error$level. |
sort_occurances()
|
Returns a sorted dataframe with First occurrances appearing in
chronological order followed by all subsequent assay results.
Sample results based on pooled samples are included. If an animal is lost
to followup due to leaving the institution or death a record indicating that
event and date is the last record in the group. |
spf_odbcConnect()
|
Returns database connection object |
strip_column_labels()
|
Returns content minus column labels. Fails with a call to stop()
if anticipated labels are not present |
subtract_background()
|
Returns mfi_df dataframe values with wBAC column subtracted from each
value and the wBAC and the Human IgG, wBAC and Goat anti-human IgG rows
removed from raw_mfi_df |
test_for_bleed_date()
|
Throws and error on one or more provided bleed dates occur on a date that
the animal was not alive. If the animal never existed at SNPRC, it was not
alive.
It terminates the script with an informative
message saying what was wrong otherwise it simply returns NULL. |
test_for_cage()
|
Throws and error on one or more bad cage numbers are provided.
It terminates the script with an informative
message saying what was wrong otherwise it simply returns NULL. |
test_for_snprc_id()
|
Throws and error on one or more bad animal Ids.
It terminates the script with an informative
message saying what was wrong otherwise it simply returns NULL. |
test_for_yes_no()
|
Throws and error on bad input for the expected_blood
or received_blood column
that terminates the script with an informative
message saying what was wrong otherwise it simply returns NULL. |
triggerError()
|
Returns NULL: does not return -- triggers error and stops execution |
triggerWarning()
|
Returns run_error , after setting run_error$level to 1 if
triggers warning and continues execution |