Code Monkey home page Code Monkey logo

bitfam's Issues

Error in compileCode(f, code, language = language, verbose = verbose)

Hi

Can you please help with the following error. thanks.

BITFAM_res <- BITFAM(data = data_matrix_normalized, species = "mouse", scATAC_obj = NA, 
                      iter = 8, ncores = 1)

Calculating gene variances
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Calculating feature variances of standardized and clipped values
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
rstan (Version 2.21.8, GitRev: 2e1f913d3ca3)
For execution on a local, multicore CPU with excess RAM we recommend calling
options(mc.cores = parallel::detectCores()).
To avoid recompilation of unchanged Stan programs, we recommend calling
rstan_options(auto_write = TRUE)
Do not specify '-march=native' in 'LOCAL_CPPFLAGS' or a Makevars file
make cmd is
make -f "C:/PROGRA1/R/R-421.3/etc/x64/Makeconf" -f "C:/PROGRA1/R/R-421.3/share/make/winshlib.mk" CXX='$(CXX14) $(CXX14STD)' CXXFLAGS='$(CXX14FLAGS)' CXXPICFLAGS='$(CXX14PICFLAGS)' SHLIB_LDFLAGS='$(SHLIB_CXX14LDFLAGS)' SHLIB_LD='$(SHLIB_CXX14LD)' SHLIB="file4dfc22eb2c08.dll" WIN=64 TCLBIN= OBJECTS="file4dfc22eb2c08.o"

