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

Rebuild Augustus recipe #51641

Merged
merged 6 commits into from
Oct 24, 2024
Merged

Rebuild Augustus recipe #51641

merged 6 commits into from
Oct 24, 2024

Conversation

mencian
Copy link
Contributor

@mencian mencian commented Oct 24, 2024

Describe your pull request here


Please read the guidelines for Bioconda recipes before opening a pull request (PR).

General instructions

  • If this PR adds or updates a recipe, use "Add" or "Update" appropriately as the first word in its title.
  • New recipes not directly relevant to the biological sciences need to be submitted to the conda-forge channel instead of Bioconda.
  • PRs require reviews prior to being merged. Once your PR is passing tests and ready to be merged, please issue the @BiocondaBot please add label command.
  • Please post questions on Gitter or ping @bioconda/core in a comment.

Instructions for avoiding API, ABI, and CLI breakage issues

Conda is able to record and lock (a.k.a. pin) dependency versions used at build time of other recipes.
This way, one can avoid that expectations of a downstream recipe with regards to API, ABI, or CLI are violated by later changes in the recipe.
If not already present in the meta.yaml, make sure to specify run_exports (see here for the rationale and comprehensive explanation).
Add a run_exports section like this:

build:
  run_exports:
    - ...

with ... being one of:

Case run_exports statement
semantic versioning {{ pin_subpackage("myrecipe", max_pin="x") }}
semantic versioning (0.x.x) {{ pin_subpackage("myrecipe", max_pin="x.x") }}
known breakage in minor versions {{ pin_subpackage("myrecipe", max_pin="x.x") }} (in such a case, please add a note that shortly mentions your evidence for that)
known breakage in patch versions {{ pin_subpackage("myrecipe", max_pin="x.x.x") }} (in such a case, please add a note that shortly mentions your evidence for that)
calendar versioning {{ pin_subpackage("myrecipe", max_pin=None) }}

while replacing "myrecipe" with either name if a name|lower variable is defined in your recipe or with the lowercase name of the package in quotes.

Bot commands for PR management

Please use the following BiocondaBot commands:

Everyone has access to the following BiocondaBot commands, which can be given in a comment:

@BiocondaBot please update Merge the master branch into a PR.
@BiocondaBot please add label Add the please review & merge label.
@BiocondaBot please fetch artifacts Post links to CI-built packages/containers.
You can use this to test packages locally.

Note that the @BiocondaBot please merge command is now depreciated. Please just squash and merge instead.

Also, the bot watches for comments from non-members that include @bioconda/<team> and will automatically re-post them to notify the addressed <team>.

Copy link
Contributor

coderabbitai bot commented Oct 24, 2024

Warning

Rate limit exceeded

@mencian has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 3 minutes and 1 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Files that changed from the base of the PR and between 31196bc and 36d20c9.

📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

The pull request introduces several modifications across three main files related to the Augustus software package. In build.sh, the script has been updated to enhance the build configuration by adjusting compilation flags, including optimization flags (-O3) and changing the C++ standard from C++11 to C++14. New variables for include and library paths have been added, and the make command now supports parallel builds. Additionally, a fix for the shebang line in Perl scripts and a cleanup step for backup files were included. The meta.yaml file has undergone changes such as updating the package version to 3.5.0, incrementing the build number, and modifying dependencies for flexibility. New identifiers for Galaxy training have also been added. Lastly, the Makefile has been adjusted to introduce new variables for installation paths, enhancing the installation process's flexibility.

Possibly related PRs

  • trnascan-se: add aarch64/arm64 build #50996: Modifications to the build.sh script to update the shebang line and includes cleanup steps similar to the changes made in build.sh of the main PR.
  • bambamc: add aarch64/arm64 builds #51067: Updates the build.sh script to include parallel execution with -j ${CPU_COUNT}, which aligns with the changes made in the main PR's build.sh.
  • Rebuild breseq #51221: Introduces environment variable exports for INCLUDES, LIBPATH, and LDFLAGS in build.sh, similar to the modifications in the main PR.
  • add r-archr #51295: The new build.sh script sets environment variables and executes a build process, which is conceptually similar to the changes in the main PR's build.sh.
  • Add genodsp #51488: The new build.sh script includes parallel execution with ${CPU_COUNT}, which is a change also made in the main PR's build.sh.

