Skip to content

Commit 27964d6

Browse files
committed
Properly pass 'reference_gtf' argument
1 parent 8f776f9 commit 27964d6

File tree

1 file changed

+23
-10
lines changed

1 file changed

+23
-10
lines changed

R/read10xVisiumWrapper.R

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,29 @@ read10xVisiumWrapper <- function(samples = "",
7878
load = load
7979
)
8080

81-
spe <- spe_add_info(
82-
spe = spe,
83-
samples = samples,
84-
sample_id = sample_id,
85-
reference_gtf = reference_gtf,
86-
chrM = chrM,
87-
gtf_cols = gtf_cols,
88-
add_analysis = add_analysis,
89-
verbose = verbose
90-
)
81+
if (is.null(reference_gtf)) {
82+
spe <- spe_add_info(
83+
spe = spe,
84+
samples = samples,
85+
sample_id = sample_id,
86+
chrM = chrM,
87+
gtf_cols = gtf_cols,
88+
add_analysis = add_analysis,
89+
verbose = verbose
90+
)
91+
} else {
92+
spe <- spe_add_info(
93+
spe = spe,
94+
samples = samples,
95+
sample_id = sample_id,
96+
reference_gtf = reference_gtf,
97+
chrM = chrM,
98+
gtf_cols = gtf_cols,
99+
add_analysis = add_analysis,
100+
verbose = verbose
101+
)
102+
}
103+
91104

92105
## Done!
93106
return(spe)

0 commit comments

Comments
 (0)