[med-svn] [Git][med-team/snpeff][master] 5 commits: Creating a jar file with name that is conform to Debian Java policy

Pierre Gruet gitlab at salsa.debian.org
Fri Feb 19 09:14:43 GMT 2021



Pierre Gruet pushed to branch master at Debian Med / snpeff


Commits:
3c2da73c by Pierre Gruet at 2021-02-18T08:58:40+01:00
Creating a jar file with name that is conform to Debian Java policy

- - - - -
064aec64 by Pierre Gruet at 2021-02-18T17:36:55+01:00
Adding the shell launcher in the snpeff binary package

- - - - -
6e6ad9ba by Pierre Gruet at 2021-02-18T17:37:11+01:00
Adding a manpage

- - - - -
f93bbdb1 by Pierre Gruet at 2021-02-18T23:06:21+01:00
Adding a default conffile to stick to default upstream behaviour

- - - - -
723fc0d1 by Pierre Gruet at 2021-02-19T10:14:26+01:00
Creating a .dotfile at first startup

- - - - -


9 changed files:

- + debian/README.Debian
- debian/changelog
- debian/libsnpeff-java.manifest
- + debian/manpages/snpEff.1
- debian/patches/prepare_to_put_package_version_in_pom.xml → debian/patches/alter_pom_for_debian_packaging.patch
- debian/patches/series
- + debian/patches/update_launching_script_for_Debian.patch
- + debian/snpeff.install
- + debian/snpeff.manpages


Changes:

=====================================
debian/README.Debian
=====================================
@@ -0,0 +1,4 @@
+When getting SnpEff from the upstream source repository, the configuration file snpEff.config usually sits next to the jar; this is not the case for the Debian packaging, because the jar is in /usr/share/java.
+So I am shipping a default /etc/snpEff.config file and it will be copied into ~/.snpEff.config, which will be used, if the latter does not exist and if no other config file is given in the command line invocation.
+
+ -- Pierre Gruet <pgtdebian at free.fr> Fri, 19 Feb 2021 09:22:13 +0100


