@@ -12,38 +12,93 @@ setup_capsule_environment()
1212# parse CLI arguments
1313parser <- ArgumentParser()
1414
15- parser $ add_argument(" --count_type" , type = " character" , default = " clean" )
16- parser $ add_argument(" --feature_id_colname" , type = " character" , default = NULL , help = " Column name for feature IDs" )
17- parser $ add_argument(" --sample_id_colname" , type = " character" , default = NULL , help = " Column name for sample IDs" )
18- parser $ add_argument(" --group_colname" , type = " character" , default = " Group" , help = " Column name for sample groups" )
19- parser $ add_argument(" --label_colname" , type = " character" , default = NULL , help = " Column name for sample labels" )
20- parser $ add_argument(" --minimum_count_value_to_be_considered_nonzero" , type = " integer" , default = 8 , help = " Minimum count threshold" )
21- parser $ add_argument(" --minimum_number_of_samples_with_nonzero_counts_in_total" , type = " integer" , default = 7 , help = " Minimum samples with nonzero counts" )
22- parser $ add_argument(" --minimum_number_of_samples_with_nonzero_counts_in_a_group" , type = " integer" , default = 3 , help = " Minimum samples per group with nonzero counts" )
23- parser $ add_argument(" --use_cpm_counts_to_filter" , type = " logical" , default = TRUE , help = " Transform to CPM before filtering" )
24- parser $ add_argument(" --use_group_based_filtering" , type = " logical" , default = FALSE , help = " Use group-based filtering" )
25- parser $ add_argument(" --plot_corr_matrix_heatmap" , type = " logical" , default = TRUE , help = " Plot correlation heatmap" )
26- parser $ add_argument(" --interactive_plots" , type = " logical" , default = FALSE , help = " Create interactive plots with plotly" )
15+ parser $ add_argument(" --count_type" , type = " character" , default = " clean" )
16+ parser $ add_argument(
17+ " --feature_id_colname" ,
18+ type = " character" ,
19+ default = NULL ,
20+ help = " Column name for feature IDs"
21+ )
22+ parser $ add_argument(
23+ " --sample_id_colname" ,
24+ type = " character" ,
25+ default = NULL ,
26+ help = " Column name for sample IDs"
27+ )
28+ parser $ add_argument(
29+ " --group_colname" ,
30+ type = " character" ,
31+ default = " Group" ,
32+ help = " Column name for sample groups"
33+ )
34+ parser $ add_argument(
35+ " --label_colname" ,
36+ type = " character" ,
37+ default = NULL ,
38+ help = " Column name for sample labels"
39+ )
40+ parser $ add_argument(
41+ " --minimum_count_value_to_be_considered_nonzero" ,
42+ type = " integer" ,
43+ default = 8 ,
44+ help = " Minimum count threshold"
45+ )
46+ parser $ add_argument(
47+ " --minimum_number_of_samples_with_nonzero_counts_in_total" ,
48+ type = " integer" ,
49+ default = 7 ,
50+ help = " Minimum samples with nonzero counts"
51+ )
52+ parser $ add_argument(
53+ " --minimum_number_of_samples_with_nonzero_counts_in_a_group" ,
54+ type = " integer" ,
55+ default = 3 ,
56+ help = " Minimum samples per group with nonzero counts"
57+ )
58+ parser $ add_argument(
59+ " --use_cpm_counts_to_filter" ,
60+ type = " logical" ,
61+ default = TRUE ,
62+ help = " Transform to CPM before filtering"
63+ )
64+ parser $ add_argument(
65+ " --use_group_based_filtering" ,
66+ type = " logical" ,
67+ default = FALSE ,
68+ help = " Use group-based filtering"
69+ )
70+ parser $ add_argument(
71+ " --plot_corr_matrix_heatmap" ,
72+ type = " logical" ,
73+ default = TRUE ,
74+ help = " Plot correlation heatmap"
75+ )
76+ parser $ add_argument(
77+ " --interactive_plots" ,
78+ type = " logical" ,
79+ default = FALSE ,
80+ help = " Create interactive plots with plotly"
81+ )
2782
2883args <- parser $ parse_args()
2984
3085# load multiOmicDataSet from data directory
3186moo <- load_moo_from_data_dir()
3287
3388# run MOSuite
34- moo | >
35- filter_counts(
36- count_type = args $ count_type ,
37- feature_id_colname = args $ feature_id_colname ,
38- sample_id_colname = args $ sample_id_colname ,
39- group_colname = args $ group_colname ,
40- label_colname = args $ label_colname ,
41- minimum_count_value_to_be_considered_nonzero = args $ minimum_count_value_to_be_considered_nonzero ,
42- minimum_number_of_samples_with_nonzero_counts_in_total = args $ minimum_number_of_samples_with_nonzero_counts_in_total ,
43- minimum_number_of_samples_with_nonzero_counts_in_a_group = args $ minimum_number_of_samples_with_nonzero_counts_in_a_group ,
44- use_cpm_counts_to_filter = args $ use_cpm_counts_to_filter ,
45- use_group_based_filtering = args $ use_group_based_filtering ,
46- plot_corr_matrix_heatmap = args $ plot_corr_matrix_heatmap ,
47- interactive_plots = args $ interactive_plots
48- ) | >
49- write_rds(file.path(getOption(" moo_plots_dir" ), " .." , " moo" , " moo-filt.rds" ))
89+ moo | >
90+ filter_counts(
91+ count_type = args $ count_type ,
92+ feature_id_colname = args $ feature_id_colname ,
93+ sample_id_colname = args $ sample_id_colname ,
94+ group_colname = args $ group_colname ,
95+ label_colname = args $ label_colname ,
96+ minimum_count_value_to_be_considered_nonzero = args $ minimum_count_value_to_be_considered_nonzero ,
97+ minimum_number_of_samples_with_nonzero_counts_in_total = args $ minimum_number_of_samples_with_nonzero_counts_in_total ,
98+ minimum_number_of_samples_with_nonzero_counts_in_a_group = args $ minimum_number_of_samples_with_nonzero_counts_in_a_group ,
99+ use_cpm_counts_to_filter = args $ use_cpm_counts_to_filter ,
100+ use_group_based_filtering = args $ use_group_based_filtering ,
101+ plot_corr_matrix_heatmap = args $ plot_corr_matrix_heatmap ,
102+ interactive_plots = args $ interactive_plots
103+ ) | >
104+ write_rds(file.path(getOption(" moo_plots_dir" ), " .." , " moo" , " moo-filt.rds" ))
0 commit comments