Giter Club home page Giter Club logo

Comments (12)

stemangiola avatar stemangiola commented on September 25, 2024 1

I was literally writing the same thing XD

Yes, if you have few minutes would you mind try to remove that

  library(DESeq2)
  library(string)

and see if tidybulk installs without DESeq2?

from tidybulk.

stemangiola avatar stemangiola commented on September 25, 2024 1

Remember that would need to add the zzz.R script and its linked scripts as well. Because now you are not exporting anything anymore. Take example from tidySCE package.

from tidybulk.

chilampoon avatar chilampoon commented on September 25, 2024

i also got this error in tests before I installed DESeq2

── Failed tests ─────────────────────────────────────
Error (test-bulk_methods.R:658:2): DESeq2 differential trancript abundance - no object
<packageNotFoundError/error/condition>
Error in `loadNamespace(x)`: there is no package called ‘DESeq2’
Backtrace:
    ▆
 1. └─base::loadNamespace(x) at test-bulk_methods.R:658:8
 2.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
 3.     └─base (local) withOneRestart(expr, restarts[[1L]])
 4.       └─base (local) doWithOneRestart(return(expr), restart)

Error (test-bulk_methods.R:854:2): test prefix
<packageNotFoundError/error/condition>
Error in `library(DESeq2)`: there is no package called ‘DESeq2’
Backtrace:
    ▆
 1. └─base::library(DESeq2) at test-bulk_methods.R:854:8

[ FAIL 2 | WARN 42 | SKIP 2 | PASS 203 ]

from tidybulk.

stemangiola avatar stemangiola commented on September 25, 2024

Why could it be. Maybe there is some object in /data directory which is carrying the DESeq2 class.

from tidybulk.

chilampoon avatar chilampoon commented on September 25, 2024

that error is just because i haven't installed DESeq2 and Suggests in DESCRIPTION won't install the package automatically during the installation of tidybulk.

usually I'd add a few lines to detect uninstalled CRAN packages in tests/vignette, e.g.

list.pkg <- c("stringr", "DESeq2")
new.pkg <- list.pkg[!(list.pkg %in% installed.packages()[ ,"Package"])]
if (length(new.pkg)) {
  install.packages(new.pkg, repos = "https://cloud.r-project.org/")
}

from tidybulk.

stemangiola avatar stemangiola commented on September 25, 2024

The problem is that it should not care about DESeq2 until you call test_differential_abundance, in the same way, it does not care about edgeR until you call test_differential_abundance.

There must be some trace of DESeq2 somewhere. I think it is in the data/ directory. If some file in data/ directory includes DESeq2 class we should remove it.

By the way, I don't remember this error before, I m curious if for a tidybulk version, 1-month-old, we have the same problem.

from tidybulk.

chilampoon avatar chilampoon commented on September 25, 2024

hmm seems like in tests/testthat/test-bulk_methods.R

test_that("test prefix",{
  library(DESeq2)
  library(stringr)

here directly uses DESeq2.

In get_differential_transcript_abundance_deseq2_SE() in R/functions_SE.R there is a install step already 👍

	# Check if package is installed, otherwise install
	if (find.package("DESeq2", quiet = TRUE) %>% length %>% equals(0)) {
		message("Installing DESeq2 needed for differential transcript abundance analyses")
		if (!requireNamespace("BiocManager", quietly = TRUE))
			install.packages("BiocManager", repos = "https://cloud.r-project.org")
		BiocManager::install("DESeq2", ask = FALSE)
	}

from tidybulk.

chilampoon avatar chilampoon commented on September 25, 2024

Sure! btw is this script dev/dplyr-master-methods.R still being used? can I delete it? cz it causes some errors in checks

from tidybulk.

stemangiola avatar stemangiola commented on September 25, 2024

The way is to add it to .Rbuildignore

The whole dev directory should already been added to .Rbuildignore. I don't see why it complains.

from tidybulk.

chilampoon avatar chilampoon commented on September 25, 2024

I don't know the examples there are being tested

* checking examples ... ERROR
Running examples in ‘tidybulk-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: arrange
> ### Title: Order rows using column values
> ### Aliases: arrange arrange.tidybulk
> 
> ### ** Examples
> 
> arrange(mtcars, cyl, disp)
Error in arrange(mtcars, cyl, disp) : could not find function "arrange"
Execution halted

the error is strange as well..

from tidybulk.

stemangiola avatar stemangiola commented on September 25, 2024

OK I think I found the problem. It was a dataset in the data/ directory. I created a PR that fixes this.

from tidybulk.

stemangiola avatar stemangiola commented on September 25, 2024

@chilampoon I believe is done.

from tidybulk.

Related Issues (20)

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.