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

adding RDEVAL #52070

Merged
merged 32 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from 20 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
13 changes: 13 additions & 0 deletions recipes/rdeval/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -o errexit
set -o nounset
set -o xtrace

cd "$SRC_DIR"

export CXXFLAGS="$CXXFLAGS -O3 -I$PREFIX/include"
export LDFLAGS="$LDFLAGS -L$PREFIX/lib"

make -j"${CPU_COUNT}"
install -v -m 0755 build/bin/rdeval "$PREFIX/bin/rdeval"
30 changes: 30 additions & 0 deletions recipes/rdeval/foo.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
diff --git a/Makefile b/Makefile2
index 5823f28..41cdab3 100644
--- a/Makefile
+++ b/Makefile2
@@ -1,5 +1,5 @@
-CXX ?= g++
-INCLUDE_DIR = -I./include -I./gfalibs/include
+CXX ?= ${CXX}
+INCLUDE_DIR = -I./include -I./gfalibs/include -I${PREFIX}/include
WARNINGS = -Wall -Wextra

CXXFLAGS = -g -std=gnu++14 -O3 $(INCLUDE_DIR) $(WARNINGS)
@@ -12,7 +12,7 @@ SOURCE = src
INCLUDE = include
BINDIR := $(BUILD)/.o

-LDFLAGS := -pthread
+LDFLAGS := -pthread -L${PREFIX}/lib
LIBS = -lz

OBJS := main input reads
@@ -27,7 +27,7 @@ head: $(BINS) gfalibs | $(BUILD)
all: head validate regenerate

$(BINDIR)%: $(SOURCE)/%.cpp $(INCLUDE)/%.h | $(BINDIR)
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -c $(SOURCE)/$(notdir $@).cpp -o $@
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -c $(SOURCE)/$(notdir $@).cpp -o $@ $(LIBS)

.PHONY: gfalibs
gfalibs:
13 changes: 13 additions & 0 deletions recipes/rdeval/libs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/Makefile b/Makefile
index 5823f28..19d1be3 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@ INCLUDE = include
BINDIR := $(BUILD)/.o

LDFLAGS := -pthread
-LIBS = -lz
+LIBS := -lz

OBJS := main input reads
BINS := $(addprefix $(BINDIR)/, $(OBJS))
39 changes: 39 additions & 0 deletions recipes/rdeval/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{% set name = "rdeval" %}
{% set version = "0.0.2" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://github.com/vgl-hub/{{ name }}/releases/download/v{{ version }}/{{ name }}.v{{ version }}-with_submodules.zip
sha256: 56c2f4d7d2c22b27d1b380dc41b81cc77a2d97c792a69b9360bed9e0027bac4d
patches:
- zlib.patch
- libs.patch
- foo.patch

build:
number: 0
run_exports:
- {{ pin_subpackage(name|lower, max_pin="x.x") }}

requirements:
build:
- {{ compiler('cxx') }}
- make
host:
- zlib

test:
commands:
- rdeval --help
Comment on lines +30 to +31
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Binary rdeval not found in the codebase

The test command references rdeval, but no such binary exists. Please verify the correct binary name and update the test configuration accordingly.

🔗 Analysis chain

Verify binary name and enhance test coverage

The test command uses rdeval while a past review noted a different binary name genodsp. Please clarify:

  1. Which is the correct binary name?
  2. Are both binaries provided by this package?

Additionally, consider adding tests with sample data to verify core functionality.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check source code for binary names
rg -g 'Makefile*' -g '*.cpp' 'rdeval|genodsp'

# Look for example data files that could be used in tests
fd -g '*.fa' -g '*.fasta' -g '*.fastq'

Length of output: 448


Script:

#!/bin/bash
# Check source code for binary names
rg -g 'Makefile*' -g '*.cpp' -g '*.h' 'rdeval|genodsp'

# Look for example data files that could be used in tests
fd -e fa -e fasta -e fastq

Length of output: 915


about:
home: https://github.com/vgl-hub/{{ name }}
summary: A general purpose, multithreaded read analysis and manipulation tool.
license: MIT
license_family: MIT
license_file: LICENSE
license_url: https://github.com/vgl-hub/{{ name }}/blob/main/LICENSE
dev_url: https://github.com/vgl-hub/{{ name }}
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Enhance summary for Bioconda context

While the license information is complete, the summary should better explain:

  1. The tool's specific role in bioinformatics
  2. The types of read analysis it performs
  3. Key features that make it relevant for biological data analysis

This helps users understand why the package belongs in Bioconda rather than conda-forge.

52 changes: 52 additions & 0 deletions recipes/rdeval/zlib.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
diff --git a/gfalibs/include/output.h b/gfalibs/include/output.h
index aabbec0..20f0dc1 100644
--- a/gfalibs/include/output.h
+++ b/gfalibs/include/output.h
@@ -12,7 +12,7 @@
#include "gfa-lines.h"
#include "gfa.h"

-#include "zlib.h"
+#include <zlib.h>
#include "zstream/zstream_common.hpp"
#include "zstream/ozstream.hpp"
#include "zstream/ozstream_impl.hpp"
diff --git a/gfalibs/include/stream-obj.h b/gfalibs/include/stream-obj.h
index 1faa4df..8e28bf6 100644
--- a/gfalibs/include/stream-obj.h
+++ b/gfalibs/include/stream-obj.h
@@ -2,7 +2,7 @@
#define STREAM_OBJ_H

#include <fstream>
-#include "zlib.h"
+#include <zlib.h>

class membuf : public std::streambuf {

diff --git a/gfalibs/src/stream-obj.cpp b/gfalibs/src/stream-obj.cpp
index e9694ee..c6eca26 100644
--- a/gfalibs/src/stream-obj.cpp
+++ b/gfalibs/src/stream-obj.cpp
@@ -5,7 +5,7 @@

#include "bed.h"
#include "struct.h"
-#include "zlib.h"
+#include <zlib.h>
#include "global.h"
#include "log.h"
#include "threadpool.h"
diff --git a/src/reads.cpp b/src/reads.cpp
index 866f49b..ac714cf 100644
--- a/src/reads.cpp
+++ b/src/reads.cpp
@@ -14,7 +14,7 @@
#include "functions.h" // global functions
#include "stream-obj.h"

-#include "zlib.h"
+#include <zlib.h>
#include "zstream/zstream_common.hpp"
#include "zstream/ozstream.hpp"
#include "zstream/ozstream_impl.hpp"
Loading