Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in step 2: arguments imply differing number of rows #112

Open
carbui opened this issue Mar 20, 2024 · 1 comment
Open

Error in step 2: arguments imply differing number of rows #112

carbui opened this issue Mar 20, 2024 · 1 comment

Comments

@carbui
Copy link

carbui commented Mar 20, 2024

Hi,

I am running copykat on my single cell data from mouse. It runs with no problems in all the samples except this one, which should be all tumor cells and I can´t understand why. My tumor cells have been previously transduced to express mCherry. Maybe it is a problem in annotating mCherry to the normal genes of the mouse genome?

Thanks for the great package and help!

mat <- readMM("matrix.mtx.gz")
genes <- read.table("features.tsv.gz", header = FALSE, stringsAsFactors = FALSE)
barcodes <- read.table("barcodes.tsv.gz", header = FALSE, stringsAsFactors = FALSE)

gene_symbols <- genes$V2
cell_barcodes <- barcodes$V1

rownames(mat) <- gene_symbols
colnames(mat) <- cell_barcodes

copykat.1T <- copykat(rawmat=mat, id.type="S", ngene.chr=5, win.size=25, KS.cut=0.1, sam.name="1T", distance="euclidean", norm.cell.names="",output.seg="FLASE", plot.genes="FALSE", genome="mm10",n.cores=1)

[1] "running copykat v1.1.0"
[1] "step1: read and filter data ..."
[1] "32287 genes, 2662 cells in raw data"
[1] "filtered out 13 cells with less than 200 genes; remaining 2650 cells"
[1] "9485 genes past LOW.DR filtering"
[1] "step 2: annotations gene coordinates ..."
[1] "start annotation ..."
Error in data.frame(..., check.names = FALSE) :
arguments imply differing number of rows: 9346, 9347

@chloehe1129
Copy link

there are duplicates in the gene names in the original count matrix, remove them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants