andymckenzie / BRETIGEA

Brain Cell Type Specific Gene Expression Analysis
Other
14 stars 2 forks source link

brainCells() #1

Closed rosana-garrido closed 3 years ago

rosana-garrido commented 5 years ago

Hello! I am using BRETIGEA to annotate a single-cell expression matrix from brain organoid data and I am unable to run the brainCells() function. My input matrix does have the same structure as your example one.

I would strongly appreciate some technical support on that!

Thank you, Ros

str(aba_marker_expression, list.len = 5)

data.frame':    395 obs. of  377 variables:
 $ X488395315: num  0.6557 4.5264 0 0 0.0397 ...
 $ X496100277: num  0.0951 8.8558 0 0 0.0165 ...
 $ X496100278: num  0 4.87 0 0 0 ...
 $ X496100279: num  0 4.85 0 0 0.17 ...
 $ X496100281: num  0 3.6 0 0 0 ...
  [list output truncated]

str(aggregatedMarkerExpression, list.len = 5)

'data.frame':   827 obs. of  7700 variables:
 $ AAACCTGAGAGTCTGG-1: num  0 0 0 1.5 4.25 ...
 $ AAACCTGAGATGCCTT-1: num  0 0 0 1.75 4.58 ...
 $ AAACCTGAGCAATATG-1: num  0 0 0.754 1.338 3.976 ...
 $ AAACCTGAGTACATGA-1: num  0 0 1.62 1.62 3.62 ...
 $ AAACCTGAGTCGATAA-1: num  0 0 0 0.967 3.942 ...

ct_res = brainCells(aggregatedMarkerExpression, nMarker = 50)

Error in if (sum(inputMat[gene, ] > 0)) { :
  argument is not interpretable as logical
andymckenzie commented 5 years ago

Thank you for using BRETIGEA and for posting this!

Can you please post the output of str(rownames(aggregatedMarkerExpression))? I just want to make sure that the rownames are in the right format to correspond to the marker genes (although I expect that they are).

And are all of your columns numeric? You can check this via:

sum(!sapply(aggregatedMarkerExpression, is.numeric))

The result should be 0 if all of the columns are numeric.

If these are both as expected I will dig deeper into what could be causing this. I'm sorry about the ambiguity of this error; BRETIGEA needs better error reporting about what is going on here.

rosana-garrido commented 5 years ago

Hi! Thank you for your quick support.

Row names are set to human gene names, in capital letters. I believe this might be the problem.

Cheers, Ros

str(rownames(aggregatedMarkerExpression))

chr [1:827] "ABCD3" "ABHD3" "AC004158.3" "ACAT2" "ACTB" "ACTG1" "ACTL6A" ...

sum(!sapply(aggregatedMarkerExpression, is.numeric))

[1] 0
andymckenzie commented 5 years ago

Hi Ros,

Thanks for posting that. It looks to me like neither of those things is the reason for your error. Can you please post a link here or send me an email (amckenz at gmail) with a reproducible example of your code so that I can do further debugging?

Thank you!

rosana-garrido commented 5 years ago

Hi Andy,

Find my code here. Feel free to contact me at rgarrido@ebi.ac.uk for further info.

Thanks, Ros

JunnnLee commented 3 years ago

Hi! I know this thread was posted a while back, but would it be possible to get more information on how this issue was resolved? I seem to be having the same issue using BRETIGEA.

Any info would be greatly appreciated :)

Thanks, Jun

andymckenzie commented 3 years ago

Hi JunnnLee,

Thanks for using BRETIGEA. I wasn't able to reproduce the error with the data provided. I believe that this was resolved by changing the format of the input matrix. Can you post or send me an email (amckenz at g mail) with a subset of your data for the analysis? I will re-open this issue for now in case it is still a problem for you.

JunnnLee commented 3 years ago

Hi Andy,

Thank you for the reply. I was able to solve the issue not long after posting the question. It turns out I had a couple of NA strings hiding in my input matrix. The package worked as intended after I changed all of these NAs to 0.

Thank you! Jun