Suggested labels

please review & merge


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Outside diff range and nitpick comments (2)
recipes/augustus/build.sh (2)

14-18: LGTM! Consider making the else clause more explicit.

The conditional check is well-structured and the SQLite configuration is properly documented with a reference to the Boost issue.

Consider making the else clause more explicit:

if [[ "$(uname)" = Darwin ]]; then
	# SQLITE disabled due to compile issue, see: https://svn.boost.org/trac10/ticket/13501
	sqlite=
else
-	sqlite='SQLITE=true'
+	# Enable SQLite for non-Darwin platforms
+	sqlite='SQLITE=true'
fi

46-46: LGTM! Consider documenting the Build.PL purpose.

While the force copy is appropriate, it would be helpful to document why Build.PL needs to be copied from the recipe directory.

Add a comment explaining the purpose:

+# Copy custom Build.PL file that defines the perl module build configuration
cp -f ${RECIPE_DIR}/Build.PL ./
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 3d6d97e and 1aaee5c.

📒 Files selected for processing (3)
  • recipes/augustus/build.sh (2 hunks)
  • recipes/augustus/meta.yaml (2 hunks)
  • recipes/augustus/patches/0001-Makefile.patch (1 hunks)
🧰 Additional context used
🪛 yamllint
recipes/augustus/meta.yaml

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)

🔇 Additional comments (8)
recipes/augustus/patches/0001-Makefile.patch (2)

9-13: LGTM! Installation path variables follow best practices.

The changes properly implement GNU Make installation directory conventions:

  • Using DESTDIR for staging installations
  • Making prefix configurable with fallback to PREFIX
  • Correctly constructing bindir

16-21: Good improvement using CURDIR instead of PWD.

The change from PWD to CURDIR is more reliable as it's a Make-specific variable that's guaranteed to work consistently across different shell environments.

recipes/augustus/build.sh (2)

21-32: LGTM! Build configuration follows best practices.

The make command is well-structured with:

  • Proper use of compiler variables
  • Consistent PREFIX usage
  • Efficient parallel builds

5-8: Consider the implications of aggressive optimization and variable redundancy.

  1. The -O3 flag enables aggressive optimization which might lead to unexpected behavior. Consider using -O2 for a better balance between performance and stability.
  2. INCLUDES and LIBPATH appear redundant with CXXFLAGS and LDFLAGS. Consider consolidating these to reduce complexity.

Let's verify if Augustus has any known issues with -O3:

recipes/augustus/meta.yaml (4)

1-7: LGTM! Good use of Jinja2 templating.

The introduction of variables for name, version, and sha256 improves maintainability. The package metadata is properly structured.

🧰 Tools
🪛 yamllint

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)


18-20: LGTM! Good addition of run_exports for ABI compatibility.

The run_exports section with max_pin="x" ensures that downstream packages will maintain compatibility within the same major version, preventing ABI breakage. This aligns well with the PR objectives.


157-167: LGTM! Enhanced metadata with secure URLs and documentation links.

Good improvements:

  • Updated to HTTPS for security
  • Added links to source code and version-specific documentation

174-174: LGTM! Added Galaxy training identifier.

The addition of usegalaxy-eu:augustus_training enhances discoverability for Galaxy workflow users.

Comment on lines 13 to 14
INSTALLDIR = /opt/augustus-$(AUGVERSION)

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

Consider making INSTALLDIR configurable.

The hardcoded /opt path in INSTALLDIR might cause issues in containerized or managed environments. Consider making it respect the prefix:

-INSTALLDIR = /opt/augustus-$(AUGVERSION)
+INSTALLDIR = $(prefix)/share/augustus-$(AUGVERSION)

