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

how to create a new reference data set #136

Open
Shawn10312 opened this issue Jul 1, 2020 · 4 comments
Open

how to create a new reference data set #136

Shawn10312 opened this issue Jul 1, 2020 · 4 comments

Comments

@Shawn10312
Copy link

Hi,
In the new version of Singler, it can not create a new reference data set as following viginette.

` name = 'My_reference'
expr = as.matrix(expr) # the expression matrix
types = as.character(types) # a character list of the types. Samples from the same type should have the same name.
main_types = as.character(main_types) # a character list of the main types.
ref = list(name=name,data = expr, types=types, main_types=main_types)

if using the de method, we can predefine the variable genes

ref$de.genes = CreateVariableGeneSet(expr,types,200)
ref$de.genes.main = CreateVariableGeneSet(expr,main_types,300)

if using the sd method, we need to define an sd threshold

sd = rowsSd(expr)
sd.thres = sort(sd, decreasing = T)[4000] # or any other threshold
ref$sd.thres = sd.thres

save(ref,file='ref.RData') # it is best to name the object and the file with the same name.

we can then use this reference in the previous functions. Multiple references can used.

singler = CreateSinglerObject(... ref.list = list(immgen, ref, mouse.rnaseq)`

There is no function named 'CreateVariableGeneSet' or 'rowsSd'.

look forward to hearing from you.
Thanks.

@dviraran
Copy link
Owner

dviraran commented Jul 3, 2020

Yes, all those function were redacted from the new version. In the new version you don’t need to create the DE genes in advance. Please refer to the bioc version vignette or the new SingleR book - https://ltla.github.io/SingleRBook/

@Shawn10312
Copy link
Author

Hi,
My R version is R 3.6.1, and I can only install SingleR 1.0.6 (not SingleR 1.2.4, the newest version). Because I am using HPC for data analysis, it is really hard for me to install R 4.0 in HPC and SingleR 1.2.4.

SO I want to know is there a viggette for the SingleR 1.0.6? If so, that will be easir to find the functions to create the refference using my own interested database.

Thanks.

@Shawn10312
Copy link
Author

hi team,

Recently, I really want to build my own refference. But I do not know how to achieve this through SingleR 1.0.6.

PS. Higher version of R and SingleR are not available for me.

Look forward to hearing from you. Thanks.

@dviraran
Copy link
Owner

dviraran commented Jul 9, 2020

Again, I am quite confused. This repository include those functions, but it does not have a version 1.0.6.

I am pretty sure that you installed an earlier version of the Bioconductor version, for BioC 3.10. I can find their 1.0.5, so not sure what is 1.0.6 - https://bioconductor.org/packages/3.10/bioc/src/contrib/Archive/SingleR/

If you can install the version there (1.0.5, which assume you are using bioc 3.10), there should be no issue using the tutorials in the SingleR book and the bioc vignettes.

If I am wrong and you are trying to use the legacy version from this repository, I suggest you at least reinstall the latest version from this repository, and you should have all the functions and can follow the tutorial in this repository.

Hope this helps.

Best,
Dvir

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