Skip to content

Commit

Permalink
small fix for empty files
Browse files Browse the repository at this point in the history
  • Loading branch information
alikhuseynov authored Sep 8, 2023
1 parent a554e9c commit 68865af
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/read.R
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ readVizgen <-
list.files(data_dir,
pattern = ".parquet$",
full.names = TRUE) %>%
{ if (is.empty(.)) {
{ if (length(.) == 0) {
# look in the sub directory (if nothing is found)
list.files(data_dir,
pattern = ".parquet$",
Expand Down Expand Up @@ -460,7 +460,7 @@ readVizgen <-
list.files(data_dir,
pattern = "cell_by_gene",
full.names = TRUE) %>%
{ if (is.empty(.)) {
{ if (length(.) == 0) {
list.files(data_dir,
pattern = "cell_by_gene",
full.names = TRUE,
Expand All @@ -483,7 +483,7 @@ readVizgen <-
list.files(data_dir,
pattern = "cell_metadata",
full.names = TRUE) %>%
{ if (is.empty(.)) {
{ if (length(.) == 0) {
list.files(data_dir,
pattern = "cell_metadata",
full.names = TRUE,
Expand Down Expand Up @@ -573,7 +573,7 @@ readVizgen <-
list.files(data_dir,
pattern = "detected_transcripts",
full.names = TRUE) %>%
{ if (is.empty(.)) {
{ if (length(.) == 0) {
list.files(data_dir,
pattern = "detected_transcripts",
full.names = TRUE,
Expand Down

0 comments on commit 68865af

Please sign in to comment.