This would better align with standard Unix filesystem hierarchy and package management practices.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
INSTALLDIR = /opt/augustus-$(AUGVERSION)
INSTALLDIR = $(prefix)/share/augustus-$(AUGVERSION)

Comment on lines +25 to +36
- ln -sf $(INSTALLDIR)/bin/augustus $(PREFIX)/bin/augustus
- ln -sf $(INSTALLDIR)/bin/etraining $(PREFIX)/bin/etraining
- ln -sf $(INSTALLDIR)/bin/prepareAlign $(PREFIX)/bin/prepareAlign
- ln -sf $(INSTALLDIR)/bin/fastBlockSearch $(PREFIX)/bin/fastBlockSearch
- if [ -f $(INSTALLDIR)/bin/load2db ] ; then ln -sf $(INSTALLDIR)/bin/load2db $(PREFIX)/bin/load2db ; fi
- if [ -f $(INSTALLDIR)/bin/getSeq ] ; then ln -sf $(INSTALLDIR)/bin/getSeq $(PREFIX)/bin/getSeq ; fi
+ ln -sf $(INSTALLDIR)/bin/augustus $(bindir)/augustus
+ ln -sf $(INSTALLDIR)/bin/etraining $(bindir)/etraining
+ ln -sf $(INSTALLDIR)/bin/prepareAlign $(bindir)/prepareAlign
+ ln -sf $(INSTALLDIR)/bin/fastBlockSearch $(bindir)/fastBlockSearch
+ if [ -f $(INSTALLDIR)/bin/load2db ] ; then ln -sf $(INSTALLDIR)/bin/load2db $(bindir)/load2db ; fi
+ if [ -f $(INSTALLDIR)/bin/getSeq ] ; then ln -sf $(INSTALLDIR)/bin/getSeq $(bindir)/getSeq ; fi
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

Consider using install command for symlinks.

While the symlink creation works, using the install command would be more idiomatic and provide better error handling:

-	ln -sf $(INSTALLDIR)/bin/augustus $(bindir)/augustus
-	ln -sf $(INSTALLDIR)/bin/etraining $(bindir)/etraining
-	ln -sf $(INSTALLDIR)/bin/prepareAlign $(bindir)/prepareAlign
-	ln -sf $(INSTALLDIR)/bin/fastBlockSearch $(bindir)/fastBlockSearch
+	install -d $(bindir)
+	install -m 755 -s $(INSTALLDIR)/bin/augustus $(bindir)/augustus
+	install -m 755 -s $(INSTALLDIR)/bin/etraining $(bindir)/etraining
+	install -m 755 -s $(INSTALLDIR)/bin/prepareAlign $(bindir)/prepareAlign
+	install -m 755 -s $(INSTALLDIR)/bin/fastBlockSearch $(bindir)/fastBlockSearch

For the conditional installations:

-	if [ -f $(INSTALLDIR)/bin/load2db ] ; then ln -sf $(INSTALLDIR)/bin/load2db $(bindir)/load2db ; fi
-	if [ -f $(INSTALLDIR)/bin/getSeq ] ; then ln -sf $(INSTALLDIR)/bin/getSeq $(bindir)/getSeq ; fi
+	if [ -f $(INSTALLDIR)/bin/load2db ] ; then install -m 755 -s $(INSTALLDIR)/bin/load2db $(bindir)/load2db ; fi
+	if [ -f $(INSTALLDIR)/bin/getSeq ] ; then install -m 755 -s $(INSTALLDIR)/bin/getSeq $(bindir)/getSeq ; fi

