There seems to be some kind of parsing bug (well, maybe not a bug per se) that causes read_gff3() to fail when trying to map exon and CDS information if the feature type label for CDS is lowercase instead of uppercase. If only gene/mRNA/cds features are present, it does not matter if the cds feature label is lowercase or uppercase.
Running R4.4.2 in RStudio for Windows
Full error message:
gff <- read_feats("C:/Users/hen294/my.gff", format = "gff3")
Reading 'gff3' with read_gff3():
- file_id: my [C:/Users/hen294/my.gff]
Harmonizing attribute names
• ID -> feat_id
• Parent -> parent_ids
Error in map2():
ℹ In index: 1.
ℹ With name: my.
Caused by error in bind_rows():
! Can't combine ..1$feat_id and ..2$feat_id .
Run rlang::last_trace() to see where the error occurred.
rlang::last_trace()
<error/purrr_error_indexed>
Error in map2():
ℹ In index: 1.
ℹ With name: my.
Caused by error in bind_rows():
! Can't combine ..1$feat_id and ..2$feat_id .
Backtrace:
▆
- ├─gggenomes::read_feats(...)
- │ └─gggenomes::read_context(...)
- │ └─purrr::map2_df(...)
- │ └─purrr::map2(.x, .y, .f, ...)
- │ └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
- │ ├─purrr:::with_indexed_errors(...)
- │ │ └─base::withCallingHandlers(...)
- │ ├─purrr:::call_with_cleanup(...)
- │ └─gggenomes (local) .f(.x[[i]], .y[[i]], ...)
- │ ├─rlang::exec(parser, file, ...)
- │ └─gggenomes::read_gff3("C:/Users/hen294/my.gff")
- │ ├─bind_rows(mrna_exon_introns, mrna_cds_introns) %>% ...
- │ └─dplyr::bind_rows(mrna_exon_introns, mrna_cds_introns)
- └─dplyr::mutate(., feat_id = as.character(.data$feat_id))
Minor issue but may be worth including case insensitivity for the feature type column.
There seems to be some kind of parsing bug (well, maybe not a bug per se) that causes read_gff3() to fail when trying to map exon and CDS information if the feature type label for CDS is lowercase instead of uppercase. If only gene/mRNA/cds features are present, it does not matter if the cds feature label is lowercase or uppercase.
Running R4.4.2 in RStudio for Windows
Full error message:
Harmonizing attribute names
• ID -> feat_id
• Parent -> parent_ids
Error in
map2():ℹ In index: 1.
ℹ With name: my.
Caused by error in
bind_rows():! Can't combine
..1$feat_idand..2$feat_id.Run
rlang::last_trace()to see where the error occurred.Backtrace:
▆
Minor issue but may be worth including case insensitivity for the feature type column.