Nilesh Patra pushed to branch master at Debian Med / scrappie
Commits: 201d0528 by Nilesh Patra at 2020-10-25T19:59:11+05:30 Add autopkgtest - - - - - afa9159a by Nilesh Patra at 2020-10-25T14:39:15+00:00 Add manpages - - - - - a973b0d3 by Nilesh Patra at 2020-10-25T20:16:43+05:30 Update changelog - - - - - 7 changed files: - debian/changelog - + debian/createmanpages - + debian/manpages - + debian/scrappie.1 - + debian/tests/control - + debian/tests/run-unit-test - + debian/tests/simple_test.py Changes: ===================================== debian/changelog ===================================== @@ -1,3 +1,11 @@ +scrappie (1.4.2-3) unstable; urgency=medium + + * Team upload. + * Add autopkgtest + * Add manpage + + -- Nilesh Patra <[email protected]> Sun, 25 Oct 2020 20:01:22 +0530 + scrappie (1.4.2-2) unstable; urgency=medium * Team upload. ===================================== debian/createmanpages ===================================== @@ -0,0 +1,28 @@ +#!/bin/sh +MANDIR=debian +mkdir -p $MANDIR + +VERSION=`dpkg-parsechangelog | awk '/^Version:/ {print $2}' | sed -e 's/^[0-9]*://' -e 's/-.*//' -e 's/[+~]dfsg$//'` +NAME=`grep "^Description:" debian/control | sed 's/^Description: *//' | head -n1` +PROGNAME=`grep "^Package:" debian/control | sed 's/^Package: *//' | head -n1` + +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=${PROGNAME} +help2man --no-info --no-discard-stderr --help-option="help" \ + --name="$NAME" \ + --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1 +echo $AUTHOR >> $MANDIR/${progname}.1 + +echo "$MANDIR/*.1" > debian/manpages + +cat <<EOT +Please enhance the help2man output. +The following web page might be helpful in doing so: + http://liw.fi/manpages/ +EOT ===================================== debian/manpages ===================================== @@ -0,0 +1 @@ +debian/*.1 ===================================== debian/scrappie.1 ===================================== @@ -0,0 +1,32 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.16. +.TH SCRAPPIE "1" "October 2020" "scrappie 1.4.2" "User Commands" +.SH NAME +scrappie \- basecaller for Nanopore sequencer +.SH DESCRIPTION +Scrappie is a technology demonstrator for the Oxford Nanopore Technologies +Limited Research Algorithms group. +.PP +Basic usage: +* scrappie events Base call from event based data. +* scrappie help Print general help or help about specific Scrappie command. +* scrappie licence Print licensing information. +* scrappie raw Base call directly from raw signal. +* scrappie version Print version information. +* scrappie squiggle Create approximate squiggle for sequence +* scrappie mappy Map signal to approximate squiggle +* scrappie seqmappy Map signal to sequence via basecall posteriors +* scrappie event_table Output table of events for read +.PP +This project began life as a proof (bet) that a base caller could be written +in a low level language in under 8 hours. Some of the poor and just plain odd +design decisions, along with the lack of documentation, are a result of its +inception. In keeping with ONT's fish naming policy, the project was originally +called Crappie. +.PP +Scrappie's purpose is to demonstrate the next generation of base calling and, as +such, may change drastically between releases and breaks backwards +compatibility. Newer versions may drop support of current features or change their +behaviour. +.SH AUTHOR + This manpage was written by Nilesh Patra for the Debian distribution and + can be used for any other usage of the program. ===================================== debian/tests/control ===================================== @@ -0,0 +1,2 @@ +Tests: run-unit-test +Depends: @, python3 ===================================== debian/tests/run-unit-test ===================================== @@ -0,0 +1,37 @@ +#!/bin/bash +set -e + +pkg="scrappie" +CUR_DIR=`pwd` + +if [ "$AUTOPKGTEST_TMP" = "" ] ; then + AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXXXX` + trap "rm -rf $AUTOPKGTEST_TMP" 0 INT QUIT ABRT PIPE TERM +fi + +cp -a ${CUR_DIR}/reads $AUTOPKGTEST_TMP +cp -a ${CUR_DIR}/misc $AUTOPKGTEST_TMP + +cd $AUTOPKGTEST_TMP +gunzip -r * + +echo "Test functionality" + +echo "Test 1" +scrappie raw -f sam reads --min_prob=0.1 --format=FASTA --output=test1.fa +[ -s test1.fa ] +head -n 1 test1.fa +echo "PASS" + +echo "Test 2" +scrappie events reads > test2.fa +head -n 1 test2.fa +[ -s test2.fa ] +echo "PASS" + +echo "Test 3" +scrappie raw reads | tee test2.fa | grep '^>' | cut -d ' ' -f 2- | python3 misc/json_to_tsv.py > test3.tsv +[ -s test3.tsv ] +cat test3.tsv +echo "PASS" + ===================================== debian/tests/simple_test.py ===================================== @@ -0,0 +1,16 @@ +from dnapilib.apred import adapter_prediction +from dnapilib.apred import iterative_adapter_prediction + +def test_functional(): + iterative_result = iterative_adapter_prediction("good.fq", [1.2, 1.3, 1.4], [9, 11], 50000) + single_result = adapter_prediction("good.fq", 1.4, 9, 50000) + + + assert(iterative_result[0][0] == 'TGGAATTCTCGG') + assert(single_result[0][0] == 'TGGAATTCTCGGGTGCCAAGGAACTCC') + + iterative_result = iterative_adapter_prediction("processed.fq", [1.2, 1.3, 1.4], [9, 11], 50000) + single_result = adapter_prediction("processed.fq", 1.4, 9, 50000) + + assert([x[0] for x in iterative_result] == ['TCTGCCCAGTGCTCTG', 'TAATACTGCCTG', 'TGGCAGTGTCTT']) + assert([x[0] for x in single_result] == ['TAATACTGCCTGGTAATGATG', 'TGGCAGTGTCTTAGCTGGTTG', 'CTGCCCAGTGCTCTGAA']) View it on GitLab: https://salsa.debian.org/med-team/scrappie/-/compare/ed80ed3e2ac44a1d5311c8e2c3e556b1214a8a00...a973b0d3f3f93bd5df3b3a9898c1de58fa395d1a -- View it on GitLab: https://salsa.debian.org/med-team/scrappie/-/compare/ed80ed3e2ac44a1d5311c8e2c3e556b1214a8a00...a973b0d3f3f93bd5df3b3a9898c1de58fa395d1a You're receiving this email because of your account on salsa.debian.org.
_______________________________________________ debian-med-commit mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-commit
