Closed justinesjw closed 6 years ago
Hello,
This looks like an issue with your input data, probably missing or duplicated gene names although without some example data I'm just guessing. Are you trying to process 10X data with load10X?
Hey,
Sorry for the incomplete information. Here is the line that i ran:
scl = load10X(path, keepDroplets = TRUE)
In the folder there is both filtered and raw data folder
filtered_gene_bc_matrices raw_gene_bc_matrices
Yea, i'm processing 10X data and there are duplicated genes in the data. I'm previously processing the data in python and I usually remove the duplicated genes after loading it.
You will either need to edit your input matricies to exclude the duplicates before loading with load10X
, or manually load the matrices in R, exclude duplicates, then construct the SoupChannel
object yourself.
Having a look at the source code for load10X
should give you an idea how to manually construct the SoupChannel
object yourself.
Hello,
If anyone is facing the same error, at this line in load10X:
cells = gsub('-1','',cells[,1])
It's removing part of the sample names which leads to producing NAs when running
cellIdxs = match(cells,colnames(tod))
Thanks!!
@justinesjw Tried similar to your command and still getting the error. Can you please explain how I can solve this issue?
@justinesjw I found that there is the duplicate barcode (xxxxx-1 & xxxxxxx-2) so included one extra line in load10X to replace -2
also, but still getting the same error. Any fix so far?
Hi, i commented off this line
cells = gsub('-1','',cells[,1])
is that what u did too?
@justinesjw Yes I was doing like this
cells = gsub('-2,'',cells$V1)
cells = gsub('-1','',cells[,1])
still getting the error
hey..
I meant comment off this line like this
#cells = gsub('-1','',cells[,1])
Cause cell ranger arranges your cells groups by barcodes and end with number (eg. 1, 2,3, ...)
but SoupX only remove the tags with '-1's in filtered_gene_bc_matrices
cells = read.delim(file.path(dataDir,'filtered_gene_bc_matrices',ref,'barcodes.tsv'),sep='\t',header=FALSE)
cells = gsub('-1','',cells[,1])
After only replacing the '-1's in filtered_gene_bc_matrices
, they try to match the cell names in raw_gene_bc_matrices
to the filtered_gene_bc_matrices
. This is where NAs occur
cellIdxs = match(cells,colnames(tod))
This where the error pops out
channels[[channelNames[i]]] = SoupChannel(tod,tod[,cellIdxs,drop=FALSE],channelName=channelNames[i],ref=ref,path=dataDir,dataType='10X',...)
sorry for the lengthy post
I hope it helped v(^.^)v
Hello!
I'm trying to apply my data on SoupX but I kept getting this error and can not seem to solve it
Error in intI(j, n = x@Dim[2], dn[[2]], give.dn = FALSE) : 'NA' indices are not (yet?) supported for sparse Matrices
Can you please advise if i might have gone wrong anywhere?
sessionInfo()
Thanks!