[med-svn] [Git][med-team/mcaller][master] 4 commits: Do not create manpage while building, use maintainer manpage

Nilesh Patra (@nilesh) gitlab at salsa.debian.org
Sun Jun 20 21:23:51 BST 2021



Nilesh Patra pushed to branch master at Debian Med / mcaller


Commits:
ba50923b by Nilesh Patra at 2021-06-21T01:27:43+05:30
Do not create manpage while building, use maintainer manpage

- - - - -
65380a93 by Nilesh Patra at 2021-06-21T01:28:13+05:30
Add missing B-D on python3-sklearn

- - - - -
29635bdf by Nilesh Patra at 2021-06-21T01:49:45+05:30
Run build time tests as autopkgtests instead

- - - - -
e33f0d21 by Nilesh Patra at 2021-06-21T01:53:37+05:30
Minor fix in copyright

- - - - -


9 changed files:

- + debian/compare_genomes.1
- debian/control
- debian/copyright
- + debian/createmanpages
- + debian/mCaller.1
- + debian/make_bed.1
- debian/manpages
- debian/rules
- debian/tests/run-unit-test


Changes:

=====================================
debian/compare_genomes.1
=====================================
@@ -0,0 +1,28 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.47.16.
+.TH COMPARE_GENOMES.PY "1" "June 2021" "compare_genomes.py 1.0.3+git20210331.f7a616a" "User Commands"
+.SH NAME
+compare_genomes.py \- find methylation in nanopore reads
+.SH DESCRIPTION
+usage: compare_genomes.py [\-h] \fB\-\-bed1\fR BED1 \fB\-\-bed2\fR BED2 [\-g GENOME_ALIGNMENT]
+.IP
+[\-v]
+.PP
+Compare methylation between two genomes by probabilities of methylation for
+aligned positions
+.SS "optional arguments:"
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+show this help message and exit
+.TP
+\fB\-\-bed1\fR BED1
+bed file 1 with verbose output from make_bed.py
+.TP
+\fB\-\-bed2\fR BED2
+bed file 2 with verbose output from make_bed.py
+.TP
+\fB\-g\fR GENOME_ALIGNMENT, \fB\-\-genome_alignment\fR GENOME_ALIGNMENT
+an xmfa file from mauve (if absent, alignments assumed
+to be to the same reference genome)
+.TP
+\fB\-v\fR, \fB\-\-version\fR
+print version


=====================================
debian/control
=====================================
@@ -10,7 +10,7 @@ Build-Depends: debhelper-compat (= 13),
                python3-seaborn,
                python3-biopython,
                python3-numpy,
-               help2man
+               python3-sklearn
 Standards-Version: 4.5.1
 Vcs-Browser: https://salsa.debian.org/med-team/mcaller
 Vcs-Git: https://salsa.debian.org/med-team/mcaller.git


=====================================
debian/copyright
=====================================
@@ -11,8 +11,6 @@ Copyright: 2020 Steffen Moeller <moeller at debian.org>
 License: Expat
 
 License: Expat
- MIT License
- .
  Permission is hereby granted, free of charge, to any person obtaining a copy
  of this software and associated documentation files (the "Software"), to deal
  in the Software without restriction, including without limitation the rights


