Validates the genotype section of the fourth page of the form.
344 $id =
"organism-$org_num";
345 $snps = $genotype[
'SNPs'];
346 $ref_genome = $genotype[
'ref-genome'];
347 $file_type = $genotype[
'files'][
'file-type'];
348 $vcf = isset($genotype[
'files'][
'vcf']) ? $genotype[
'files'][
'vcf'] : 0;
349 $snps_assay = isset($genotype[
'files'][
'snps-assay']) ? $genotype[
'files'][
'snps-assay'] : 0;
350 $assoc_file = $genotype[
'files'][
'snps-association'] ?? 0;
351 $other_file = isset($genotype[
'files'][
'other']) ? $genotype[
'files'][
'other'] : 0;
352 $thirdpage = $form_state[
'saved_values'][
TPPS_PAGE_3];
353 $species_index = empty($thirdpage[
'tree-accession'][
'check']) ?
'species-1' :
"species-$org_num";
354 $tree_accession_file = $thirdpage[
'tree-accession'][$species_index][
'file'];
355 $id_col_accession_name = $thirdpage[
'tree-accession'][$species_index][
'file-groups'][
'Tree Id'][
'1'];
358 form_set_error(
"$id][genotype][ref-genome", t(
"Reference Genome: field is required."));
360 elseif ($ref_genome ===
'bio') {
361 if (!$genotype[
'tripal_eutils'][
'accession']) {
362 form_set_error(
"$id][genotype][tripal_eutils][accession", t(
'NCBI Accession Number: field is required.'));
364 $connection = new \EUtils();
366 $connection->setPreview();
367 $parsed = $connection->get($genotype[
'tripal_eutils'][
'db'], $genotype[
'tripal_eutils'][
'accession']);
368 foreach ($_SESSION[
'messages'][
'status'] as $key => $message) {
369 if ($message ==
'<pre>biosample</pre>') {
370 unset($_SESSION[
'messages'][
'status'][$key]);
371 if (empty($_SESSION[
'messages'][
'status'])) {
372 unset($_SESSION[
'messages'][
'status']);
377 $form_state[
'values'][
'parsed'] = $parsed;
379 catch (\Exception $e) {
380 form_set_error(
"$id][genotype][tripal_eutils][accession", $e->getMessage());
383 elseif ($ref_genome ===
'url' or $ref_genome ===
'manual' or $ref_genome ===
'manual2') {
385 $class =
'FASTAImporter';
386 tripal_load_include_importer_class($class);
387 $fasta_vals = $genotype[
'tripal_fasta'];
389 $file_upload = isset($fasta_vals[
'file'][
'file_upload']) ? trim($fasta_vals[
'file'][
'file_upload']) : 0;
390 $file_existing = isset($fasta_vals[
'file'][
'file_upload_existing']) ? trim($fasta_vals[
'file'][
'file_upload_existing']) : 0;
391 $file_remote = isset($fasta_vals[
'file'][
'file_remote']) ? trim($fasta_vals[
'file'][
'file_remote']) : 0;
392 $db_id = trim($fasta_vals[
'db'][
'db_id']);
393 $re_accession = trim($fasta_vals[
'db'][
're_accession']);
394 $analysis_id = trim($fasta_vals[
'analysis_id']);
395 $seqtype = trim($fasta_vals[
'seqtype']);
397 if (!$file_upload and !$file_existing and !$file_remote) {
398 form_set_error(
"$id][genotype][tripal_fasta][file", t(
"Assembly file: field is required."));
401 if ($db_id and !$re_accession) {
402 form_set_error(
"$id][genotype][tripal_fasta][additional][re_accession", t(
'Accession regular expression: field is required.'));
404 if ($re_accession and !$db_id) {
405 form_set_error(
"$id][genotype][tripal_fasta][additional][db_id", t(
'External Database: field is required.'));
409 form_set_error(
"$id][genotype][tripal_fasta][analysis_id", t(
'Analysis: field is required.'));
412 form_set_error(
"$id][genotype][tripal_fasta][seqtype", t(
'Sequence Type: field is required.'));
415 if (!form_get_errors()) {
416 $assembly = $file_existing ? $file_existing : ($file_upload ? $file_upload : $file_remote);
420 if (implode(
'', $genotype[
'marker-type']) ===
'000') {
421 form_set_error(
"$id][genotype][marker-type", t(
"Genotype Marker Type: field is required."));
423 elseif ($genotype[
'marker-type'][
'SNPs']) {
424 if (!$snps[
'genotyping-design']) {
425 form_set_error(
"$id][genotype][SNPs][genotyping-design", t(
"Genotyping Design: field is required."));
427 elseif ($snps[
'genotyping-design'] ==
'1') {
429 form_set_error(
"$id][genotype][SNPs][GBS", t(
"GBS Type: field is required."));
431 elseif ($snps[
'GBS'] ==
'5' and !$snps[
'GBS-other']) {
432 form_set_error(
"$id][genotype][SNPs][GBS=other", t(
"Custom GBS Type: field is required."));
435 elseif ($snps[
'genotyping-design'] ==
'2') {
436 if (!$snps[
'targeted-capture']) {
437 form_set_error(
"$id][genotype][SNPs][targeted-capture", t(
"Targeted Capture: field is required."));
439 elseif ($snps[
'targeted-capture'] ==
'2' and !$snps[
'targeted-capture-other']) {
440 form_set_error(
"$id][genotype][SNPs][targeted-capture-other", t(
"Custom Targeted Capture: field is required."));
444 elseif ($genotype[
'marker-type'][
'SSRs/cpSSRs'] and empty($genotype[
'SSRs/cpSSRs'])) {
445 form_set_error(
"$id][genotype][SSRs/cpSSRs", t(
"SSRs/cpSSRs: field is required."));
447 elseif ($genotype[
'marker-type'][
'SSRs/cpSSRs'] and empty($genotype[
'files'][
'ploidy'])) {
448 form_set_error(
"$id][genotype][files][ploidy", t(
"Ploidy: field is required."));
450 elseif ($genotype[
'marker-type'][
'Other'] and empty($genotype[
'other-marker'])) {
451 form_set_error(
"$id][genotype][other-marker", t(
"Other Genotype marker: field is required."));
454 if (preg_match(
'/^0+$/', implode(
'', $file_type))) {
455 form_set_error(
"$id][genotype][files][file-type", t(
"Genotype File Type: field is required."));
460 if (!empty($loaded_state[
'vcf_replace'])) {
461 foreach ($loaded_state[
'vcf_replace'] as $org_num => $fid) {
462 if (file_load($fid)) {
463 $form_state[
'values'][
"organism-$org_num"][
'genotype'][
'files'][
'vcf'] = $fid;
465 $form_state[
'values'][
"organism-$org_num"][
'genotype'][
'files'][
'local_vcf_check'] = NULL;
466 $form_state[
'values'][
"organism-$org_num"][
'genotype'][
'files'][
'local_vcf'] = NULL;
468 if (!file_load($fid)) {
469 form_set_error(
"$org_num][genotype][files][local_vcf", t(
"Local VCF File: File could not be loaded properly."));
474 if (!empty($file_type[
'VCF']) and !$vcf and trim($form_state[
'values'][
"organism-$org_num"][
'genotype'][
'files'][
'local_vcf']) ==
'') {
475 form_set_error(
"$id][genotype][files][vcf", t(
"Genotype VCF File: field is required."));
477 elseif (!empty($file_type[
'VCF'])) {
478 if (($ref_genome ===
'manual' or $ref_genome ===
'manual2' or $ref_genome ===
'url') and isset($assembly) and $assembly and !form_get_errors()) {
479 if (trim($form_state[
'values'][
"organism-$org_num"][
'genotype'][
'files'][
'local_vcf']) !=
'') {
480 $local_vcf_path = trim($form_state[
'values'][
"organism-$org_num"][
'genotype'][
'files'][
'local_vcf']);
481 $vcf_content = gzopen($local_vcf_path,
'r');
484 $vcf_content = gzopen(file_load($vcf)->uri,
'r');
486 $assembly_content = gzopen(file_load($assembly)->uri,
'r');
488 while (($vcf_line = gzgets($vcf_content)) !== FALSE) {
489 if ($vcf_line[0] !=
'#') {
491 $vcf_values = explode(
"\t", $vcf_line);
492 $scaffold_id = $vcf_values[0];
495 while (($assembly_line = gzgets($assembly_content)) !== FALSE) {
496 if ($assembly_line[0] !=
'>') {
499 if (preg_match(
'/^(.*?)\s.*$/', $assembly_line, $matches)) {
500 $assembly_scaffold = $matches[1];
502 if ($assembly_scaffold[0] ==
'>') {
503 $assembly_scaffold = substr($assembly_scaffold, 1);
505 if ($assembly_scaffold == $scaffold_id) {
511 fclose($assembly_content);
512 $assembly_content = gzopen(file_load($assembly)->uri,
'r');
513 while (($assembly_line = gzgets($assembly_content)) !== FALSE) {
514 if ($assembly_line[0] !=
'>') {
517 if (preg_match(
'/^(.*?)\s.*$/', $assembly_line, $matches)) {
518 $assembly_scaffold = $matches[1];
520 if ($assembly_scaffold[0] ==
'>') {
521 $assembly_scaffold = substr($assembly_scaffold, 1);
523 if ($assembly_scaffold == $scaffold_id) {
531 form_set_error(
"$id][genotype][files][vcf", t(
"VCF File: scaffold @scaffold_id not found in assembly file(s)", array(
'@scaffold_id' => $scaffold_id)));
537 if (empty($loaded_state[
'vcf_replace']) && trim($form_state[
'values'][
"organism-$org_num"][
'genotype'][
'files'][
'local_vcf']) !=
'') {
538 form_set_error(
"$org_num][genotype][files][local_vcf", t(
"Local VCF File: File needs to be pre-validated. Please click on Pre-validate my VCF files button at the bottom."));
541 if (!empty($loaded_state[
'vcf_validated']) and $loaded_state[
'vcf_validated'] === TRUE and empty($loaded_state[
'vcf_val_errors'])) {
542 drupal_set_message(t(
'VCF files pre-validated. Skipping VCF file validation'));
544 elseif (!form_get_errors()) {
546 $vcf_file = file_load($vcf);
547 if (trim($form_state[
'values'][
"organism-$org_num"][
'genotype'][
'files'][
'local_vcf']) !=
'') {
548 $location = trim($form_state[
'values'][
"organism-$org_num"][
'genotype'][
'files'][
'local_vcf']);
553 $vcf_content = gzopen($location,
'r');
555 while (($vcf_line = gzgets($vcf_content)) !== FALSE) {
556 if (preg_match(
'/#CHROM/', $vcf_line)) {
557 $vcf_line = explode(
"\t", $vcf_line);
558 for ($j = 9; $j < count($vcf_line); $j++) {
559 $stocks[] = trim($vcf_line[$j]);
565 if (count($stocks) == 0) {
566 form_set_error(
"$id][genotype][files][vcf", t(
"Genotype VCF File: unable to parse Plant Identifiers. The format of your VCF file must be invalid"));
569 if (count($stocks) != 0) {
570 $missing_plants = array();
571 foreach ($stocks as $stock_id) {
572 if (array_search($stock_id, $accession_ids) === FALSE) {
573 $missing_plants[] = $stock_id;
576 if (count($missing_plants) > 0) {
577 $missing_plants = implode(
', ', $missing_plants);
578 form_set_error(
"$id][genotype][files][vcf", t(
"Genotype VCF File: We found Plant Identifiers in your VCF file that were not present in your accession file. Please either add these plants to your accession file or remove them from your VCF file. The missing plants are: @missing_plants.", array(
'@missing_plants' => $missing_plants)));
582 if (!form_get_errors()) {
583 $form_state[
'values'][$id][
'genotype'][
'files'][
'vcf_genotype_count'] =
tpps_file_len($vcf);
591 if (!empty($file_type[
'SNPs Genotype Assay']) and !$snps_assay) {
592 form_set_error(
"$id][genotype][files][snps-assay", t(
"SNPs Assay file: field is required."));
594 elseif (!empty($file_type[
'SNPs Genotype Assay'])) {
596 $id_col_name = key($headers);
597 while (($k = array_search(NULL, $headers))) {
598 drupal_set_message(t(
'Following header column is Null which needs to be fixed. %data', array(
'%data' => $k)),
'error');
602 $num_unique_columns = count(array_unique($headers)) - 1;
603 if ($num_unique_columns != $num_columns) {
604 $duplicates = array_diff_assoc($headers, array_unique($headers));
605 if (!empty($duplicates)) {
606 drupal_set_message(t(
'Following header values are duplicate in provided snp file. %data', array(
'%data' => implode(
',', $duplicates))),
'error');
608 form_set_error(
"$id][genotype][files][snps-assay", t(
"SNPs Assay file: some columns in the file you provided are missing or have duplicate header values. Please either enter valid header values for those columns or remove those columns, then reupload your file."));
611 if (!form_get_errors()) {
612 $acc_no_header = $thirdpage[
'tree-accession'][$species_index][
'file-no-header'];
613 $missing_trees =
tpps_compare_files($snps_assay, $tree_accession_file, $id_col_name, $id_col_accession_name, FALSE, $acc_no_header);
614 if ($missing_trees !== array()) {
615 $tree_id_str = implode(
', ', $missing_trees);
616 form_set_error(
"$id][genotype][files][snps-assay", t(
"SNPs Assay file: We detected Plant Identifiers that were not in your Plant Accession file. Please either remove these plants from your Genotype file, or add them to your Plant Accession file. The Plant Identifiers we found were: @tree_id_str", array(
'@tree_id_str' => $tree_id_str)));
623 if (!form_get_errors()) {
624 if (!empty($file_type[
'SNPs Associations']) and !$assoc_file) {
625 form_set_error(
"$id][genotype][files][snps-association", t(
"SNPs Associations file: field is required."));
627 elseif (!empty($file_type[
'SNPs Associations'])) {
628 $required_groups = array(
633 'scaffold' => array(2),
636 'position' => array(3),
639 'allele' => array(4),
641 'Associated Trait' => array(
644 'Confidence Value' => array(
645 'confidence' => array(6),
649 $file_element = $form[$id][
'genotype'][
'files'][
'snps-association'];
652 if (!form_get_errors()) {
654 $snps_id_col = $groups[
'SNP ID'][1];
655 $assoc_no_header = $genotype[
'files'][
'snps-association-no-header'] ?? FALSE;
658 unset($assay_snps[key($assay_snps)]);
660 $missing_snps = array_diff($assoc_snps, $assay_snps);
662 if ($missing_snps !== array()) {
663 $snps_id_str = implode(
', ', $missing_snps);
664 form_set_error(
"$id][genotype][files][snps-association", t(
"SNPs Association File: We detected SNP IDs that were not in your Genotype Assay. Please either remove these SNPs from your Association file, or add them to your Genotype Assay. The SNP Identifiers we found were: @snps_id_str", array(
'@snps_id_str' => $snps_id_str)));
668 $trait_id_col = $groups[
'Associated Trait'][5];
671 $phenotype = $form_state[
'values'][$id][
'phenotype'];
672 $phenotype_meta = $phenotype[
'metadata'];
673 $phenotype_number = $phenotype[
'phenotypes-meta'][
'number'];
675 $phenotype_meta_names = array();
676 $phenotype_name_col = $form_state[
'values'][$id][
'phenotype'][
'metadata-groups'][
'Phenotype Id'][
'1'] ?? NULL;
677 if (isset($phenotype_name_col)) {
681 for ($i = 1; $i <= $phenotype_number; $i++) {
682 $phenotype_meta_names[] = $phenotype[
'phenotypes-meta'][$i][
'name'];
685 $missing_phenotypes = array_diff($association_phenotypes, $phenotype_meta_names);
686 if ($missing_phenotypes !== array()) {
687 $phenotype_names_str = implode(
', ', $missing_phenotypes);
688 form_set_error(
"$id][genotype][files][snps-association",
"SNPs Association File: We detected Associated Traits that were not specified in the Phenotype Metadata Section. Please either remove these Traits from your Association file, or add them to your Phenotype Metadata section. The Trait names we foud were: $phenotype_names_str");
692 $position_col = $groups[
'Position'][3];
694 foreach ($positions as $position) {
695 if (!preg_match(
'/^(\d+):(\d+)$/', $position)) {
696 form_set_error(
"$id][genotype][files][snps-association", t(
'SNPs Association File: We detected SNP positions that do not match the required format. The correct format is: "start:stop".'));
705 if (empty($genotype[
'files'][
'snps-association-type'])) {
706 form_set_error(
"$id][genotype][files][snps-association-type", t(
"SNPs Association Type: field is required."));
709 if (empty($genotype[
'files'][
'snps-association-tool'])) {
710 form_set_error(
"$id][genotype][files][snps-association-tool", t(
"SNPs Association Tool: field is required."));
713 if (!empty($genotype[
'files'][
'snps-pop-struct'])) {
715 tpps_preserve_valid_file($form_state, $genotype[
'files'][
'snps-pop-struct'], $org_num,
"SNPs_Population_Structure");
718 if (!empty($genotype[
'files'][
'snps-kinship'])) {
726 if (!empty($file_type[
'Assay Design']) and !$genotype[
'files'][
'assay-load']) {
727 form_set_error(
"$id][genotype][files][assay-load", t(
"Assay Design: field is required."));
729 elseif (!empty($file_type[
'Assay Design']) and $genotype[
'files'][
'assay-load'] ==
'new' and !$genotype[
'files'][
'assay-design']) {
730 form_set_error(
"$id][genotype][files][assay-design", t(
"Assay Design file: field is required."));
732 elseif (!empty($file_type[
'Assay Design']) and $genotype[
'files'][
'assay-load'] ==
'new') {
736 elseif (!empty($file_type[
'Assay Design']) and $genotype[
'files'][
'assay-load'] !=
'new') {
737 $file = file_load($genotype[
'files'][
'assay-load']);
738 file_usage_add($file,
'tpps',
'tpps_project', substr($form_state[
'accession'], 4));
739 $form_state[
'file_info'][
TPPS_PAGE_4][$file->fid] =
'#NO_RENAME';
742 if (!empty($file_type[
'SSRs/cpSSRs Genotype Spreadsheet']) and !$genotype[
'files'][
'ssrs']) {
743 form_set_error(
"$id][genotype][files][ssrs]", t(
"SSRs/cpSSRs Spreadsheet: field is required."));
745 elseif (!empty($file_type[
'SSRs/cpSSRs Genotype Spreadsheet']) and !empty($genotype[
'files'][
'ploidy'])) {
747 $form_state[
'values'][
"organism-$org_num"][
'genotype'][
'files'][
'ssrs-empty'] = $form[
"organism-$org_num"][
'genotype'][
'files'][
'ssrs'][
'#value'][
'empty'];
748 $genotype[
'files'][
'ssrs-empty'] = $form_state[
'values'][
"organism-$org_num"][
'genotype'][
'files'][
'ssrs-empty'];
749 $id_col_name = key($headers);
750 while (($k = array_search(NULL, $headers))) {
754 $num_unique_columns = count(array_unique($headers)) - 1;
756 tpps_ssr_valid_ploidy($genotype[
'files'][
'ploidy'], $num_columns, $num_unique_columns,
"$id][genotype][files][ssrs");
758 if (!empty($genotype[
'files'][
'ssr-extra-check'])) {
759 if (empty($genotype[
'files'][
'extra-ssr-type'])) {
760 form_set_error(
"$id][genotype][files][extra-ssr-type", t(
"Define Additional SSRs/cpSSRs Type: field is required."));
763 if (!$genotype[
'files'][
'ssrs_extra']) {
764 form_set_error(
"$id][genotype][files][ssrs_extra]", t(
"SSRs/cpSSRs Additional Spreadsheet: field is required."));
766 elseif (!empty($genotype[
'files'][
'extra-ploidy'])) {
768 $id_col_name = key($headers);
769 while (($k = array_search(NULL, $headers))) {
773 $num_unique_columns = count(array_unique($headers)) - 1;
775 tpps_ssr_valid_ploidy($genotype[
'files'][
'extra-ploidy'], $num_columns, $num_unique_columns,
"$id][genotype][files][ssrs_extra");
779 if (!form_get_errors()) {
780 $acc_no_header = $thirdpage[
'tree-accession'][$species_index][
'file-no-header'];
781 $missing_trees =
tpps_compare_files($genotype[
'files'][
'ssrs'], $tree_accession_file, $id_col_name, $id_col_accession_name, FALSE, $acc_no_header);
783 if ($missing_trees !== array()) {
784 $tree_id_str = implode(
', ', $missing_trees);
785 form_set_error(
"$id][genotype][files][ssrs", t(
"SSRs/cpSSRs Genotype Spreadsheet: We detected Plant Identifiers that were not in your Plant Accession file. Please either remove these plants from your Genotype file, or add them to your Plant Accession file. The Plant Identifiers we found were: @tree_id_str", array(
'@tree_id_str' => $tree_id_str)));
789 if (!form_get_errors()) {
791 'empty' => $genotype[
'files'][
'ssrs-empty'] ?? NULL,
792 'org_num' => $org_num,
799 if (!empty($genotype[
'files'][
'ssrs_extra'])) {
800 tpps_preserve_valid_file($form_state, $genotype[
'files'][
'ssrs_extra'], $org_num,
"Genotype_SSR_Additional_Spreadsheet");
804 if (!empty($file_type[
'Indel Genotype Spreadsheet']) and !$genotype[
'files'][
'indels']) {
805 form_set_error(
"$id][genotype][files][indels]", t(
"Indel Genotype Spreadsheet: field is required."));
807 elseif (!empty($file_type[
'Indel Genotype Spreadsheet'])) {
808 $indel_fid = $genotype[
'files'][
'indels'];
810 $id_col_name = key($headers);
811 while (($k = array_search(NULL, $headers))) {
815 $num_unique_columns = count(array_unique($headers)) - 1;
817 if ($num_unique_columns != $num_columns) {
818 form_set_error(
"$id][genotype][files][indels", t(
"Indel Genotype Spreadsheet: some columns in the file you provided are missing or have duplicate header values. Please either enter valid header values for those columns or remove those columns, then reupload your file."));
821 if (!form_get_errors()) {
822 $acc_no_header = $thirdpage[
'tree-accession'][$species_index][
'file-no-header'];
823 $missing_trees =
tpps_compare_files($indel_fid, $tree_accession_file, $id_col_name, $id_col_accession_name, FALSE, $acc_no_header);
825 if ($missing_trees !== array()) {
826 $tree_id_str = implode(
', ', $missing_trees);
827 form_set_error(
"$id][genotype][files][indels", t(
"Indel Genotype Spreadsheet: We detected Plant Identifiers that were not in your Plant Accession file. Please either remove these plants from your Genotype file, or add them to your Plant Accession file. The Plant Identifiers we found were: @tree_id_str", array(
'@tree_id_str' => $tree_id_str)));
835 if (!empty($file_type[
'Other Marker Genotype Spreadsheet']) and !$genotype[
'files'][
'other']) {
836 form_set_error(
"$id][genotype][files][other]", t(
"Other Marker Spreadsheet: field is required."));
838 elseif (!empty($file_type[
'Other Marker Genotype Spreadsheet'])) {
839 if (array_key_exists(
'columns', $form[$id][
'genotype'][
'files'][
'other'])) {
840 $required_groups = array(
844 'Genotype Data' => array(
849 $file_element = $form[$id][
'genotype'][
'files'][
'other'];
852 if (!form_get_errors()) {
853 $id_col_genotype_name = $groups[
'Tree Id'][
'1'];
856 if (!array_key_exists(
'columns', $form[$id][
'genotype'][
'files'][
'other'])) {
858 if (!form_get_errors()) {
859 $id_col_genotype_name = key($headers);
863 if (!form_get_errors()) {
864 $acc_no_header = $thirdpage[
'tree-accession'][$species_index][
'file-no-header'];
865 $other_no_header = $genotype[
'files'][
'other-no-header'] ?? FALSE;
866 $missing_trees =
tpps_compare_files($other_file, $tree_accession_file, $id_col_genotype_name, $id_col_accession_name, $other_no_header, $acc_no_header);
868 if ($missing_trees !== array()) {
869 $tree_id_str = implode(
', ', $missing_trees);
870 form_set_error(
"$id][genotype][files][other",
"Other Marker Genotype Spreadsheet: We detected Plant Identifiers that were not in your Plant Accession file. Please either remove these plants from your Genotype file, or add them to your Plant Accession file. The Plant Identifiers we found were: $tree_id_str");
tpps_file_headers($fid, $no_header=FALSE)
tpps_ssr_valid_ploidy($ploidy, $num_columns, $num_unique_columns, $name)
tpps_parse_file_column($fid, $column, $no_header=FALSE)
tpps_load_submission($accession, $state=TRUE)
tpps_get_location($location)
tpps_file_validate_columns(array &$form_state, array $required_groups, array $file_element)
tpps_file_iterator($fid, $function, array &$options=array())
tpps_compare_files($fid_1, $fid_2, $file_1_id_name, $file_2_id_name, $file_1_no_header=FALSE, $file_2_no_header=FALSE)