morinlab / GAMBLR.results

A collection of functions to access results of the Genomic Analysis of Mature B-cell Lymphomas
MIT License
0 stars 0 forks source link

`get_ssm_by_regions()` fails on regions with 0 mutations #19

Open lkhilton opened 9 months ago

lkhilton commented 9 months ago

Reprex for testing:

exon_bed <- read_tsv(
    "ref/lcr-modules-references/genomes/grch37/capture_space/idt-xgen-v2-grch37.padded.bed", 
    col_names = c("chrom", "start", "end")
)

IRF4 <- grch37_lymphoma_genes_bed %>% 
    filter(hgnc_symbol == "IRF4")

IRF4_exomes <- exon_bed %>% 
    filter(
        chrom == 6,
        (start < IRF4$start_position & end > IRF4$start_position) |  
        (start < IRF4$start_position & end > IRF4$end_position) | 
        (start > IRF4$start_position & end < IRF4$end_position)
    )

get_ssm_by_regions(
    regions_bed = IRF4_exomes[8,],
    this_seq_type = "genome", 
    streamlined = FALSE, 
    basic_columns = TRUE
)

Result:

[1] "6:407254-407798"
Error in methods::as(data[[i]], colClasses[i]) : 
  no method or default for coercing “character” to “l”