Skip to content

Commit

Permalink
fix error when no sample and platform meta data
Browse files Browse the repository at this point in the history
  • Loading branch information
Yunuuuu committed Jul 21, 2023
1 parent 5b70448 commit e9dbc2d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion R/parsers.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,13 @@ parse_gse_soft <- function(file_text, entity_type = "all", only_meta = FALSE) {
entity_indices <- grep("^\\^(SAMPLE|PLATFORM)", file_text,
perl = TRUE, value = FALSE
)
soft_meta <- parse_meta(file_text[seq_len(entity_indices[[1L]] - 1L)])
if (length(entity_indices)) {
soft_meta <- parse_meta(
file_text[seq_len(entity_indices[[1L]] - 1L)]
)
} else {
soft_meta <- parse_meta(file_text)
}
if (only_meta) {
return(list(meta = soft_meta, gsm = NULL, gpl = NULL))
}
Expand Down

0 comments on commit e9dbc2d

Please sign in to comment.