=====================================
debian/createmanpages
=====================================
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+set -e
+
+if [ ! -x /usr/bin/help2man ]; then
+    echo "E: Missing /usr/bin/help2man, please install it from the cognate package."
+    exit 1
+fi
+
+if [ ! -n "$NAME" ]; then
+    NAME=`grep "^Description:" debian/control | sed 's/^Description: *//' | head -n1`
+fi
+
+if [ ! -n "$VERSION" ]; then
+    VERSION=`dpkg-parsechangelog | awk '/^Version:/ {print $2}' | sed -e 's/^[0-9]*://' -e 's/-.*//' -e 's/[+~]dfsg$//'`
+fi
+
+if [ ! -n "$PROGNAME" ]; then
+    PROGNAME=`grep "^Package:" debian/control | sed 's/^Package: *//' | head -n1`
+fi
+
+MANDIR=debian
+
+HELPOPTION="-h"
+echo "PROGNAME: '$PROGNAME'"
+echo "NAME:     '$NAME'"
+echo "VERSION:  '$VERSION'"
+echo "MANDIR:   '$MANDIR'"
+echo "HELPOPTION: '$HELPOPTION'"
+
+mkdir -p $MANDIR
+
+
+AUTHOR=".SH AUTHOR\n \
+This manpage was written by $DEBFULLNAME for the Debian distribution and\n \
+can be used for any other usage of the program.\
+"
+
+# If program name is different from package name or title should be
+# different from package short description change this here
+progname=./mCaller.py
+help2man --no-info --no-discard-stderr --help-option="-h" \
+         --name="$NAME" \
+            --version-string="$VERSION" ${progname} > $MANDIR/mCaller.1
+echo $AUTHOR >> $MANDIR/${progname}.1
+
+progname=./make_bed.py
+help2man --no-info --no-discard-stderr --help-option="-h" \
+         --name="$NAME" \
+            --version-string="$VERSION" ${progname} > $MANDIR/make_bed.1
+echo $AUTHOR >> $MANDIR/${progname}.1
+
+progname=./compare_genomes.py
+help2man --no-info --no-discard-stderr --help-option="-h" \
+         --name="$NAME" \
+            --version-string="$VERSION" ${progname} > $MANDIR/compare_genomes.1
+echo $AUTHOR >> $MANDIR/${progname}.1
+
+
+echo "$MANDIR/*.1" > debian/manpages
+
+cat <<EOT
+Please enhance the help2man output in '$MANDIR/${progname}.1'.
+To inspect it, try 'nroff -man $MANDIR/${progname}.1'.
+If very unhappy, try passing the HELPOPTION as an environment variable.
+The following web page might be helpful in doing so:
+    http://liw.fi/manpages/
+EOT
+


