akdess / CaSpER

77 stars 28 forks source link

runCaSpER error #78

Open baoyl818 opened 2 years ago

baoyl818 commented 2 years ago

Hi, friend

when I use this good software to analyse bulk RNAseq (PE reads), when I run the following step:

final.objects <- runCaSpER(object, removeCentromere=T, cytoband=cytoband, method="iterative")

it happened the following error:

Performing recursive median filtering... Performing HMM segmentation... Error in DataFrame(..., check.names = FALSE) : different row counts implied by arguments

I cannot find why. Can you please give some advice? Thank you very much.

kenminsoo commented 1 year ago

I will just leave a solution in case anyone else needs it:

The problem shows up because your annotation does not have same rows as your counts. tpm_transformed <- tpm_transformed %>% rownames_to_column("Geneid") %>% semi_join(rannotation, by = c("Geneid" = "Gene")) %>% column_to_rownames("Geneid")

You can use dplyr or some other function to make sure they have same rows.

rustino commented 8 months ago

Try this: data <- data[match( annotation$Gene,rownames(data)), ] It's on the meningioma code