=====================================
debian/changelog
=====================================
@@ -2,10 +2,10 @@ snpeff (4.3t+dfsg-1) UNRELEASED; urgency=medium
 
   * Initial release (Closes: #<bug>)
   TODO:
-    - replace name of the jar SnpEff.jar to snpeff.jar (Java policy)
+    - Ensure upstream provides files with proper copyrighting and licensing.
     - fill in debian/copyright, maybe remove the html/ folder.
-    - complete the binary package snpeff, add manpage, ...
     - check my patch replacing akka with java.util.concurrent.
     - snpsift is to package elsewhere on its own.
+    - add autopkgtest
 
- -- Pierre Gruet <pgtdebian at free.fr>  Thu, 10 Dec 2020 22:40:03 +0100
+ -- Pierre Gruet <pgtdebian at free.fr>  Fri, 19 Feb 2021 09:47:24 +0100


=====================================
debian/libsnpeff-java.manifest
=====================================
@@ -1,3 +1,3 @@
-/usr/share/java/SnpEff.jar:
+/usr/share/java/snpeff.jar:
  Class-Path: /usr/share/java/apfloat.jar /usr/share/java/charts4j.jar /usr/share/java/commons-cli.jar /usr/share/java/trove4j.jar /usr/share/java/freemarker.jar /usr/share/java/distlib.jar /usr/share/java/htsjdk.jar /usr/share/java/commons-math3.jar /usr/share/java/commons-io.jar /usr/share/java/commons-codec.jar /usr/share/java/log4j-1.2.jar /usr/share/java/biojava4-core.jar /usr/share/java/biojava4-structure.jar /usr/share/java/scala-library.jar
  Main-Class: org.snpeff.SnpEff


=====================================
debian/manpages/snpEff.1
=====================================
@@ -0,0 +1,169 @@
+.TH SNPEFF 1 "February 2021" "snpEff" "User Commands"
+.SH NAME
+snpEff \- genetic variant annotation and effect prediction toolbox
+
+.SH SYNOPSIS
+.B snpEff
+[\fI\,command\/\fR] [\fI\,options\/\fR] [\fI\,files\/\fR]
+.SH AVAILABLE COMMANDS
+.TP
+\fB[err|ann]\fR
+Annotate variants / calculate effects (you can use either 'ann' or 'eff', they mean the same). Default: ann (no command or 'ann').
+.TP
+\fBbuild\fR
+Build a SnpEff database.
+.TP
+\fBbuildNextProt\fR
+Build a SnpEff for NextProt (using NextProt's XML files).
+.TP
+\fBcds\fR
+Compare CDS sequences calculated from a SnpEff database to the one in a FASTA file. Used for checking databases correctness.
+.TP
+\fBclosest\fR
+Annotate the closest genomic region.
+.TP
+\fBcount\fR
+Count how many intervals (from a BAM, BED or VCF file) overlap with each genomic interval.
+.TP
+\fBdatabases\fR
+Show currently available databases (from local config file).
+.TP
+\fBdownload\fR
+Download a SnpEff database.
+.TP
+\fBdump\fR
+Dump to STDOUT a SnpEff database (mostly used for debugging).
+.TP
+\fBgenes2bed\fR
+Create a bed file from a genes list.
+.TP
+\fBlen\fR
+Calculate total genomic length for each marker type.
+.TP
+\fBpdb\fR
+Build interaction database (based on PDB data).
+.TP
+\fBprotein\fR
+Compare protein sequences calculated from a SnpEff database to the one in a FASTA file. Used for checking databases correctness.
+.TP
+\fBseq\fR
+Show sequence (from command line) translation.
+.TP
+\fBshow\fR
+Show a text representation of genes or transcripts coordinates, DNA sequence and protein sequence.
+.TP
+\fBtranslocReport             \fR
+Create a translocations report (from VCF file).
+
+.SH "OPTIONS"
+.SS "Generic options"
+.TP
+\fB\-c\fR , \fB\-config\fR
+Specify config file
+.TP
+\fB\-configOption\fR name=value
+Override a config file option
+.TP
+\fB\-d\fR , \fB\-debug\fR
+Debug mode (very verbose).
+.TP
+\fB\-dataDir\fR <path>
+Override data_dir parameter from config file.
+.TP
+\fB\-download\fR
+Download a SnpEff database, if not available locally. Default: true
+.TP
+\fB\-nodownload\fR
+Do not download a SnpEff database, if not available locally.
+.TP
+\fB\-h\fR , \fB\-help\fR
+Show this help and exit
+.TP
+\fB\-noLog\fR
+Do not report usage statistics to server
+.TP
+\fB\-t\fR
+Use multiple threads (implies '\-noStats'). Default 'off'
+.TP
+\fB\-q\fR , \fB\-quiet\fR
+Quiet mode (do not show any messages or errors)
+.TP
+\fB\-v\fR , \fB\-verbose\fR
+Verbose mode
+.TP
+\fB\-version\fR
+Show version number and exit
+.SS "Database options"
+.TP
+\fB\-canon\fR
+Only use canonical transcripts.
+.TP
+\fB\-canonList\fR <file>
+Only use canonical transcripts, replace some transcripts using the 'gene_id       transcript_id' entries in <file>.
+.TP
+\fB\-interaction\fR
+Annotate using interactions (requires interaction database). Default: true
+.TP
+\fB\-interval\fR <file>
+Use a custom interval in TXT/BED/BigBed/VCF/GFF file (you may use this option many times)
+.TP
+\fB\-maxTSL\fR <TSL_number>
+Only use transcripts having Transcript Support Level lower than <TSL_number>.
+.TP
+\fB\-motif\fR
+Annotate using motifs (requires Motif database). Default: true
+.TP
+\fB\-nextProt\fR
+Annotate using NextProt (requires NextProt database).
+.TP
+\fB\-noGenome\fR
+Do not load any genomic database (e.g. annotate using custom files).
+.TP
+\fB\-noExpandIUB\fR
+Disable IUB code expansion in input variants
+.TP
+\fB\-noInteraction\fR
+Disable interaction annotations
+.TP
+\fB\-noMotif\fR
+Disable motif annotations.
+.TP
+\fB\-noNextProt\fR
+Disable NextProt annotations.
+.TP
+\fB\-onlyReg\fR
+Only use regulation tracks.
+.TP
+\fB\-onlyProtein\fR
+Only use protein coding transcripts. Default: false
+.TP
+\fB\-onlyTr\fR <file.txt>
+Only use the transcripts in this file. Format: One transcript ID per line.
+.TP
+\fB\-reg\fR <name>
+Regulation track to use (this option can be used add several times).
+.TP
+\fB\-ss\fR , \fB\-spliceSiteSize\fR <int>
+Set size for splice sites (donor and acceptor) in bases. Default: 2
+.TP
+\fB\-spliceRegionExonSize\fR <int>
+Set size for splice site region within exons. Default: 3 bases
+.HP
+\fB\-spliceRegionIntronMin\fR <int>
+Set minimum number of bases for splice site region within intron. Default: 3 bases
+.HP
+\fB\-spliceRegionIntronMax\fR <int>
+Set maximum number of bases for splice site region within intron. Default: 8 bases
+.TP
+\fB\-strict\fR
+Only use 'validated' transcripts (i.e. sequence has been checked). Default: false
+.HP
+\fB\-ud\fR , \fB\-upDownStreamLen\fR <int>
+Set upstream downstream interval length (in bases)
+
+.SH SEE ALSO
+
+.B https://pcingola.github.io/SnpEff/se_introduction/
+
+.SH AUTHOR
+This manual page was written by Pierre Gruet <pgtdebian at free.fr> from the Debian project, but may be used by others. Please report possibly missing or misleading information.


=====================================
debian/patches/prepare_to_put_package_version_in_pom.xml → debian/patches/alter_pom_for_debian_packaging.patch
=====================================
@@ -1,13 +1,25 @@
-Description: Preparing pom.xml to receive the right version number
+Description: Have precise version number and good artifact name in pom.xml
  Upstream provides a pom.xml with a version number that does not wholly
  corresponds to the package upstream version. We put a @VERSION@ in the pom, 
  which will be replaced by the correct version number in debian/rules.
+ .
+ Also we change the artifact name to snpeff to conform to Debian Java policy
+ for the name of the jar.
 Author: Pierre Gruet <pgtdebian at free.fr>
 Forwarded: not-needed
-Last-Update: 2020-12-10
+Last-Update: 2021-02-18
 
 --- a/pom.xml
 +++ b/pom.xml
+@@ -2,7 +2,7 @@
+   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+   <modelVersion>4.0.0</modelVersion>
+   <groupId>org.snpeff</groupId>
+-  <artifactId>SnpEff</artifactId>
++  <artifactId>snpeff</artifactId>
+   <packaging>jar</packaging>
+   <name>Snp Effect</name>
+   <description>Variant annotation and effect prediction package.</description>
 @@ -199,5 +199,5 @@
        </plugin>
      </plugins>


=====================================
debian/patches/series
=====================================
@@ -3,4 +3,5 @@ depending_on_biojava4.patch
 adapting_to_htsjdk.patch
 adding_scala_in_pom.patch
 fix_tests.patch
-prepare_to_put_package_version_in_pom.xml
+alter_pom_for_debian_packaging.patch
+update_launching_script_for_Debian.patch


=====================================
debian/patches/update_launching_script_for_Debian.patch
=====================================
@@ -0,0 +1,54 @@
+Description: Alter the launching script fora Debian installation
+ - Simplify the paths to account for a Debian installation.
+ - Use the default /etc/snpEff.config file as configuration file if no file was
+ given in the command line: it will be copied into ~/.snpEff.config, which will
+ be used as the config file is no other is given on the command line.
+ - Correct bashisms.
+Author: Pierre Gruet <pgtdebian at free.fr>
+Forwarded: not-needed
+Last-Update: 2021-02-19
+
+--- a/scripts/snpEff
++++ b/scripts/snpEff
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ 
+ #---------------------------------------------------------------------------------------------------
+ #
+@@ -13,13 +13,7 @@
+ # Created by: Brad Chapman
+ #---------------------------------------------------------------------------------------------------
+ 
+-jardir="$(cd "$(dirname "$0")" && cd ".." && pwd -P)"
+-
+-java=java
+-if [ -e "$JAVA_HOME/bin/java" ]
+-then
+-java="$JAVA_HOME/bin/java"
+-fi
++jardir=/usr/share/java
+ 
+ default_jvm_mem_opts="-Xms1g -Xmx4g"
+ jvm_mem_opts=""
+@@ -39,12 +33,16 @@
+     esac
+ done
+ 
+-if [ "$jvm_mem_opts" == "" ]; then
++if [ "$jvm_mem_opts" = "" ]; then
+     jvm_mem_opts="$default_jvm_mem_opts"
+ fi
+-if [[ "$pass_args" != "" && ! "$pass_args" =~ "-c " ]]; then
+-    pass_args="$pass_args -c ${jardir}/snpEff.config"
++if [ "$pass_args" != "" ] && ! echo "$pass_args" | grep "\-c " ; then
++    if [ ! -e ~/.snpEff.config ]; then
++        cp /etc/snpEff.config ~/.snpEff.config
++    fi
++
++    pass_args="$pass_args -c $HOME/.snpEff.config"
+ fi
+ 
+-exec $java $jvm_mem_opts $jvm_prop_opts -jar ${jardir}/snpEff.jar $pass_args
++exec java $jvm_mem_opts $jvm_prop_opts -jar ${jardir}/snpeff.jar $pass_args
+ exit


=====================================
debian/snpeff.install
=====================================
@@ -0,0 +1,2 @@
+scripts/snpEff usr/bin
+snpEff.config etc


=====================================
debian/snpeff.manpages
=====================================
@@ -0,0 +1 @@
+debian/manpages/snpEff.1



View it on GitLab: https://salsa.debian.org/med-team/snpeff/-/compare/0772e188d7e0fad41547fc151ff3be89ba8e9a16...723fc0d12d8442eaceff194220d4e14c7bf9c0e4

-- 
View it on GitLab: https://salsa.debian.org/med-team/snpeff/-/compare/0772e188d7e0fad41547fc151ff3be89ba8e9a16...723fc0d12d8442eaceff194220d4e14c7bf9c0e4
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/20210219/9bd9bcdc/attachment-0001.html>


More information about the debian-med-commit mailing list