=====================================
debian/mCaller.1
=====================================
@@ -0,0 +1,81 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.47.16.
+.TH MCALLER.PY "1" "June 2021" "mCaller.py 1.0.3+git20210331.f7a616a" "User Commands"
+.SH NAME
+mCaller.py \- find methylation in nanopore reads
+.SH DESCRIPTION
+\fI\,/usr/lib/python3/dist\-packages/joblib/_multiprocessing_helpers\/\fP.py:53: UserWarning: [Errno 13] Permission denied.  joblib will operate in serial mode
+.TP
+warnings.warn('%s.
+joblib will operate in serial mode' % (e,))
+.PP
+usage: mCaller [\-h] (\fB\-p\fR POSITIONS | \fB\-m\fR MOTIF) \fB\-r\fR REFERENCE \fB\-e\fR TSV \fB\-f\fR FASTQ
+.IP
+[\-t THREADS] [\-b BASE] [\-n NUM_VARIABLES] [\-\-train]
+[\-\-training_tsv TRAINING_TSV] [\-d MODELFILE] [\-s SKIP_THRESH]
+[\-q QUAL_THRESH] [\-c CLASSIFIER] [\-\-plot_training] [\-v]
+.PP
+Classify bases as methylated or unmethylated
+.SS "optional arguments:"
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+show this help message and exit
+.TP
+\fB\-p\fR POSITIONS, \fB\-\-positions\fR POSITIONS
+file with a list of positions at which to classify
+bases (must be formatted as space\- or tab\-separated
+file with chromosome, position, strand, and label if
+training)
+.TP
+\fB\-m\fR MOTIF, \fB\-\-motif\fR MOTIF
+classify every base of type \fB\-\-base\fR in the motif
+specified instead (can be single one\-mer)
+.TP
+\fB\-r\fR REFERENCE, \fB\-\-reference\fR REFERENCE
+fasta file with reference aligned to
+.TP
+\fB\-e\fR TSV, \fB\-\-tsv\fR TSV
+tsv file with nanopolish event alignment
+.TP
+\fB\-f\fR FASTQ, \fB\-\-fastq\fR FASTQ
+fastq file with nanopore reads
+.TP
+\fB\-t\fR THREADS, \fB\-\-threads\fR THREADS
+specify number of processes (default = 1)
+.TP
+\fB\-b\fR BASE, \fB\-\-base\fR BASE
+bases to classify as methylated or unmethylated (A or
+C, default A)
+.TP
+\fB\-n\fR NUM_VARIABLES, \fB\-\-num_variables\fR NUM_VARIABLES
+change the length of the context used to classify
+(default of 6 variables corresponds to 11\-mer context
+(6*2\-1))
+.TP
+\fB\-\-train\fR
+train a new model (requires labels in positions file)
+.TP
+\fB\-\-training_tsv\fR TRAINING_TSV
+mCaller output file for training
+.TP
+\fB\-d\fR MODELFILE, \fB\-\-modelfile\fR MODELFILE
+model file name
+.TP
+\fB\-s\fR SKIP_THRESH, \fB\-\-skip_thresh\fR SKIP_THRESH
+number of skips to allow within an observation
+(default 0)
+.TP
+\fB\-q\fR QUAL_THRESH, \fB\-\-qual_thresh\fR QUAL_THRESH
+quality threshold for reads (default none)
+.TP
+\fB\-c\fR CLASSIFIER, \fB\-\-classifier\fR CLASSIFIER
+use alternative classifier: options = NN (default),
+RF, LR, or NBC (non\-default may significantly increase
+runtime)
+.TP
+\fB\-\-plot_training\fR
+plot probabilities distributions for training
+positions (requires labels in positions file and
+\fB\-\-train\fR)
+.TP
+\fB\-v\fR, \fB\-\-version\fR
+print version


=====================================
debian/make_bed.1
=====================================
@@ -0,0 +1,69 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.47.16.
+.TH MAKE_BED.PY "1" "June 2021" "make_bed.py 1.0.3+git20210331.f7a616a" "User Commands"
+.SH NAME
+make_bed.py \- find methylation in nanopore reads
+.SH DESCRIPTION
+\fI\,/usr/lib/python3/dist\-packages/joblib/_multiprocessing_helpers\/\fP.py:53: UserWarning: [Errno 13] Permission denied.  joblib will operate in serial mode
+.TP
+warnings.warn('%s.
+joblib will operate in serial mode' % (e,))
+.PP
+usage: make_bed.py [\-h] [\-d MIN_READ_DEPTH] [\-t MOD_THRESHOLD] \fB\-f\fR MCALLER_FILE
+.IP
+[\-p POSITIONS] [\-\-control] [\-\-gff] [\-\-ref REF] [\-\-plot]
+[\-\-plotsummary] [\-\-plotdir PLOTDIR] [\-\-vo] [\-v]
+.PP
+Produce bed file of methylated positions based on mCaller output
+.SS "optional arguments:"
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+show this help message and exit
+.TP
+\fB\-d\fR MIN_READ_DEPTH, \fB\-\-min_read_depth\fR MIN_READ_DEPTH
+minimum coverage of position to determine methylation
+(default = 15)
+.TP
+\fB\-t\fR MOD_THRESHOLD, \fB\-\-mod_threshold\fR MOD_THRESHOLD
+minimum fraction of observations with probability of
+methylation >=50% at a position to include in report
+(default = 0.5)
+.TP
+\fB\-f\fR MCALLER_FILE, \fB\-\-mCaller_file\fR MCALLER_FILE
+the output file from mCaller to summarize
+.TP
+\fB\-p\fR POSITIONS, \fB\-\-positions\fR POSITIONS
+~bed file of positions for which to calculate % of
+methylated reads (chromosome,start,end,strand);
+ignores other thresholds
+.TP
+\fB\-\-control\fR
+take unmethylated positions as a control for motif
+detection
+.TP
+\fB\-\-gff\fR
+output PacBio\-style gff instead of bed
+("identificationQv" score will be average probability
+of methylation)
+.TP
+\fB\-\-ref\fR REF
+use reference fasta to output longer contexts
+surrounding a base, from \fB\-20\fR to +20
+.TP
+\fB\-\-plot\fR
+plot currents deviations at the positions included
+(not recommended for many positions)
+.TP
+\fB\-\-plotsummary\fR
+plot currents deviations summarized across the
+positions included
+.TP
+\fB\-\-plotdir\fR PLOTDIR
+output directory for plots,
+default=mCaller_position_plots
+.TP
+\fB\-\-vo\fR
+verbose output including probabilities for each
+position
+.TP
+\fB\-v\fR, \fB\-\-version\fR
+print version


=====================================
debian/manpages
=====================================
@@ -1,3 +1 @@
-debian/mCaller.1 
-debian/make_bed.1 
-debian/compare_genomes.1 
+debian/*.1


=====================================
debian/rules
=====================================
@@ -9,22 +9,7 @@ include /usr/share/dpkg/default.mk
 %:
 	dh $@ --with python3
 
-override_dh_auto_build:
-	dh_auto_build
-	help2man ./mCaller.py --version-string=$(UVERSION) --no-info > debian/mCaller.1
-	help2man ./make_bed.py --version-string=$(UVERSION) --no-info > debian/make_bed.1
-	help2man ./compare_genomes.py --version-string=$(UVERSION) --no-info > debian/compare_genomes.1
-
-override_dh_auto_test:
-ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
-	./mCaller.py -p testdata/test_positions_A.txt -r testdata/pb_ecoli_polished_assembly.fasta -e testdata/masonread1.eventalign.tsv -d r95_twobase_model_NN_6_m6A.pkl -f testdata/masonread1.fastq
-	./mCaller.py -p testdata/test_positions_m6A.txt -r testdata/pb_ecoli_polished_assembly.fasta -e testdata/masonread1.eventalign.tsv -d r95_twobase_model_NN_6_m6A.pkl -f testdata/masonread1.fastq
-	#./make_bed.py -f testdata/masonread1.eventalign.diffs.6 -d 1 -m 0.5
-	./mCaller.py -p testdata/test_positions.txt -r testdata/pb_ecoli_polished_assembly.fasta -e testdata/masonread1.eventalign.tsv -t 4 --train -f testdata/masonread1.fastq
-endif
-
 override_dh_auto_clean:
 	dh_auto_clean
 	#rm -f model_NN_6_m6A.pkl testdata/masonread1.eventalign.diffs.6 testdata/masonread1.eventalign.diffs.6.train
 	rm -rf __pycache__
-	rm -f debian/*.1


=====================================
debian/tests/run-unit-test
=====================================
@@ -2,6 +2,7 @@
 set -e
 
 pkg=mcaller
+CUR_DIR=`pwd`
 
 export LC_ALL=C.UTF-8
 if [ "${AUTOPKGTEST_TMP}" = "" ] ; then
@@ -9,8 +10,18 @@ if [ "${AUTOPKGTEST_TMP}" = "" ] ; then
   trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
 fi
 
-cp -a /usr/share/doc/${pkg}/examples/* "${AUTOPKGTEST_TMP}"
+cp -a ${CUR_DIR}/testdata "${AUTOPKGTEST_TMP}"
 
 cd "${AUTOPKGTEST_TMP}"
+mkdir -p model_data
 
-#do_stuff_to_test_package#
+cp -a ${CUR_DIR}/*pkl model_data
+
+mCaller -p testdata/test_positions_A.txt -r testdata/pb_ecoli_polished_assembly.fasta -e testdata/masonread1.eventalign.tsv -d model_data/r95_twobase_model_NN_6_m6A.pkl -f testdata/masonread1.fastq
+mCaller -p testdata/test_positions_m6A.txt -r testdata/pb_ecoli_polished_assembly.fasta -e testdata/masonread1.eventalign.tsv -d model_data/r95_twobase_model_NN_6_m6A.pkl -f testdata/masonread1.fastq
+mCaller -p testdata/test_positions.txt -r testdata/pb_ecoli_polished_assembly.fasta -e testdata/masonread1.eventalign.tsv -t 4 --train -f testdata/masonread1.fastq
+
+rm -rf model_data
+rm -rf testdata
+
+echo "PASS"



View it on GitLab: https://salsa.debian.org/med-team/mcaller/-/compare/48c2626f9818e3a241e599b641584fd23d477276...e33f0d2154fa9597a86cd5028d02896aa636beee

-- 
View it on GitLab: https://salsa.debian.org/med-team/mcaller/-/compare/48c2626f9818e3a241e599b641584fd23d477276...e33f0d2154fa9597a86cd5028d02896aa636beee
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/20210620/09d276b6/attachment-0001.htm>


More information about the debian-med-commit mailing list