Mercurial > repos > recetox > recetox_aplcms_unsupervised
comparison main.R @ 2:10093dea9b3f draft default tip
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/recetox_aplcms commit 19de0924a65bc65cbbf7c1fc17e9b5348305f95c
author | recetox |
---|---|
date | Fri, 10 Jun 2022 10:14:43 +0000 |
parents | 4e6281945270 |
children |
comparison
equal
deleted
inserted
replaced
1:4e6281945270 | 2:10093dea9b3f |
---|---|
77 unsupervised_main <- function(sample_files, aligned_file, recovered_file, out_format, ...) { | 77 unsupervised_main <- function(sample_files, aligned_file, recovered_file, out_format, ...) { |
78 sample_files <- sort_samples_by_acquisition_number(sample_files) | 78 sample_files <- sort_samples_by_acquisition_number(sample_files) |
79 | 79 |
80 res <- unsupervised(filenames = sample_files, ...) | 80 res <- unsupervised(filenames = sample_files, ...) |
81 | 81 |
82 save_all_extracted_features(res$extracted_features, sample_files) | 82 save_all_features(res, sample_files) |
83 save_all_corrected_features(res$corrected_features, sample_files) | 83 save_all_feature_tables(res$aligned_feature_sample_table, res$recovered_feature_sample_table, aligned_file, recovered_file, out_format) |
84 | |
85 save_aligned_feature_table(res$aligned_feature_sample_table, aligned_file) | |
86 save_recovered_feature_table(res$recovered_feature_sample_table, recovered_file, out_format) | |
87 } | 84 } |
88 | 85 |
89 hybrid_main <- function(sample_files, known_table_file, updated_known_table_file, pairing_file, aligned_file, recovered_file, out_format, ...) { | 86 hybrid_main <- function(sample_files, known_table_file, updated_known_table_file, pairing_file, aligned_file, recovered_file, out_format, ...) { |
90 sample_files <- sort_samples_by_acquisition_number(sample_files) | 87 sample_files <- sort_samples_by_acquisition_number(sample_files) |
91 | 88 |
93 res <- hybrid(filenames = sample_files, known_table = known, ...) | 90 res <- hybrid(filenames = sample_files, known_table = known, ...) |
94 | 91 |
95 save_known_table(res$updated_known_table, updated_known_table_file) | 92 save_known_table(res$updated_known_table, updated_known_table_file) |
96 save_pairing(res$features_known_table_pairing, pairing_file) | 93 save_pairing(res$features_known_table_pairing, pairing_file) |
97 | 94 |
98 save_all_extracted_features(res$extracted_features, sample_files) | 95 save_all_features(res, sample_files) |
99 save_all_corrected_features(res$corrected_features, sample_files) | 96 save_all_feature_tables(res$aligned_feature_sample_table, res$recovered_feature_sample_table, aligned_file, recovered_file, out_format) |
97 } | |
100 | 98 |
101 save_aligned_feature_table(res$aligned_feature_sample_table, aligned_file) | 99 save_all_features <- function(result, sample_files) { |
102 save_recovered_feature_table(res$recovered_feature_sample_table, recovered_file, out_format) | 100 save_all_extracted_features(result$extracted_features, sample_files) |
101 save_all_corrected_features(result$corrected_features, sample_files) | |
102 } | |
103 | |
104 save_all_feature_tables <- function(aligned_feature_sample_table, | |
105 recovered_feature_sample_table, | |
106 aligned_file, | |
107 recovered_file, | |
108 out_format) { | |
109 save_aligned_feature_table(aligned_feature_sample_table, aligned_file) | |
110 save_recovered_feature_table(recovered_feature_sample_table, recovered_file, out_format) | |
103 } | 111 } |
104 | 112 |
105 two_step_hybrid_main <- function(sample_files, known_table_file, updated_known_table_file, recovered_file, aligned_file, out_format, metadata, ...) { | 113 two_step_hybrid_main <- function(sample_files, known_table_file, updated_known_table_file, recovered_file, aligned_file, out_format, metadata, ...) { |
106 sample_files <- sort_samples_by_acquisition_number(sample_files) | 114 sample_files <- sort_samples_by_acquisition_number(sample_files) |
107 metadata <- read.table(metadata, sep = ",", header = TRUE) | 115 metadata <- read.table(metadata, sep = ",", header = TRUE) |