raerose01 / deconstructSigs

deconstructSigs
138 stars 47 forks source link

chr name problem for GRCh38 #31

Open Wszwei opened 6 years ago

Wszwei commented 6 years ago

I'm using deconstrucSigs for GRch38 genome. I find the chromosome names in BSGenome are 1,2,3 etc, and not 'chr1', 'chr2', ..

However in the mut.to.sigs.input function, there's one line: levels(mut[, chr]) <- sub("^([0-9XY])", "chr\1", levels(mut[, chr])) that add the 'chr' prefix and leads to the error: Check chr names -- not all match BSgenome.Hsapiens.NCBI.GRCh38 object: chr1, chr10, chr11, chr12, chr13, chr14, chr15, chr16, chr17, chr18, chr19, chr2, chr20, chr21, chr22, chr3, chr4, chr5, chr6, chr7, chr8, chr9, chrX

Is there anyway to get rid of that line?