This approach:

  • Ensures the target directory exists
  • Sets proper permissions
  • Strips debugging symbols (-s flag)
  • Provides better error handling
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- ln -sf $(INSTALLDIR)/bin/augustus $(PREFIX)/bin/augustus
- ln -sf $(INSTALLDIR)/bin/etraining $(PREFIX)/bin/etraining
- ln -sf $(INSTALLDIR)/bin/prepareAlign $(PREFIX)/bin/prepareAlign
- ln -sf $(INSTALLDIR)/bin/fastBlockSearch $(PREFIX)/bin/fastBlockSearch
- if [ -f $(INSTALLDIR)/bin/load2db ] ; then ln -sf $(INSTALLDIR)/bin/load2db $(PREFIX)/bin/load2db ; fi
- if [ -f $(INSTALLDIR)/bin/getSeq ] ; then ln -sf $(INSTALLDIR)/bin/getSeq $(PREFIX)/bin/getSeq ; fi
+ ln -sf $(INSTALLDIR)/bin/augustus $(bindir)/augustus
+ ln -sf $(INSTALLDIR)/bin/etraining $(bindir)/etraining
+ ln -sf $(INSTALLDIR)/bin/prepareAlign $(bindir)/prepareAlign
+ ln -sf $(INSTALLDIR)/bin/fastBlockSearch $(bindir)/fastBlockSearch
+ if [ -f $(INSTALLDIR)/bin/load2db ] ; then ln -sf $(INSTALLDIR)/bin/load2db $(bindir)/load2db ; fi
+ if [ -f $(INSTALLDIR)/bin/getSeq ] ; then ln -sf $(INSTALLDIR)/bin/getSeq $(bindir)/getSeq ; fi
install -d $(bindir)
install -m 755 -s $(INSTALLDIR)/bin/augustus $(bindir)/augustus
install -m 755 -s $(INSTALLDIR)/bin/etraining $(bindir)/etraining
install -m 755 -s $(INSTALLDIR)/bin/prepareAlign $(bindir)/prepareAlign
install -m 755 -s $(INSTALLDIR)/bin/fastBlockSearch $(bindir)/fastBlockSearch
if [ -f $(INSTALLDIR)/bin/load2db ] ; then install -m 755 -s $(INSTALLDIR)/bin/load2db $(bindir)/load2db ; fi
if [ -f $(INSTALLDIR)/bin/getSeq ] ; then install -m 755 -s $(INSTALLDIR)/bin/getSeq $(bindir)/getSeq ; fi

