[med-svn] [Git][med-team/snpeff][master] Putting config file and downloaded data in a dot directory by default

Pierre Gruet gitlab at salsa.debian.org
Sun Feb 21 21:49:46 GMT 2021



Pierre Gruet pushed to branch master at Debian Med / snpeff


Commits:
6d58a59d by Pierre Gruet at 2021-02-21T22:49:36+01:00
Putting config file and downloaded data in a dot directory by default

- - - - -


5 changed files:

- debian/README.Debian
- debian/changelog
- debian/manpages/snpEff.1
- debian/patches/series
- debian/patches/update_launching_script_for_Debian.patch → debian/patches/update_launching_script_and_config_file_for_Debian.patch


Changes:

=====================================
debian/README.Debian
=====================================
@@ -1,4 +1,13 @@
-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.
+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/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
+Moreover, by default data downloaded from the Internet by snpEff will be put
+into ~/.snpEff/data. The users can change this by editing their per-user config
+file ~/.snpEff/snpEff.config or by providing another config file on the command
+line.
+
+ -- Pierre Gruet <pgtdebian at free.fr> Sun, 21 Feb 2021 15:45:10 +0100


=====================================
debian/changelog
=====================================
@@ -4,8 +4,11 @@ snpeff (4.3t+dfsg-1) UNRELEASED; urgency=medium
   TODO:
     - Ensure upstream provides files with proper copyrighting and licensing.
     - fill in debian/copyright, maybe remove the html/ folder.
-    - check my patch replacing akka with java.util.concurrent.
     - snpsift is to package elsewhere on its own.
-    - add autopkgtest
+    - add autopkgtest if possible, as many many tasks need downloading data
+      from the Internet before.
+    - Find out where the build date is recorded and stored (it is then
+      outputted as shown, for instance, in the example from the website) to
+      allow for build reproducibility.
 
  -- Pierre Gruet <pgtdebian at free.fr>  Fri, 19 Feb 2021 09:47:24 +0100


=====================================
debian/manpages/snpEff.1
=====================================
@@ -59,7 +59,7 @@ Create a translocations report (from VCF file).
 .SS "Generic options"
 .TP
 \fB\-c\fR , \fB\-config\fR
-Specify config file
+Specify config file. Default: ~/.snpEff/snpEff.config
 .TP
 \fB\-configOption\fR name=value
 Override a config file option


=====================================
debian/patches/series
=====================================
@@ -4,4 +4,4 @@ adapting_to_htsjdk.patch
 adding_scala_in_pom.patch
 fix_tests.patch
 alter_pom_for_debian_packaging.patch
-update_launching_script_for_Debian.patch
+update_launching_script_and_config_file_for_Debian.patch


=====================================
debian/patches/update_launching_script_for_Debian.patch → debian/patches/update_launching_script_and_config_file_for_Debian.patch
=====================================
@@ -1,12 +1,14 @@
-Description: Alter the launching script fora Debian installation
+Description: Alter the launching script and the config filefor a Debian install
  - 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.
+ given in the command line: it will be copied into ~/.snpEff/snpEff.config,
+ which will be used as the configuration file is no other is given on the
+ command line.
+ - By default, put data in ~/.snpEff/data.
+ - Correct bashisms in the launching script.
 Author: Pierre Gruet <pgtdebian at free.fr>
 Forwarded: not-needed
-Last-Update: 2021-02-19
+Last-Update: 2021-02-21
 
 --- a/scripts/snpEff
 +++ b/scripts/snpEff
@@ -31,7 +33,7 @@ Last-Update: 2021-02-19
  
  default_jvm_mem_opts="-Xms1g -Xmx4g"
  jvm_mem_opts=""
-@@ -39,12 +33,16 @@
+@@ -39,12 +33,20 @@
      esac
  done
  
@@ -42,13 +44,28 @@ Last-Update: 2021-02-19
 -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
++    if [ ! -d ~/.snpEff ]; then
++        mkdir ~/.snpEff
 +    fi
 +
-+    pass_args="$pass_args -c $HOME/.snpEff.config"
++    if [ -d ~/.snpEff -a ! -e ~/.snpEff/snpEff.config ]; then
++        cp /etc/snpEff.config ~/.snpEff/snpEff.config
++    fi
++
++    pass_args="$pass_args -c $HOME/.snpEff/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
+--- a/snpEff.config
++++ b/snpEff.config
+@@ -14,7 +14,7 @@
+ # Also, a non-absolute path will be relative to config's file dir
+ # 
+ #---
+-data.dir = ./data/
++data.dir = ~/.snpEff/data/
+ 
+ #---
+ # Database repository: A URL to the server where you can download databases (command: 'snpEff download dbName')



View it on GitLab: https://salsa.debian.org/med-team/snpeff/-/commit/6d58a59db0033e540479082abb5fbcafc3fdaf54

-- 
View it on GitLab: https://salsa.debian.org/med-team/snpeff/-/commit/6d58a59db0033e540479082abb5fbcafc3fdaf54
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/20210221/b4a37c77/attachment-0001.htm>


More information about the debian-med-commit mailing list