@@ -33,8 +33,8 @@ isa_import <- function(
3333 sample_sheet , # Sample sheet (TSV), needs sampleID and condition cols
3434 gtf_file , # GTF file used for alignment and isoform quantification
3535 transcripts_fa , # Path to the transcriptomic fasta file
36- condition_1 , # Group1 in the contrast, creates comparison g1 vs. g2
37- condition_2 , # Group2 in the contrast, creates comparison g1 vs. g2
36+ case_group , # Group1 in the contrast, creates comparison g1 vs. g2
37+ control_group , # Group2 in the contrast, creates comparison g1 vs. g2
3838 run_sva = FALSE , # Automatically detect and correct unwanted sources of variation
3939 alpha_filter = 1.0 , # Adjusted p-value filter, default no filtering
4040 dif_filter = 0.0 # Differential isoform fraction filter, default no filtering
@@ -57,17 +57,18 @@ isa_import <- function(
5757 # Filter the design matrix to only
5858 # include the samples of interest
5959 design_matrix <- design_matrix [
60- design_matrix $ condition == condition_1 | design_matrix $ condition == condition_2 ,
60+ design_matrix $ condition == case_group | design_matrix $ condition == control_group ,
6161 ]
6262
6363 # Create a contrast/comparison
6464 # data frame object, must contain
6565 # the following columns:
66- # - 'condition_1' ~ i.e Case
67- # - 'condition_2' ~ i.e Control (baseline group)
66+ # - 'condition_2' ~ i.e Case
67+ # - 'condition_1' ~ i.e Control (baseline group)
68+ # dIF = IF2 - IF1
6869 comparison <- data.frame (
69- condition_1 = condition_1 ,
70- condition_2 = condition_2
70+ condition_1 = control_group ,
71+ condition_2 = case_group
7172 )
7273
7374 # Import the per-sample salmon
@@ -219,7 +220,7 @@ parser$add_argument(
219220# the resulting contrast will be
220221# group1 vs. group2
221222parser $ add_argument(
222- " -c1" , " --condition_1 " ,
223+ " -c1" , " --case_group " ,
223224 help = " Group1 in the contrast, the contrast will be 'group1 vs. group2', required." ,
224225 type = " character" ,
225226 required = TRUE
@@ -229,7 +230,7 @@ parser$add_argument(
229230# the resulting contrast will be
230231# group1 vs. group2
231232parser $ add_argument(
232- " -c2" , " --condition_2 " ,
233+ " -c2" , " --control_group " ,
233234 help = " Group2 in the contrast, the contrast will be 'group1 vs. group2'. This represents the baseline group in the comparison, required." ,
234235 type = " character" ,
235236 required = TRUE
@@ -281,7 +282,7 @@ args <- parser$parse_args()
281282# Create output directory
282283# if it does not exist
283284outdir <- args $ output_directory
284- comparison <- paste(args $ condition_1 , args $ condition_2 , sep = " -" )
285+ comparison <- paste(args $ case_group , args $ control_group , sep = " -" )
285286prefix <- file.path(outdir , comparison )
286287dir.create(
287288 file.path(outdir ),
@@ -295,8 +296,8 @@ isa_list <- isa_import(
295296 output_dir = args $ output_directory ,
296297 sample_sheet = args $ sample_sheet ,
297298 gtf_file = args $ gtf_file ,
298- condition_1 = args $ condition_1 ,
299- condition_2 = args $ condition_2 ,
299+ case_group = args $ case_group ,
300+ control_group = args $ control_group ,
300301 transcripts_fa = args $ transcriptome_fa ,
301302 run_sva = args $ sva_correction ,
302303 alpha_filter = args $ pvalue_filter ,
0 commit comments