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

install bedtools #375

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/bedtools/install
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name of this directory should actually be the name of an R package which depends on bedtools' use to be functional as this command will only be executed when that package is in your application's dependency list. A quick cran search makes it appear that maybe bedr makes use of bedtools? How are you looking to use bedtools?

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

set -x
set -e

sudo apt-get install -y bedtools
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you add a final newline?

8 changes: 8 additions & 0 deletions packages/bedtools/test.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Check if bedtools is installed
is_bedtools_installed <- system("bedtools --version", intern=TRUE)

if (length(is_bedtools_installed) == 0) {
print("bedtools is not installed.")
} else {
print("bedtools is installed.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as related to the overall comment of the directory name being incorrect -- tests tend to install the related R package (and run a function which tests that the dependent system package is installed).

Consider rpoppler.

Additionally, you'll want this script to exit non-zero if the dependency is not resolved -- calling stop() instead of print() is one one such way.

}