Execution halted for geneCounts() on c_call
When I run countGenes() on c_call where the field doesn’t have any data, I get an execution halted, which kills the whole batch processing of the file. Is there any way for this to gracefully fail? E.g., return count with NA value, or not abort the script so it can continue running?
> genes <- countGenes(db, gene='c_call', group='repertoire_id', mode='allele')
Error in countGenes(db, gene = "c_call", group = "repertoire_id", mode = "allele") :
The column c_call contains no data
Execution halted
Comments (9)
-
-
reporter I think for the other gene calls, maybe specifically
d_call
, I get a NA row. I’m guessing those are the rows which have a blankd_call
Ok, I’ll try the
tryCatch
. Do thegene
andfamily
modes made sense forc_call
? -
The
gene
andfamily
modes don’t work correctly either, for the same reason. -
Oh, I don’t think you should get
NA
for a row… If the gene is missing in a given group then the row for that gene should either be missing (default;fill=FALSE
) or assigned a count of 0 (fill=TRUE
). If you’re gettingNA
rows, then I suspect there’s a bug. -
reporter I thought maybe because using
readChangeoDb()
was causing theNA
row, but I get it withairr::read_rearrangement
as well. I’ll file a separate issue and provide the input file. -
-
assigned issue to
-
assigned issue to
-
- changed milestone to next release
-
-
assigned issue to
-
assigned issue to
-
- changed status to resolved
- Log in to comment
Hrm. What would be the ideal output in this case? And can you get there via a
tryCatch
? Eg:genes <- tryCatch(countGenes(ExampleDb, gene="c_call", mode="asis"), error=function(e) NA)
Also, it looks like the allele regex isn’t working for C regions right now (IGHD specifically), so use
mode="asis"
withc_call
. I’ll open a separate issue to fix that.