Comment on lines +34 to +36
# Fix perl shebang
sed -i.bak '1 s|^.*$|#!/usr/bin/env perl|g' ${SRC_DIR}/scripts/*.pl
rm -rf ${SRC_DIR}/scripts/*.bak
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

Add error checking for Perl script modifications.

While the shebang fix is good, the operation could fail silently if no .pl files exist.

Consider adding error checking:

-sed -i.bak '1 s|^.*$|#!/usr/bin/env perl|g' ${SRC_DIR}/scripts/*.pl
-rm -rf ${SRC_DIR}/scripts/*.bak
+# Check if Perl scripts exist
+if ls ${SRC_DIR}/scripts/*.pl >/dev/null 2>&1; then
+    sed -i.bak '1 s|^.*$|#!/usr/bin/env perl|g' ${SRC_DIR}/scripts/*.pl
+    rm -rf ${SRC_DIR}/scripts/*.bak
+else
+    echo "Warning: No Perl scripts found in ${SRC_DIR}/scripts/"
+fi
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Fix perl shebang
sed -i.bak '1 s|^.*$|#!/usr/bin/env perl|g' ${SRC_DIR}/scripts/*.pl
rm -rf ${SRC_DIR}/scripts/*.bak
# Fix perl shebang
# Check if Perl scripts exist
if ls ${SRC_DIR}/scripts/*.pl >/dev/null 2>&1; then
sed -i.bak '1 s|^.*$|#!/usr/bin/env perl|g' ${SRC_DIR}/scripts/*.pl
rm -rf ${SRC_DIR}/scripts/*.bak
else
echo "Warning: No Perl scripts found in ${SRC_DIR}/scripts/"
fi

- {{ compiler('cxx') }}
host:
- zlib
- samtools ==0.1.19
- samtools
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

Samtools version constraint removal requires attention

The codebase history shows that Augustus previously required samtools version 0.1.19 specifically. The build logs indicate direct integration with samtools through include paths and linking. Removing this strict version requirement could be problematic since:

  • Augustus has direct dependencies on samtools header files and libraries
  • The package previously used a very old version (0.1.19) of samtools
  • Newer versions of samtools may have incompatible API changes

Please:

  • Restore the version constraint to samtools ==0.1.19
  • Or verify compatibility with newer samtools versions by testing the build process
🔗 Analysis chain

Verify samtools compatibility after removing version constraint.

The version constraint for samtools has been removed. While this provides more flexibility, please ensure that the package is compatible with recent samtools versions to prevent potential runtime issues.


Let me gather more information about the augustus package and its relationship with samtools.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if there are any known compatibility issues with samtools in the codebase
rg -i "samtools" . --type cpp --type c --type perl -C 2

Length of output: 438


Script:

#!/bin/bash
# Check augustus source code and build files for samtools usage
rg -i "samtools" ./recipes/augustus --type yaml --type txt -C 3

# Check test files for samtools usage patterns
fd "test" ./recipes/augustus -t f -x rg -i "samtools" {} -C 2 \;

# Check if there are any version constraints in previous versions
git log -p ./recipes/augustus/meta.yaml | rg -i "samtools"

Length of output: 1906

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Outside diff range and nitpick comments (1)
recipes/augustus/build.sh (1)

15-19: Make the else clause more explicit.

While the Darwin-specific handling is well documented, the else clause could be more explicit about which platforms will enable SQLite.

 if [[ "$(uname)" = Darwin ]]; then
 	# SQLITE disabled due to compile issue, see: https://svn.boost.org/trac10/ticket/13501
 	sqlite=
 else
-	sqlite='SQLITE=true'
+	# Enable SQLite for non-Darwin platforms
+	sqlite='SQLITE=true'
 fi
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 1aaee5c and 25ef0a1.

📒 Files selected for processing (3)
  • recipes/augustus/build.sh (3 hunks)
  • recipes/augustus/patches/0001-Makefile.patch (1 hunks)
  • recipes/augustus/patches/utrrnaseq.patch (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • recipes/augustus/patches/0001-Makefile.patch
🔇 Additional comments (3)
recipes/augustus/patches/utrrnaseq.patch (1)

9-10: Verify the impact of optimization level change.

Changing from -O0 to -O3 significantly alters the optimization level from none to maximum. While this generally improves performance, it can potentially affect numerical precision or behavior in scientific computing applications.

Consider testing the output consistency between -O0 and -O3 builds, especially for floating-point calculations.

recipes/augustus/build.sh (2)

35-37: Previous comment about error handling for Perl scripts is still applicable.


5-8: Consider the implications of aggressive optimization.

The -O3 optimization flag might cause issues in some architectures or with certain compilers. Additionally, the USE_BOOST flag is defined but there's no explicit check for Boost availability.

Let's verify if Boost is properly declared as a dependency:

INCLS += $(INCLUDE_PATH_BOOST) # set boost include path in INCLUDE_PATH_BOOST, if boost is not installed system-wide
LDFLAGS += $(LIBRARY_PATH_BOOST) # set boost library path in LIBRARY_PATH_BOOST, if boost is not installed system-wide

@@ -29,6 +29,7 @@ utrrnaseq: $(OBJS)
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Use installation prefix variable instead of hard-coded paths.

The binary installation path is hard-coded as ../../bin/. This should use installation prefix variables for consistency with other Makefile changes mentioned in the PR, making it more flexible for different installation scenarios.

Consider this modification:

-	cp -f utrrnaseq ../../bin/utrrnaseq
+	cp -f utrrnaseq $(prefix)/bin/utrrnaseq

-	rm ../../bin/utrrnaseq
+	rm $(prefix)/bin/utrrnaseq

Also applies to: 22-22

@@ -39,7 +44,7 @@ cd perl-build
# affects tests for Augustus 3.3:
# https://github.com/Gaius-Augustus/Augustus/commit/7ca3ab
#sed -i'' -e '1s/perl -w/perl/' *.pl
cp ${RECIPE_DIR}/Build.PL ./
cp -f ${RECIPE_DIR}/Build.PL ./
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Add error checking for Build.PL copy operation.

The force flag (-f) could mask issues if the source file doesn't exist.

-cp -f ${RECIPE_DIR}/Build.PL ./
+if [ -f "${RECIPE_DIR}/Build.PL" ]; then
+    cp -f "${RECIPE_DIR}/Build.PL" ./
+else
+    echo "Error: ${RECIPE_DIR}/Build.PL not found"
+    exit 1
+fi
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
cp -f ${RECIPE_DIR}/Build.PL ./
if [ -f "${RECIPE_DIR}/Build.PL" ]; then
cp -f "${RECIPE_DIR}/Build.PL" ./
else
echo "Error: ${RECIPE_DIR}/Build.PL not found"
exit 1
fi

Comment on lines +22 to +33
make \
CC="${CC}" \
CXX="${CXX}" \
INCLUDE_PATH_BAMTOOLS="-I${PREFIX}/include/bamtools" \
LIBRARY_PATH_BAMTOOLS="-L${PREFIX}/lib" \
INCLUDE_PATH_LPSOLVE="-I${PREFIX}/include/lpsolve" \
LIBRARY_PATH_LPSOLVE="-L${PREFIX}/lib" \
INCLUDE_PATH_HTSLIB="-I${PREFIX}/include/htslib" \
LIBRARY_PATH_HTSLIB="-L${PREFIX}/lib" \
COMPGENPRED=true \
MYSQL=false \
"${sqlite}" -j"${CPU_COUNT}"
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

Consider limiting parallel build jobs.

While using ${CPU_COUNT} for parallel builds is good for performance, it might cause issues on machines with many cores due to memory constraints.

-	"${sqlite}" -j"${CPU_COUNT}"
+	"${sqlite}" -j"$(( CPU_COUNT < 4 ? CPU_COUNT : 4 ))"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
make \
CC="${CC}" \
CXX="${CXX}" \
INCLUDE_PATH_BAMTOOLS="-I${PREFIX}/include/bamtools" \
LIBRARY_PATH_BAMTOOLS="-L${PREFIX}/lib" \
INCLUDE_PATH_LPSOLVE="-I${PREFIX}/include/lpsolve" \
LIBRARY_PATH_LPSOLVE="-L${PREFIX}/lib" \
INCLUDE_PATH_HTSLIB="-I${PREFIX}/include/htslib" \
LIBRARY_PATH_HTSLIB="-L${PREFIX}/lib" \
COMPGENPRED=true \
MYSQL=false \
"${sqlite}" -j"${CPU_COUNT}"
make \
CC="${CC}" \
CXX="${CXX}" \
INCLUDE_PATH_BAMTOOLS="-I${PREFIX}/include/bamtools" \
LIBRARY_PATH_BAMTOOLS="-L${PREFIX}/lib" \
INCLUDE_PATH_LPSOLVE="-I${PREFIX}/include/lpsolve" \
LIBRARY_PATH_LPSOLVE="-L${PREFIX}/lib" \
INCLUDE_PATH_HTSLIB="-I${PREFIX}/include/htslib" \
LIBRARY_PATH_HTSLIB="-L${PREFIX}/lib" \
COMPGENPRED=true \
MYSQL=false \
"${sqlite}" -j"$(( CPU_COUNT < 4 ? CPU_COUNT : 4 ))"

Comment on lines +57 to 59
chmod 0755 bin/augustus
mv bin/* $PREFIX/bin/
mv scripts/* $PREFIX/bin/
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Add comprehensive permission setting and error checking.

Consider setting appropriate permissions for all executables and add error checking for move operations.

-chmod 0755 bin/augustus
-mv bin/* $PREFIX/bin/
-mv scripts/* $PREFIX/bin/
-mv config/* $PREFIX/config/
+# Set permissions for all executables
+find bin scripts -type f -executable -exec chmod 0755 {} \;
+
+# Move files with error checking
+for dir in bin scripts; do
+    if [ -d "$dir" ] && [ "$(ls -A $dir)" ]; then
+        mv $dir/* $PREFIX/bin/ || { echo "Error moving $dir contents"; exit 1; }
+    fi
+done
+
+if [ -d "config" ] && [ "$(ls -A config)" ]; then
+    mv config/* $PREFIX/config/ || { echo "Error moving config contents"; exit 1; }
+fi
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
chmod 0755 bin/augustus
mv bin/* $PREFIX/bin/
mv scripts/* $PREFIX/bin/
# Set permissions for all executables
find bin scripts -type f -executable -exec chmod 0755 {} \;
# Move files with error checking
for dir in bin scripts; do
if [ -d "$dir" ] && [ "$(ls -A $dir)" ]; then
mv $dir/* $PREFIX/bin/ || { echo "Error moving $dir contents"; exit 1; }
fi
done
if [ -d "config" ] && [ "$(ls -A config)" ]; then
mv config/* $PREFIX/config/ || { echo "Error moving config contents"; exit 1; }
fi

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (2)
recipes/augustus/build.sh (2)

15-19: Document SQLite configuration rationale.

While the SQLite configuration for Darwin systems references a Boost ticket, consider adding more detailed documentation about:

  1. The specific compilation issues on Darwin
  2. Whether this is still relevant for the current Boost version
 if [[ "$(uname)" = Darwin ]]; then
-	# SQLITE disabled due to compile issue, see: https://svn.boost.org/trac10/ticket/13501
+	# SQLITE is disabled on Darwin systems due to compilation conflicts between Boost and SQLite
+	# Reference: https://svn.boost.org/trac10/ticket/13501
+	# TODO: Verify if this is still needed with current Boost versions
 	sqlite=

Line range hint 1-3: Add comprehensive header documentation.

Consider adding a header comment block that includes:

  1. Script purpose and requirements
  2. Expected environment variables
  3. Dependencies that must be present
 #!/bin/bash
 
+# Build script for Augustus bioinformatics software
+# Requirements:
+#   - Compiler with C++14 support
+#   - Boost libraries
+#   - Bamtools, LPSolve, and HTSlib development files
+#   - Perl 5 with development files
+
 set -x -e
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 25ef0a1 and 31196bc.

📒 Files selected for processing (1)
  • recipes/augustus/build.sh (3 hunks)
🔇 Additional comments (1)
recipes/augustus/build.sh (1)

5-8: Verify boost dependency and optimization level.

While the build configuration looks correct, there are two considerations:

  1. The -DUSE_BOOST flag is added, but there should be a verification that boost is available
  2. The -O3 optimization flag might be too aggressive for some architectures
✅ Verification successful

Based on the shell script results, I can now generate the final response:

The build configuration is appropriate and follows common practices.

The verification shows:

  1. boost-cpp is correctly listed as a dependency in both recipes/augustus/meta.yaml and recipes/augustus/3.3.3/meta.yaml
  2. The -O3 optimization flag is commonly used across many bioconda packages, including similar computational biology tools like BLAST, Trinity, and other genome analysis tools
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if boost is listed as a dependency
grep -r "boost-cpp" .
# Check if other bioconda recipes use O3 optimization
rg "CXXFLAGS.*-O3" --type sh

Length of output: 27028

mv bin/* $PREFIX/bin/
mv scripts/* $PREFIX/bin/
mv config/* $PREFIX/config/

make clean
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Remove unnecessary make clean.

The make clean command after installation is unnecessary and potentially problematic:

  1. All required files should already be installed at this point
  2. Could accidentally remove files if $PREFIX points to the wrong location
-make clean
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
make clean

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

Successfully merging this pull request may close these issues.

1 participant