[med-svn] [Git][med-team/barrnap][upstream] New upstream version 1.0.0
Sascha Steinbiss (@satta)
gitlab at salsa.debian.org
Sat Feb 21 14:57:49 GMT 2026
Sascha Steinbiss pushed to branch upstream at Debian Med / barrnap
Commits:
156c63b7 by Sascha Steinbiss at 2026-02-21T15:01:00+01:00
New upstream version 1.0.0
- - - - -
11 changed files:
- + .github/workflows/CI.yml
- + CODE_OF_CONDUCT.md
- README.md
- + build/12S.mito.aln
- + build/16S.mito.aln
- + build/build_HMMs.sh
- + build/fix-SILVA.pl
- db/arc.hmm
- db/bac.hmm
- db/euk.hmm
- + environment.yml
Changes:
=====================================
.github/workflows/CI.yml
=====================================
@@ -0,0 +1,79 @@
+name: CI
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ defaults:
+ run:
+ shell: bash -el {0}
+ steps:
+ - uses: actions/checkout at v5
+
+ - uses: conda-incubator/setup-miniconda at v3
+ with:
+ activate-environment: barrnap
+ environment-file: environment.yml
+ miniforge-version: latest
+ channels: conda-forge,bioconda
+ channel-priority: strict
+ auto-update-conda: true
+
+ - name: Add to PATH
+ run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
+
+ - name: Run test
+ run: barrnap --version
+
+ - name: Run test
+ run: barrnap --help
+
+ - name: Run test
+ run: barrnap --citation
+
+# - name: Run test
+# run: barrnap 2>&1 | grep 'ERROR: No input file'
+
+ - name: Run test
+ run: barrnap -q --kingdom bac examples/bacteria.fna
+
+ - name: Run test
+ run: barrnap -q --kingdom arc examples/bacteria.fna
+
+ - name: Run test
+ run: barrnap -q --kingdom mito examples/mitochondria.fna
+
+ - name: Run test
+ run: barrnap -q --kingdom euk examples/fungus.fna
+
+ - name: Run test
+ run: ! barrnap examples/empty.fna
+
+ - name: Run test
+ run: ! barrnap examples/null.fna
+
+ - name: Run test
+ run: barrnap -q examples/small.fna | grep 16S_rRNA
+
+ - name: Run test
+ run: barrnap -q < examples/small.fna | grep 16S_rRNA
+
+ - name: Run test
+ run: barrnap -q - < examples/small.fna | grep 16S_rRNA
+
+ - name: Run test
+ run: barrnap examples/nohits.fna 2>&1 | grep 'Found 0 '
+
+ - name: Run test
+ run: barrnap --threads 2 examples/small.fna
+
+ - name: Run test
+ run: barrnap -q --incseq examples/small.fna | grep '^>'
+
+ - name: Run test
+ run: barrnap -q --outseq hits.fa < examples/small.fna && head -n3 hits.fa
=====================================
CODE_OF_CONDUCT.md
=====================================
@@ -0,0 +1,76 @@
+# Contributor Covenant Code of Conduct
+
+## Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as
+contributors and maintainers pledge to making participation in our project and
+our community a harassment-free experience for everyone, regardless of age, body
+size, disability, ethnicity, sex characteristics, gender identity and expression,
+level of experience, education, socio-economic status, nationality, personal
+appearance, race, religion, or sexual identity and orientation.
+
+## Our Standards
+
+Examples of behavior that contributes to creating a positive environment
+include:
+
+* Using welcoming and inclusive language
+* Being respectful of differing viewpoints and experiences
+* Gracefully accepting constructive criticism
+* Focusing on what is best for the community
+* Showing empathy towards other community members
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery and unwelcome sexual attention or
+ advances
+* Trolling, insulting/derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or electronic
+ address, without explicit permission
+* Other conduct which could reasonably be considered inappropriate in a
+ professional setting
+
+## Our Responsibilities
+
+Project maintainers are responsible for clarifying the standards of acceptable
+behavior and are expected to take appropriate and fair corrective action in
+response to any instances of unacceptable behavior.
+
+Project maintainers have the right and responsibility to remove, edit, or
+reject comments, commits, code, wiki edits, issues, and other contributions
+that are not aligned to this Code of Conduct, or to ban temporarily or
+permanently any contributor for other behaviors that they deem inappropriate,
+threatening, offensive, or harmful.
+
+## Scope
+
+This Code of Conduct applies both within project spaces and in public spaces
+when an individual is representing the project or its community. Examples of
+representing a project or community include using an official project e-mail
+address, posting via an official social media account, or acting as an appointed
+representative at an online or offline event. Representation of a project may be
+further defined and clarified by project maintainers.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be
+reported by contacting the project team at torsten.seemann+coc at gmail.com. All
+complaints will be reviewed and investigated and will result in a response that
+is deemed necessary and appropriate to the circumstances. The project team is
+obligated to maintain confidentiality with regard to the reporter of an incident.
+Further details of specific enforcement policies may be posted separately.
+
+Project maintainers who do not follow or enforce the Code of Conduct in good
+faith may face temporary or permanent repercussions as determined by other
+members of the project's leadership.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
+available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
+
+[homepage]: https://www.contributor-covenant.org
+
+For answers to common questions about this code of conduct, see
+https://www.contributor-covenant.org/faq
=====================================
README.md
=====================================
@@ -1,4 +1,8 @@
-[](https://travis-ci.org/tseemann/barrnap) [](https://www.gnu.org/licenses/gpl-3.0) [](#lang-au)
+[](https://github.com/tseemann/barrnap/actions)
+[](https://github.com/tseemann/barrnap/releases)
+[](https://www.gnu.org/licenses/gpl-3.0)
+[](https://anaconda.org/bioconda/barrnap)
+[](https://www.perl.org/)
# Barrnap
@@ -19,29 +23,28 @@ Multithreading is supported and one can expect roughly linear speed-ups with mor
### Requirements
* [Perl 5.xx](https://dev.perl.org/perl5/) (core modules only)
* [nhmmer](https://hmmer.org/) (part of HMMER 3.x)
-* [bedtools](http://bedtools.readthedocs.io/en/latest/)
+* [bedtools >= 2.27.0](http://bedtools.readthedocs.io/en/latest/)
### Conda
Install [Conda](https://conda.io/docs/) or [Miniconda](https://conda.io/miniconda.html):
```
-conda -c bioconda -c conda-forge install barrnap
-barrnap --version
+conda install -c bioconda -c conda-forge barrnap
```
### Homebrew
-Install [HomeBrew](http://brew.sh/) (Mac OS X) or [LinuxBrew](http://brew.sh/linuxbrew/) (Linux).
+Install [Homebrew](http://brew.sh/) (macOS) or [Linuxbrew](http://brew.sh/linuxbrew/) (Linux).
```
brew install brewsci/bio/barrnap
-barrnap --help
```
### Source
This will install the latest version direct from Github.
-You'll need to add the `bin` directory to your PATH.
+You'll need to add the `bin` directory to your `PATH`.
```
cd $HOME
-tar zxvf barrnap-0.X.tar.gz
-barrnap-0.X/barrnap -h
+git clone https://github.com/tseemann/barrnap.git
+cd barrnap/bin
+./barrnap --help
```
## Usage
=====================================
build/12S.mito.aln
=====================================
The diff for this file was not included because it is too large.
=====================================
build/16S.mito.aln
=====================================
The diff for this file was not included because it is too large.
=====================================
build/build_HMMs.sh
=====================================
@@ -0,0 +1,109 @@
+#!/bin/bash
+
+CPUS=$(grep -c bogomips /proc/cpuinfo)
+CURL="curl"
+GUNZIP="gzip -c"
+
+RFAM="Rfam.seed"
+RFAMURL="ftp://ftp.ebi.ac.uk/pub/databases/Rfam/CURRENT/${RFAM}.gz"
+if [ ! -r "$RFAM" ]; then
+ echo "Downloading: $RFAM"
+ $CURL "$RFAMURL" | $GUNZIP -c > "$RFAM"
+else
+ echo "Using existing file: $RFAM"
+fi
+
+# 23S only as 16S is in RFAM
+SILVA="SILVA_128_LSURef_tax_silva_full_align_trunc.fasta"
+SILVAURL="http://www.arb-silva.de/fileadmin/silva_databases/current/Exports/${SILVA}.gz"
+if [ ! -r "$SILVA" ]; then
+ echo "Downloading: $SILVA"
+ $CURL "$SILVAURL" | $GUNZIP -c > "$SILVA"
+else
+ echo "Using existing file: $SILVA"
+fi
+
+# this will write three files: LSU.Kingdom.aln
+echo "Fixing and splitting SILVA data"
+./fix-SILVA.pl --seed --type LSU "$SILVA"
+
+# Prepare RFAM for fetches
+echo "Indexing $RFAM"
+rm -f "$RFAM.ssi"
+esl-afetch --index "$RFAM"
+
+echo "Fetching models..."
+
+# Bact
+echo "Bac"
+esl-afetch "$RFAM" RF00001 > 5S.bac.aln
+esl-reformat -r stockholm LSU.Bacteria.aln > 23S.bac.aln
+esl-afetch "$RFAM" RF00177 > 16S.bac.aln
+
+# Arch
+echo "Arc"
+esl-afetch "$RFAM" RF00001 > 5S.arc.aln
+esl-afetch "$RFAM" RF00002 > 5_8S.arc.aln
+esl-reformat -r stockholm LSU.Archaea.aln > 23S.arc.aln
+esl-afetch "$RFAM" RF01959 > 16S.arc.aln
+
+# Euk
+echo "Euk"
+esl-afetch "$RFAM" RF00001 > 5S.euk.aln
+esl-afetch "$RFAM" RF00002 > 5_8S.euk.aln
+esl-reformat -r stockholm LSU.Eukaryota.aln > 28S.euk.aln
+esl-afetch "$RFAM" RF01960 > 18S.euk.aln
+
+# Mito
+FILE="12S.mito.aln"
+if [ ! -r "$FILE" ]; then
+ echo "Missing included $FILE file."
+ exit 1
+fi
+FILE="16S.mito.aln"
+if [ ! -r "$FILE" ]; then
+ echo "Missing included $FILE file."
+ exit 1
+fi
+
+
+for K in arc bac euk mito ; do
+ for T in 5S 5_8S 12S 16S 23S 18S 28S ; do
+ ID="$T.$K"
+ if [ -s "$ID.aln" ]; then
+ echo "*** $ID ***"
+ hmmbuild --cpu $CPUS --rna -n "${T}_rRNA" $T.$K.hmm $T.$K.aln
+ fi
+ done
+ cat *.$K.hmm > $K.hmm
+ #rm -f *.$K.hmm
+ #hmmpress -f $K.hmm
+done
+
+echo "Databases ready, copy them to the barrnap db/ folder:"
+ls -1 {arc,bac,euk,mito}.hmm
+
+exit
+
+
+# FOR THE FUTURE! --accurate mode using cmscan
+
+for ID in $(cat MODELS) ; do
+
+ echo "Extracting: $ID.aln"
+ esl-afetch "$RFAM" $ID > $ID.aln
+
+ echo "Building: $ID.hmm"
+ rm -f $ID.hmm.h?? $ID.hmm
+ hmmbuild --hand --rna $ID.hmm $ID.aln
+ hmmpress $ID.hmm
+
+ echo "Building: $ID.cm"
+ rm -f $ID.cm.i?? $ID.cm
+ cmbuild --hand -F $ID.cm $ID.aln
+ cmcalibrate --cpu $CPUS $ID.cm
+ cmpress $ID.cm
+
+done
+
+echo "Done."
=====================================
build/fix-SILVA.pl
=====================================
@@ -0,0 +1,95 @@
+#!/usr/bin/env perl
+use warnings;
+use strict;
+use Data::Dumper;
+
+my(@Options, $verbose, $type, $seed);
+setOptions();
+
+$type or die "please specify rRNA class using --type";
+
+my @kingdom = qw(Bacteria Eukaryota Archaea);
+my %out;
+for my $k (@kingdom) {
+ $out{$k}{FILENAME} = "$type.$k.aln";
+ open $out{$k}{FH}, '>', $out{$k}{FILENAME};
+# $out{$k}{INCOUNT} = 0;
+ $out{$k}{COUNT} = 0;
+ $out{$k}{DESC} = "$type";
+ printf STDERR "Writing $k sequences to: %s\n", $out{$k}{FILENAME};
+}
+
+
+my $k = '';
+my $id = '';
+my $aln = '';
+my $species = '';
+my %seen;
+
+while (my $line = <>) {
+# chomp $line;
+ if ($line =~ m/^>/) {
+ if ($aln) {
+ # output the previous alignment
+ unless ($seed and $seen{$species}++) {
+ $aln =~ s/\./-/g;
+ $aln =~ s/ //g;
+ printf {$out{$k}{FH}} ">%s %s\n%s\n", $id, $out{$k}{DESC}, $aln;
+ $out{$k}{COUNT}++;
+ }
+ }
+ # >FJ805841.1.4128 Bacteria;Cyanobacteria;Cyanobacteria;SubsectionII;FamilyII;Chroococcidiopsis;Chroococcidiopsis thermalis PCC 7203
+ print STDERR "\rProcessing: ", join(' ', map { $out{$kingdom[$_]}{COUNT} } 0..2);
+ $line =~ m/^>(\S+)\s+(\w+);/;
+ $k = $2;
+ $id = $1;
+ $aln = '';
+ my @x = split ' ', $line;
+ $x[2] ||= '';
+ $species = "$x[1];$x[2]";
+ #print STDERR "\t$. @x\n";
+ #$species = $k eq 'Bacteria' ? "$x[1];$x[0]" : $x[1];
+ }
+ else {
+ $aln .= $line;
+# print Dumper($id,$k,$aln); exit;
+ }
+}
+
+print Dumper(\%out);
+
+#----------------------------------------------------------------------
+# Option setting routines
+
+sub setOptions {
+ use Getopt::Long;
+
+ @Options = (
+ {OPT=>"help", VAR=>\&usage, DESC=>"This help"},
+ {OPT=>"verbose!", VAR=>\$verbose, DEFAULT=>0, DESC=>"Verbose output"},
+ {OPT=>"type=s", VAR=>\$type, DEFAULT=>'', DESC=>"Type of rRNA in this file eg. 16S 23S 5S ..."},
+ {OPT=>"seed!", VAR=>\$seed, DEFAULT=>0, DESC=>"Only use 1 representative per species"},
+ );
+
+ #(!@ARGV) && (usage());
+
+ &GetOptions(map {$_->{OPT}, $_->{VAR}} @Options) || usage();
+
+ # Now setup default values.
+ foreach (@Options) {
+ if (defined($_->{DEFAULT}) && !defined(${$_->{VAR}})) {
+ ${$_->{VAR}} = $_->{DEFAULT};
+ }
+ }
+}
+
+sub usage {
+ print "Usage: $0 [options]\n";
+ foreach (@Options) {
+ printf " --%-13s %s%s.\n",$_->{OPT},$_->{DESC},
+ defined($_->{DEFAULT}) ? " (default '$_->{DEFAULT}')" : "";
+ }
+ exit(1);
+}
+
+#----------------------------------------------------------------------
=====================================
db/arc.hmm
=====================================
The diff for this file was not included because it is too large.
=====================================
db/bac.hmm
=====================================
The diff for this file was not included because it is too large.
=====================================
db/euk.hmm
=====================================
The diff for this file was not included because it is too large.
=====================================
environment.yml
=====================================
@@ -0,0 +1,9 @@
+channels:
+ - conda-forge
+ - bioconda
+dependencies:
+ - perl
+ - perl-bioperl >=1.7.2
+ - hmmer >=3.1b2
+ - bedtools
+ - infernal >=1.1.2
View it on GitLab: https://salsa.debian.org/med-team/barrnap/-/commit/156c63b79ecc66083f91c1010dd383d06bd4dcf6
--
View it on GitLab: https://salsa.debian.org/med-team/barrnap/-/commit/156c63b79ecc66083f91c1010dd383d06bd4dcf6
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20260221/e374ffc0/attachment-0001.htm>
More information about the debian-med-commit
mailing list