make would use
g++ -std=gnu++14 -I"C:/PROGRA1/R/R-421.3/include" -DNDEBUG -I"C:/Users/Hemant Gujar/AppData/Local/R/win-library/4.2/Rcpp/include/" -I"C:/Users/Hemant Gujar/AppData/Local/R/win-library/4.2/RcppEigen/include/" -I"C:/Users/Hemant Gujar/AppData/Local/R/win-library/4.2/RcppEigen/include/unsupported" -I"C:/Users/Hemant Gujar/AppData/Local/R/win-library/4.2/BH/include" -I"C:/Users/Hemant Gujar/AppData/Local/R/win-library/4.2/StanHeaders/include/src/" -I"C:/Users/Hemant Gujar/AppData/Local/R/win-library/4.2/StanHeaders/include/" -I"C:/Users/Hemant Gujar/AppData/Local/R/win-library/4.2/RcppParallel/include/" -I"C:/Users/Hemant Gujar/AppData/Local/R/win-library/4.2/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -DBOOST_PENDING_INTEGER_LOG2_HPP -DSTAN_THREADS -DBOOST_NO_AUTO_PTR -include "C:/Users/Hemant Gujar/AppData/Local/R/win-library/4.2/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp" -std=c++1y -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c file4dfc22eb2c08.cpp -o file4dfc22eb2c08.o
if test "zfile4dfc22eb2c08.o" != "z"; then
if test -e "file4dfc22eb2c08-win.def"; then
echo g++ -shared -s -static-libgcc -o file4dfc22eb2c08.dll file4dfc22eb2c08-win.def file4dfc22eb2c08.o -L"c:/rtools42/x86_64-w64-mingw32.static.posix/lib/x64" -L"c:/rtools42/x86_64-w64-mingw32.static.posix/lib" -L"C:/PROGRA1/R/R-421.3/bin/x64" -lR ;
g++ -shared -s -static-libgcc -o file4dfc22eb2c08.dll file4dfc22eb2c08-win.def file4dfc22eb2c08.o -L"c:/rtools42/x86_64-w64-mingw32.static.posix/lib/x64" -L"c:/rtools42/x86_64-w64-mingw32.static.posix/lib" -L"C:/PROGRA1/R/R-421.3/bin/x64" -lR ;
else
echo EXPORTS > tmp.def;
nm file4dfc22eb2c08.o | sed -n 's/^.* [BCDRT] / /p' | sed -e '/[.]refptr[.]/d' -e '/[.]weak[.]/d' | sed 's/[^ ][^ ]*/"&"/g' >> tmp.def;
echo g++ -shared -s -static-libgcc -o file4dfc22eb2c08.dll tmp.def file4dfc22eb2c08.o -L"c:/rtools42/x86_64-w64-mingw32.static.posix/lib/x64" -L"c:/rtools42/x86_64-w64-mingw32.static.posix/lib" -L"C:/PROGRA1/R/R-421.3/bin/x64" -lR ;
g++ -shared -s -static-libgcc -o file4dfc22eb2c08.dll tmp.def file4dfc22eb2c08.o -L"c:/rtools42/x86_64-w64-mingw32.static.posix/lib/x64" -L"c:/rtools42/x86_64-w64-mingw32.static.posix/lib" -L"C:/PROGRA1/R/R-421.3/bin/x64" -lR ;
rm -f tmp.def;
fi
fi
Error in compileCode(f, code, language = language, verbose = verbose) :
from C:/Users/Hemant Gujar/AppData/Local/R/win-library/4.2/StanHeaders/include/src/stan/model/model_header.hpp:4, from file4dfc22eb2c08.cpp:14:C:/Users/Hemant Gujar/AppData/Local/R/win-library/4.2/StanHeaders/include/stan/math/rev/core/set_zero_all_adjoints.hpp:14:13: warning: 'void stan::math::set_zero_all_adjoints()' defined but not used [-Wunused-function] static void set_zero_all_adjoints() { ^make: *** [C:/PROGRA1/R/R-421.3/etc/x64/Makeconf:260: file4dfc22eb2c08.o] Error 1
Error in sink(type = "output") : invalid connection

org.Mm.egPFAM is defunct. Please use select() if you need access to PFAM or PROSITE accessions.

Hi, great package!
I run this:

data_matrix_normalized <- BITFAM_preprocess(raw_data = seurat@assays$RNA@counts)
BITFAM_res <- BITFAM(data = data_matrix_normalized, species = "mouse", scATAC_obj = NA, 
                     ncores = 30)

Error in (function ()  : 
  org.Mm.egPFAM is defunct. Please use select() if you need access to PFAM or PROSITE accessions.

I search they said: "Using this form PACKAGE::select() (within rstan) should solve this problem for biology-focused users" , But how to do that? thanks!

Error while using BITFAM: Sys.setenv(R_MAKEVARS_USER = NULL) : wrong length for argument

Hi!
I tried to use BITFAM on scRNa seq data following your instructions. However I received an error after:
BITFAM_res <- BITFAM(data = mtx_preprocess, species = "human", scATAC_obj = NA, ncores = parallel::detectCores())

Error in Sys.setenv(R_MAKEVARS_USER = NULL) : wrong length for argument
In addition: Warning message:
In .warn_march_makevars() :
Detected -march=native in the Makevars file at 'C:/Users/semina/Documents/.R/Makevars'. Compiling with the -march=native flag on windows with Rtools can cause crashes because of the compiler implementation. rstan will ignore the Makevars file until -march=native is removed. You can disable this by setting rstan_options(disable_march_warning = TRUE)

BITFAM taking way too much time

Hello,
I was running BITFAM on a subset of 200 cells:
BITFAM_res <- BITFAM(data = data_matrix_normalized, species = "human", scATAC_obj = NA, ncores = parallel::detectCores() )
And it would not finish even in 3 days. I have 128GB RAM and 32 CPUs.
Thanks !

BITFAM doesn't run parallel

Thanks to all the group for the interesting package

I am trying to run BITFAM with my single-cell RNA-Seq dataset following the instruction provided in the GitHub pages
It looks running correctly but even if I specify in the arguments to use all the cores of my machine, it looks like running with a single core:

BITFAM_res <- BITFAM(data = data_matrix_normalized, species = "human", scATAC_obj = NA, ncores = parallel::detectCores())

Screenshot from 2023-03-13 15-18-39

I tested it on my local machine and on a remote VM but the result is always the same. I also try to use BiocParallel but the BPPARAM parameter wasn't used. Is there anything I am missing or that I can do to parallelize the computation?

EDIT:
I tested BiocParallel to verify that I use more than a CPU per time and it worked, and this is the warning I receive when I run BITFAM:

rstan (Version 2.21.8, GitRev: 2e1f913d3ca3)
For execution on a local, multicore CPU with excess RAM we recommend calling
options(mc.cores = parallel::detectCores()).
To avoid recompilation of unchanged Stan programs, we recommend calling
rstan_options(auto_write = TRUE)

Thanks for the help
Jacopo

interseted_TFs

Hello - I have been using BITFAM and it has been great, thanks. I am working on human data and trying to use the interseted TF option though this does not seem to be working currently - below is the line of code. Please let me know thanks.

BITFAM_res <- BITFAM(data = data_matrix_normalized, interseted_TF = c("IRF3", "IRF7"), species = "human", scATAC_obj = NA, ncores = parallel::detectCores())

Issue with BITFAM function

Hi, I was wondering if anyone has seen this issue before. After loading in my normalized seurat object, loading the relevant packages, I get the following error when running the BITFAM() command.

BITFAM_res <- BITFAM(data = normalized_data_matrix, species = "human", scATAC_obj = NA, ncores = parallel::detectCores())
Calculating gene variances
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Calculating feature variances of standardized and clipped values
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Warning: The following arguments are not used: drop
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'i' in selecting a method for function '[': comparison (!=) is possible only for atomic and list types

Additionally, the preprocessing command produces a similar issue:

data_matrix_normalized <- BITFAM_preprocess(raw_data = d_matrix)
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'x' in selecting a method for function 'colSums': comparison (>) is possible only for atomic and list types

My R version is 4.3.0.

Error in eval(predvars, data, env)

Hello,
Thank you for this package. Its really helpful. I am exactly following the tutorial. However, I am getting the following error. Could you please help me with the following issue-

fit_rf <- randomForest(D3~., data = Z1_D3)
Error in eval(predvars, data, env) : object 'NKX2-2' not found
D3_tf_top10 <- importance(fit_rf)[order(importance(fit_rf)[, 1], decreasing = T), ][1:10]
Error in importance(fit_rf) : object 'fit_rf' not found

Picking a license?

Thanks a lot for making th the BITFAM method available. It seems the DESCRIPTION file still contains the boilerplate code from the usethis package that can be run to specify a license:

License: `use_mit_license()`, `use_gpl3_license()` or friends to

Perhaps you can pick a license to be explicit about use & reuse of the codebase?
Many thanks in advance!

Multiple samples

I was wondering if it makes sense to merge multiple samples such as control and stimulation and then run BITFAM on the merged object. Thank you!

Error in if (p$diagnostics$pareto_k > 1)

I'm running into the following error. Any idea how to solve this?
(Apple silicon, OS X 14, R 4.3.1)
Chain 1: 5700 -30414956.781 0.005 0.005
Chain 1: 5800 -30272309.137 0.005 0.005
Chain 1: 5900 -30145405.238 0.005 0.005 MEAN ELBO CONVERGED
Chain 1:
Chain 1: Drawing a sample of size 300 from the approximate posterior...
Chain 1: COMPLETED.
Error in if (p$diagnostics$pareto_k > 1) { :
missing value where TRUE/FALSE needed

Error after finishing chain1

Hello! Thank you for your tool!
I faced with the prob
Screenshot 2023-09-07 at 17 21 17
lem while running BITFAM on 1 sample (~1500cells)
Error in if (p$diagnostics$pareto_k > 1) {:
missing value where TRUE/FALSE is required
Calls: BITFAM
Execution stopped

It's right after finishing the first chain. What should I do?
Note: I run it locally on macOS
Thank in advance!

BITFAM_weights

Hey,

Loving the package so far! I was hoping to get an idea of the activity of the target genes for the detected TFs, and couldn't find any documentation on it, I then found a (seemingly) undocumented function called BITFAM_weights, which seems to be intended for what I'm looking for, however it pulls an error. I imagine if there's no documentation then it's possible this function is still in development, or maybe there's a better way for me to extract this information. Code and error below, thanks in advance for any assistance!

BITFAM_res <- BITFAM(data = GetAssayData(seu.int, slot = "data"), species = "mouse", scATAC_obj = NA, ncores = 4)
Z <- BITFAM_activities(BITFAM_res)
weights <- BITFAM_weights(BITFAM_list = BITFAM_res)
Error in extract(BITFAM_list$Model, result, "W") : 
  object 'result' not found

tiss@data

Hi
I couldn't get this to work. Error is
Error in Seurat::FindVariableFeatures(tiss@data) :
object 'tiss' not found

BITFAM code contain the line
variable_genes <- Seurat::FindVariableFeatures(tiss@data)

shouldn't that just be ?
variable_genes <- Seurat::FindVariableFeatures(data)

BITFAM_weights

Hello - another question for you. I have not been able to use the BITFAM_weights function. I can use the same BITFAM list normally for BITFAM_activities but it throws an error when using BITFAM_weights. Please advise, thanks!

Z <- BITFAM_activities(BITFAM_res)
bw = BITFAM_weights(BITFAM_res)
Error in extract(BITFAM_list$Model, result, "W") :
object 'result' not found

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.